Delete Outgoing Message Sent By Telegram Bot (telegram, Python)
i am stuck in my code as i do not know how to input/derive the message_id of the outgoing message forwarded by my bot. Background: This is just a part of my code which i would sub
Solution 1:
update.message.reply_text("Please delete")
must be a variable and, then, you'll be able to context.bot.deleteMessage
the message_id
of that. Just like this:
must_delete = update.message.reply_text("Please delete")
context.bot.deleteMessage (message_id = must_delete.message_id,
chat_id = update.message.chat_id)
Give it a try and let me know if this worked for you!!
Post a Comment for "Delete Outgoing Message Sent By Telegram Bot (telegram, Python)"