Answer the question
In order to leave comments, you need to log in
How to send a message with a delay (after a few seconds) using aiogram?
It is necessary that the bot send a message to the user with a delay, for example, 10 seconds after pressing the button, and asynchronously, so that it would send to the user who pressed the button and not send it to the one who did not. How can this be implemented?
Answer the question
In order to leave comments, you need to log in
@iggor-markin
@dp.callback_query_handler(lambda c: c.data == 'test')
async def callback(message: Message):
await asyncio.sleep(10) bot.send_message(
chat_id=message.from_user.id,
reply_markup=test,
text="какой то текст"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question