In my bot, I generate an image with three variables. Then, I want to send the image to user. I tried this code:
...
module.full_card(int(userid),tested_word[1],correct_word)
await bot.send_photo(callback_query.from_user.id,…
`id = '001'
us_id = callback.message.from_user.id
cursor.execute("SELECT opisanie FROM assortiment WHERE id='001'")
cursor.execute(f'SELECT array_append("korzina",{id}) FROM assortiment WHERE user_id={us_id}')
await…
I am writing a bot through aiogram and attached gpt to it, but with asynchronous requests, the beginning of the text began to eat up. Such a thing is only with an asynchronous request, through the Openai module. I also tried using aiohttp and it…
As a result of my "misunderstandings", the show_summary function in the code below is not outputting values correctly. This is what is output in (show_summary):
The following is a summary of the information you provided:
Student Name: (Parent) #…
I have Django+aiogram bot and that's how my mailing works:
Manager/admin create a instance of the Post/Poll model in the admin panel -> Admin approve/disapprove it in telegram PM with inline keyboard -> if approves ("post" callback data) ->…
I specifically commented out all the code leaving only one initial handler for the start command
When I start the bot I see in the logs that the bot started correctly and there is no error, but at the same time in the chat the bot does not react to…
Something strange is going on in FSM. Everything is fine until the await BotStatesGroup.next() line in callback_category, but then it turns out that the transition to the process_species state occurs only from the second click on the inline button…
I'm making telegram bot on aiogram and DRF and I need aiohttp function for bot.
So, I've made endpoint and it works well manually, but function return error 404.
There's my code:
class BotUser(models.Model):
name =…
Hello!
I'm encountering an issue while using the aiogram library to create a Telegram bot. Currently, I'm using the following code:
# Imports and settings
async def main():
bot = Bot(token=config.token_bot.get_secret_value(),…
The bot manages tables: users and bans. Users and bans have a single user entry (test). The bot writes the new commenter's id to users and checks the commenter's id in the bans table. If id is in bans, the bot should remove any comment. Otherwise,…
We need such a button so that even if the bot breaks, the button works. Is it possible?
We are making a bot in aiogram. Of course, we can make a back button through the list, but if the bot breaks, the back button will not work. The bot literally…
How to add user in private channel using aiogram?
I try await bot.send_chat_action, chatgpt send me this command, but it doesn't work. I have private channel in telegram and I need to add user in channel, when he write to bot command /channel
I have troubles with aiogram+asyncpg+postgresql. I have already explicitly written a class for __enter__ to be defined as I received an error of it being undefined, though now I have a problem of it being unable to be awaited. When I make it…