Relative Content

Tag Archive for pythontelegram-botaiogram

Send paid media aiogram 3.10

How to send blurred paid media in channel? Here is me code, but I cannot find solution https://docs.aiogram.dev/en/dev-3.x/api/types/input_media_photo.html

Aiogram how to catch network exceptions?

Periodically, I see errors like ConnectionResetError: An existing connection was forcibly closed by the remote host in the logs. However, they are not blocking, and the bot continues further work, but I don’t understand how to catch them? If you wrap the Dispatcher().start_polling() method in a try-except, it does not catch them, since this happens (as I understand it) somewhere inside the aiohttp. These errors do not essentially interfere with work, but I would like to put things in order in the log files and in the sentry work, since these tracebacks greatly clutter up the logs

How to reset a bot’s state in aiogram?

The bot is written in aiogram
I can’t figure out how to make it so that when I start the command, I can restart the code again. To prevent the code from sending user_login and user_password values that are already in it.

How to remove main keyboard markup in telegram bot

I wanna remove ReplyKeyboardMarkup instance and show InlineKeyboardMarkup instead, but I just can’t do this by simple way as reply_markup=ReplyKeyboardRemove() because there is inserting new InlineKeyboardMarkup instance in code below