Is your feature request related to a problem?
Yes. When sending an ephemeral message to a supergroup using ephemeral_message_parameters (so only a specific user sees it), Telegram Bot API returns message_id: 0 along with an ephemeral_message_id (e.g. 29341834).
Currently, there is no way to auto-delete or clear this message after a timeout using deleteMessage:
- Calling
deleteMessage(chat_id, 0) fails with 400: Bad Request: message to delete not found.
- Calling
deleteMessage(chat_id, ephemeral_message_id) also fails with 400: Bad Request: message to delete not found.
Describe the solution you'd like
I would like deleteMessage to support deleting ephemeral messages, either by:
- Allowing
ephemeral_message_id to be passed as the message ID parameter in deleteMessage.
- Or adding an optional parameter to
deleteMessage specifically for ephemeral_message_id.
Describe alternatives you've considered
I considered sending a direct private message to the user instead, but if the user hasn't started a DM with the bot, the API rejects it with 400: Bad Request: bot can't initiate conversation with a user. Sending a standard group message works with deleteMessage, but then all group members see the message instead of only the target user.
Additional context
No response
Is your feature request related to a problem?
Yes. When sending an ephemeral message to a supergroup using
ephemeral_message_parameters(so only a specific user sees it), Telegram Bot API returnsmessage_id: 0along with anephemeral_message_id(e.g.29341834).Currently, there is no way to auto-delete or clear this message after a timeout using
deleteMessage:deleteMessage(chat_id, 0)fails with400: Bad Request: message to delete not found.deleteMessage(chat_id, ephemeral_message_id)also fails with400: Bad Request: message to delete not found.Describe the solution you'd like
I would like
deleteMessageto support deleting ephemeral messages, either by:ephemeral_message_idto be passed as the message ID parameter indeleteMessage.deleteMessagespecifically forephemeral_message_id.Describe alternatives you've considered
I considered sending a direct private message to the user instead, but if the user hasn't started a DM with the bot, the API rejects it with
400: Bad Request: bot can't initiate conversation with a user. Sending a standard group message works withdeleteMessage, but then all group members see the message instead of only the target user.Additional context
No response