Answer the question
In order to leave comments, you need to log in
How to find message.message.message_id?
The bot should delete its previous message after the user's response.
But an error occurs:
AttributeError: 'Message' object has no attribute 'message'
I tried to change something, but the above error comes out or:
aiogram.utils.exceptions.MessageToDeleteNotFound: Message to delete not found
What can I do?
@dp.message_handler(content_types=["text"], state="waitText")
async def result(message: types.Message, state: FSMContext):
await bot.delete_message(message.from_user.id, message.message.message_id)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question