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
1
vote
1 answer

VSCode doesn't 'see' Python installed modules for auto import... only manual typing for import

Pylance, and IntelliSense work fine with default modules, let's say, os or datetime or so, but I've installed aiogram (any 'custom' modules have the same issues in VScode) and use some classes from it as here vscode doesn't see where to import it…
OM26R
  • 127
  • 1
  • 9
1
vote
0 answers

How to handle video_note in aiogram?

I could not handle the video_note in aiogram with FMS. Help me what is wrong??? So, I want to save video_note id then send it to other users how else I can do that? Sorry if my question wrong its my first question on stack overflow... async def…
Ilya
  • 11
  • 2
1
vote
0 answers

Telegram Bot UNCLOSED CLIENT

Basically I was doing a small bot for telegram to send pictures from a subreddit, but it gives me an error which I don't know how to fix. Everything where it says (not shown) is something I can't show due to it being something with which anyone…
1
vote
1 answer

Pause sending messages in loop, wait for user tap InlineKeyboardButton

User insert some values. Just for not spamming him with many messages, I want to pause sending them in loop and wait user tap inline button. So how can I pause them and wait for user tap "Next result" button? Code beneath just simplified, but works…
1
vote
0 answers

FSMstate error, cant connect mongo db to aiogram

I'm writing a telegram bot on aiogram and I've decided to use MongoDB as database for the project. Unfortunately I'm stuck on the user balance feature. I need to give user a balance and I need to have a possibility to change it. from aiogram import…
TetSigma
  • 11
  • 2
1
vote
0 answers

How to edit an inline message in aiogram telegrambot

An inline message is sent when the result is displayed inline and should change after 1 second! Can Aiogram use edit_message() @dp.inline_handler() async def inline_echo(inline_query: types.InlineQuery): print(inline_query) text =…
iCoderNet
  • 11
  • 3
1
vote
1 answer

How can I start FastApi and aiogram bot in one event loop?

I have code like this: app = FastAPI() bot = Bot(token=config_data.BOT_TOKEN) dp = Dispatcher(bot) I usually start bot in this way: executor.start_polling(dp) and start FastApi app: uvicorn.run(app) How can I start it in one event loop?
Andrless
  • 11
  • 2
1
vote
1 answer

How to do function only on friday and only one time in aiogram?

Here I have a code, it works. But I want it to work only only one time on friday: import logging from aiogram import Bot, Dispatcher, executor, types from aiogram.types.message import ContentType from aiogram.types import ReplyKeyboardRemove, \ …
1
vote
0 answers

asyncio - Unclosed connection

fuzzer.py import aiohttp import asyncio async def get_page(url=None, extensions=None): with open("wordlist.txt") as file: directories = file.readlines() data = [] async with aiohttp.ClientSession() as session: for…
spot
  • 17
  • 4
1
vote
0 answers

How to stop while loop button when bot receives different data from another button Aiogram

@dp.message_handler() async def starting(message: types.Message): if message.text == "August 27": while True: August() await message.answer(August(),reply_markup=data_change_markup) if message.text == "Change data ": #Here, I…
1
vote
1 answer

aiogram. How to get the id of the message that has already been sent by the bot

The bot sends a message to the telegram channel, how to get the id of the same message from the chat, in order to send a reply to it, thus forming a comment?
DimaFich
  • 23
  • 1
  • 3
1
vote
0 answers

aiogram timeout error on infinite polling

Good day! I am writing a telegram bot and using aiogram library. Everything seems to be working fine when I run my code. However, if I leave the bot running for a while, after some time it throws a timeout error. Can't understand what seems to be…
Sereas
  • 23
  • 4
1
vote
1 answer

How to get phone number if user already shared with AIOgram

# keyboard share_keyboard = types.ReplyKeyboardMarkup(resize_keyboard=True, one_time_keyboard=True) share_button = types.KeyboardButton(text="Share",…
Frank Delan
  • 13
  • 1
  • 5
1
vote
1 answer

unable to create web_app button aiogram

Good afternoon, an update has recently been released in telegram and added web_app buttons. leading to the "site" in the telegram itself, the documentation says that you need to import the script to the page and create a button in the…
Gipo Company
  • 13
  • 1
  • 5
1
vote
0 answers

How to set up Notifications using Aiogram

I'm new to programming and I'm trying to implement function to my Telegram bot, which should check data from database, compare time and send notification if time has come. However I have this type of mistake: DeprecationWarning: There is no current…