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

I want to run the function in the bot again if the condition does not match

I have this func: @dp.message_handler(state=StateInfo.user_answer) async def reset_bot(message: types.Message, state: FSMContext): await state.reset_state(True) if message.text == 'Send new task': await start_uma(message) else: …
-1
votes
1 answer

What is WEBAPP_HOST in web hook?

I'm trying to deploy my Telegram Bot on hosting. The bot was written in python, aiogram. Firstly, for a test I tried to deploy simple echo bot. According to aiogram docs: WEBHOOK_HOST = 'https://your.domain' # Here I entered my…
-1
votes
1 answer

how to make a field equal to quantity of certain user's rows in the current table?

I'm developing a telegram bot. So i have three tables in my database: Users - stores information about users. fields: user: stores user's telegram id. it needs to assign a record to the user first name, last name, etc Notes - stores user's notes.…
pizhlo
  • 107
  • 6
-1
votes
1 answer

Inline buttons doesnt work in Aiogram Telegram Bot

Im trying to get a random number while clicking inline buttons. Im getting a message with buttons, but when i click on them nothing happends — i just see a small clock in the button. Here are my handlers: from loader import dp from random import…
Michael
  • 3
  • 2
-1
votes
1 answer

Why telegram-bot on Python with Webhooks can't process messages from many users simultaneously unlike a bot with Long Polling?

I use aiogram. Logic of my bot is very simple - he receive messages from user and send echo-message after 10 seconds. This is a test bot, but in general, I want to make a bot for buying movies with very big database of users. So, my bot must be able…
Tomas Angelo
  • 63
  • 1
  • 6
-1
votes
1 answer

How convert int to BigInteger (Python)

How do I convert int to BigInteger in Python? I can't find anything like this on the net for python. I need to convert int to BigInteger in order to compare via Sqlalchemy ORM with the value in the database (telegram_id are registered via models…
-1
votes
2 answers

Cant send message in aiogram

I have an id from a group chat, but when I try to send a message there, I get this error: Traceback (most recent call last): File "D:\github\repositories\python-bot\venv\lib\site-packages\aiogram\dispatcher\dispatcher.py", line 415, in…
LZLZZ
  • 1
  • 1
-1
votes
1 answer

Can't parse entities: unexpected end tag at byte offset 0

i dont known, pls help async def getcatalog(message: types.message): if catalog.find_one({"type": 0}) is None: await message.answer('К сожалению, товаров нет в наличии') else: inline_kb = types.InlineKeyboardMarkup() …
-1
votes
1 answer

If there is a user session in aiogram?

I am making a telgram bot on python with module aiogram I wanna store some custom data on user side\ If there is a user session in aiogram?
-1
votes
2 answers

I want to write a timer for telegram-bot with python. The bot gets "time" from user's msg (str). How can I convert "time" from msg to (int) type?

I wrote this code and I need to get "local time" from user's message (string type). But I need this like integer to set timer. There is TypeError in "local_time = int(msg.from_user.id, msg.text)" How can I fix it? from aiogram import…
LogDog
  • 3
  • 3
-2
votes
0 answers

Django: signal doesn't work well with ForeignKey

models.py from django.db import models class Post(models.Model): text = models.TextField() approved = models.BooleanField(default=False) group = models.ForeignKey('bot_users.BotUserGroup', on_delete=models.SET_NULL, null=True,…
-2
votes
1 answer

What am i doing wrong in python bot?

I don't understand what is my mistake. Can someone show me the correct code My code: @dp.message_handler(content_types=['text']) async def Text(update): dl = downloader.tiktok_downloader() global last_use meseg = update.message.text …
Alex
  • 3
  • 2
-2
votes
1 answer

The telegram bot does not work(pyQiwi or aiogram)

Hello everyone I wrote a bot for a freelance tutorial order, the bot responds to messages, but there is a problem with payment, after entering the amount of replenishment, the bot does not respond, maybe I made a mistake somewhere? main.py code …
Mr. Bait
  • 23
  • 5
-2
votes
1 answer

I wrote the battle function in the bot and it will then work or not. How do I fix this?

I wrote a bot on aiogram, but it doesn't work the way I need it to. It does not save data to the database from time to time. Checked by the sqlite studio utility. after I wrote the algorithm I confirm it db.commit(), but the data is somehow not…
-2
votes
1 answer

How to make an asynchronous time counter/trigger?

I am writing a telegram bot using aiogram. The bot will be used by a lot of people and the bot has an order module. The task of this module is to create orders that must be closed on time. For example, the bot requests the date and time the order…
loldude
  • 1
  • 2
1 2 3
28
29