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
5
votes
1 answer

FSM doesn't work when I run aiogram with fastapi

I have a problem with fsm using aiogram with Fastapi. I ran the code from aiogram_fsm_example, but changed the long-polling to the Fastapi implementation. Here's the code I've got: import logging from fastapi import FastAPI, Request import…
oleh
  • 51
  • 4
3
votes
1 answer

How to pass an Asyncio coroutine to a multiprocessing process?

I have developed an application that works well in "asynchronous mode" and performs calculations. When the calculations meet certain criteria, a function of a "Telegram bot" is called to send the results to the bot, while the calculations continue…
3
votes
1 answer

Is it possible to handle reaction events using aiogram?

After scanning the web (myself and using ChatGPT), I didn't find a way of handling the emoji reactions users can react with to my bot's messages. I want to create a feedback mechanism for bot behaviour using intuitive reactions such as like &…
OriGami
  • 33
  • 1
  • 5
3
votes
1 answer

TimeoutError aiogram bot

i have a bot which parses some links given by user. When clients want to parse realy huge amount of links, bot parses them, creates csv file from those links, sends it to user(user can download and view this file) and then raise TimeoutError Cause…
alex-uarent-alex
  • 363
  • 1
  • 10
3
votes
1 answer

Managing Back Buttons In Multi Level Menu - Telegram Bot (Python)

I am currently working on a new project which makes use of the Telegram bot. Yet, I am new to the Telegram bot, and I'm trying hard to learn new things. The project includes creating a multi-level list with displaying buttons that perform a specific…
B A C H A S H
  • 126
  • 1
  • 9
3
votes
1 answer

How can I make bot reply to an audio message?

How can I make aiogram bot reply to an audio message? I have already tried this: if message.Audio.duration <= 60: await message.reply("message")
Mureek
  • 33
  • 3
2
votes
1 answer

How to make multiple selections in the telegram bot keyboard

I am writing a telegram bot using aiogram. Help to implement the code to show the user a message with inline keyboard of 13 buttons and the user has an opportunity to choose 3 options and on the basis of this choice he will get a message in which…
thp22
  • 21
  • 1
2
votes
0 answers

Get id of user who left the reaction and comment post(to send him message) in telegram channel aiogram

How to get user_id who left the reaction or comment the post and send him message?
sokol
  • 21
  • 2
2
votes
0 answers

TelegramAPIError: Bad Gateway (aiogram)

I create a bot that notifies the user at certain times, but from time to time gives this error dispatcher.py [LINE:390] ERROR | 2022-10-03 04:10:16,846 : Cause exception while getting updates. Traceback (most recent call last): File…
Dmitry
  • 21
  • 1
2
votes
0 answers

I can't get a poll results in aiogram

So, How can I can get results in aiogram, Telegram bot. For example, there are 30 quizzes and someone solves these quizzes and at the end bot should send the result: "You solved the question: 30/15". Does anybody know how I can code this?
2
votes
1 answer

AIOGram. How to fix chat_member_handler?

I need my bot to do specific things when an user is joining end exiting a group. First, I write proof-of-concept code: @dp.chat_member_handler() async def user_joined_chat(update: types.ChatMemberUpdated): print('Users changed') But that does…
2
votes
1 answer

Force subscribe to channel to use the bot [aiogram]

I have a simple chat-bot writed with aiogram for receiving messages from users and answering to them. I want to make sure that user is subscribed to a particular channel before he can use my bot. How can I implement that?
Kevin
  • 23
  • 5
2
votes
2 answers

Cannot connect to host api.telegram.org:443 ssl:default

I am writing a telegram bot on the aiogram framework. Everything was good when I run it, but today I am getting error,Cannot connect to host api.telegram.org:443 ssl:default I do not know what's problem. I am using Ubuntu 20.04.2 LTS Here is the…
mirodil
  • 422
  • 2
  • 8
  • 21
2
votes
2 answers

Aiogram Telegram delete messages with links

@dp.message_handler(lambda message: message.entities != [] and message.chat.id) async def delete_messages(message: types.Message): for entity in message.entities: if entity.type in ["url", "text_link"]: await…
Mikuia
  • 21
  • 2
2
votes
0 answers

How to send autosheduled messages to several users in telegram bot

I used the library aioschedule to send autoscheduled messages to concrete users in telegram bot. The logic is: if the column 'alert' in y_data is 1, the alert will be sent to users from the list GOOD_ID. The error is: ERROR:asyncio:Task exception…
1
2 3
28 29