0

I know that the alert-message can only be received if the user clicks on the inline button and sends the callback data to the bot. But I want an alarm message to be sent if, say, I wrote the wrong message in bot's chat. In this case, my messages are processed by the message handler and the callback data is not sent anywhere. Is it possible to send an alert-message just like that, without first sending a callback data

I tried to write directly:

@dp.message_handler
async def Answer (message: Message)
     await message.answer('text', show_alert=True)

but it didn't work

1 Answer 1

0

no, since the script sends these messages by the message 'id', and it is only available when the button (callback) is pressed. in any other case you only have a 'message_id', you can't send it

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.