Questions tagged [aiogram]

aiogram is an asynchronous Python framework for Telegram Bot API. Use this tag when your question is related specifically to aiogram.

aiogram asynchronous framework for Telegram Bot API based on client.

Resources

Related Tags

430 questions
0
votes
0 answers

Closed / сallback not working when pressing inline button

Solution: In my case, the solution was to revoke the bot token Problem description: When developing a bot in Python using the framework aiogram 3.0.0b8, was found a problem with the processing of callback_data, when the button inline is pressed…
AEON
  • 1
  • 1
0
votes
1 answer

Bot does not move to the next state, instead repeats it

I'm creating a chat bot that gives you an example in math in Python using the Aiogram library. It works like this, when you write the /start command, it offers to choose 3 modes: multiplication, division and all at once (1,2,3). Then it offers how…
0
votes
0 answers

Aiogram how to pass a file name from users message to callback function?

I’m making a telegram bot which allows users to upload files to cloud drive. When user sends file, bot replies with inline keyboard with two options of destination folders on my cloud drive. When users clicks on button I save file on my computers…
Punk1503
  • 75
  • 1
  • 6
0
votes
0 answers

Why the handler is not readable with two callback_query routers (Aiogram 3.0.0b8)

There was a problem when writing a telegram bot with a primitive economy. The first idea was to make a simple game in which you had to solve examples, but I ran into a problem. Briefly about the game: To enter the start "menu" of this game, you had…
0
votes
1 answer

Why bot don't send photo?

my problem is that bot don't send photo, which it got from user(admin).Bot have to send photo all users in database. @dp.message_handler(state='send_photo') async def send(message: types.Message, state: FSMContext): photo = message.photo …
Zervan
  • 21
  • 2
0
votes
1 answer

Invalid signature - Fondy payment gateway

I am creating a bot (Python, aiogram) with a paid subscription using the Fondy payment gateway. I am using the principle of checking the payment status, but after sending the request, I receive the following error: {'response': {'error_code': 1014,…
0
votes
0 answers

The user has to enter the email twice to get the next message from the bot

I'm writing a bot on aiogram and have a problem. The user has to enter the number twice to get the next message from the bot. Here is the example: Bot, [24.06.2023 20:54] Write email Рамиль, [24.06.2023 20:54] @ Рамиль, [24.06.2023 20:54] @ Bot,…
Zemmeus
  • 1
  • 1
0
votes
1 answer

A variable imported with environ doesn't transfer to another file

I have two files in my Telegram bot called loader.py and start_message.py: loader.py: from aiogram import Bot, Dispatcher import environ from environment import TOKEN bot = Bot(token=TOKEN) dp = Dispatcher(bot) loader.py works perfectly well and…
Anna
  • 101
  • 8
0
votes
1 answer

How to correct this issue, Aiogram, Trelegram

I a making a telegram bot, and the problem is that user has to accept policy and when user click accept the bot just shows loading message Video with the problem: https://drive.google.com/file/d/1yAZl0VDn_tisBsHAaJ2udyfnaW-G9IOH/view?usp=sharing My…
Dima
  • 15
  • 4
0
votes
0 answers

aiogram Telegram bot with webhook hosted on aws lambda goes to request-response loop with chatgpt requests

I have a simple aiogram Telegram bot (works with AWS Lambda) that redirects incoming chat messages to GPT-Turbo and returns its answer to the Telegram bot user's chat. The issue is that it goes into an infinite loop: the user sends a text message to…
0
votes
0 answers

Error "'NoneType' object is not subscriptable" in BD SQLite

I am a beginner programmer and I am having an issue with my code. Here is the main code: def user_status_check(chat_member): return chat_member["status"] != "left" @dp.message_handler(commands=["mute"]) async def mute(message: types.Message) ->…
0
votes
0 answers

Send video messages via aiogram

I tried to do it using video_note but it sends only video but i want a circle video. I need a code sample to send video messages in telegram. @dp.message_handler(commands=['start']) async def send_welcome(message: types.Message): await…
sokol
  • 21
  • 2
0
votes
1 answer

Requests via Telegram to Rasa are not being processed

I am developing a Telegram bot through which a user can send their question and a trained Rasa model will return the answer. I have encountered a problem that messages sent to the bot are not sent to the Rasa server in any way. What can be the…
agfn
  • 29
  • 2
0
votes
0 answers

This Connection is closed: Telegram bot does not update the database

I have the following code in my Telegram bot: async def approve_or_disapprove(user_id): @dp.callback_query_handler(text="approve") async def approve_transaction(call: types.CallbackQuery): with engine.connect() as connection: …
Anna
  • 101
  • 8
0
votes
0 answers

Aiogram - telegram bot

I'm making inline ban button handlers. The task is this: after pressing the button, the bot expects the admin to write two messages to the chat: telegram_id and the reason, then sent the keyboard, where there will be two buttons: cancel and approve.…
L1dhell
  • 1
  • 1