-
-
Notifications
You must be signed in to change notification settings - Fork 4
TGDeleteMessage
__SyS__ edited this page Jan 21, 2019
·
2 revisions
-
Description
Deletes a specified message in a chat
-
Parameters
-
Example
new TGBot:bot = TGConnect("your_bot_token_here"); new TGChatId:chatid[] = "562896556";//replace with your chatid TGSendMessage( bot, chatid, "`markdown text` ***bold*** _italic_ 123", .parse_mode=MARKDOWN, .callback="SendingMessage" ); forward SendingMessage(TGBot:bot,TGMessage:messageid); public SendingMessage(TGBot:bot,TGMessage:messageid) { new TGChatId:chatid[12]; TGCacheGetChatId(chatid); TGDeleteMessage(bot,chatid,messageid); return 1; }
-
Notes
- A message can only be deleted if it was sent less than 48 hours ago.
- Bots can delete outgoing messages in private chats, groups, and supergroups.
- If the bot is an administrator of a group, it can delete any message there.
- If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.