Skip to content

Message delete #1626

Answered by MKRhere
Jexly0x asked this question in Q&A
May 22, 2022 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Bots can't see message deletion. Perhaps as a workaround, you can reply to the message you want to delete with /delete, and have the bot catch the update and delete the replied message and the /delete message. This way the bot knows which message to delete.

Now, propagating it to the other chat is a bit more involved. You'll want to store a mapping of channelMessage -> chatMessage in your database and use that to delete the chatMessage when the bot receives /delete in reply to a channelMessage.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Jexly0x
Comment options

@MKRhere
Comment options

@Jexly0x
Comment options

Answer selected by Jexly0x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants