2

Is there a way for me to know if the message send by my bot to a channel was deleted before i delete that message using deleteMessage method in Bot API in Telegram

delete_message(channel_ID,message_ID) returns true even if the message was already deleted . Is there a way to know if the message was already deleted

https://core.telegram.org/bots/api#deletemessage

(This is an advertisement bot so i don't want admins deleting the message until i delete it)

Any suggestions will be helpful

I'm new to telegram API

  • you can try to delete message if get TelegramError in detail you can see, also with telethon you can try to get message and if it was deleted you will get "message not found" – mujad Sep 07 '20 at 11:44
  • Deleting message wont give an error if it was already deleted but we can use getMessages and check for errors – Rahul Anand Sep 07 '20 at 21:19

0 Answers0