Comments (5)
Looks like a non-aiogram issue. Debug your application or send minimal reproducible example
from aiogram.
As I figured out, it doesn't get messages from second account. But if I turn my script off, getUpdate (https://api.telegram.org/bot'token'/getUpdates) get all the messages I send to the bot:
{"ok":true,"result":[{"update_id":967979408, "message":{"message_id":143,"from":{"id":489327708,"is_bot":false,"first_name":"Ilia","last_name":"Sevostianov","username":"sevocrear","language_code":"ru","is_premium":true},"chat":{"id":489327708,"first_name":"Ilia","last_name":"Sevostianov","username":"sevocrear","type":"private"},"date":1712478116,"text":"For"}}]}
from aiogram.
Have some problem now. Bot can send messages, but not handling any commands
from aiogram.
Have some problem now. Bot can send messages, but not handling any commands
@Petrprogs, still need minimal reproducible example
from aiogram.
Have some problem now. Bot can send messages, but not handling any commands
@Petrprogs, still need minimal reproducible example
This was problem in my code:
import asyncio
from aiogram import Bot, Dispatcher, types, F
from aiogram.filters import Command
bot = Bot(token=TG_TOKEN)
dp = Dispatcher()
@dp.message(Command("start"))
async def send_welcome(msg):
await msg.reply("Hi there!")
async def main_loop():
while True:
print("Some infinty loop")
await asyncio.sleep(10)
asyncio.run(main_loop())
asyncio.run(dp.start_polling(bot)) # This won't run, because main_loop() has infinity while loop
To solve this a just moved dp.start_polling(bot)
to main_loop() like this:
import asyncio
from aiogram import Bot, Dispatcher, types, F
from aiogram.filters import Command
bot = Bot(token=TG_TOKEN)
dp = Dispatcher()
@dp.message(Command("start"))
async def send_welcome(msg):
await msg.reply("Hi there!")
async def main_loop():
asyncio.create_task(dp.start_polling(bot))
while True:
print("Some infinty loop")
await asyncio.sleep(10)
asyncio.run(main_loop())
Sorry for my weird code :)
from aiogram.
Related Issues (20)
- as_markup TypeHint not working
- Incomplete Implementation of Telegram WebApp API
- Get_chat_member | pydantic_core._pydantic_core.ValidationError HOT 6
- How to make aiogram 3 filter to enable in handler only one command or without any command execution
- Filter F.document works only if message contains any command on Debian 12 HOT 3
- Add function get_value to FSMContext HOT 1
- ModuleNotFoundError: No module named 'aiogram' HOT 1
- Failed deserealization on get_sticker_set method
- Update pydantic 2.6.4 HOT 1
- hey im trying to find out who reacted to my posts in my telegram channel via my aiogram bot. but @dp.message_reaction() only seems to work for groups and in private message
- Error serializing to JSON: PydanticSerializationError: Unable to serialize unknown type: <class 'aiogram.client.default.Default'> HOT 2
- message.get_url() in chat with topics -> wrong url HOT 2
- Mixed-Format Sticker Packs HOT 1
- Invalid webhook response given with handle_in_background=False
- types.Message.edit_caption first positional argument is not caption but inline_message_id HOT 2
- aiogram\utils\formatting.py (as_section) HOT 2
- How to use custom emoji in aiogram message formatting HOT 1
- Can't use `message.answer` within `asyncio.gather` HOT 3
- Get user from `chat_boost` with source `ChatBoostSourcePremium` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aiogram.