-
-
Notifications
You must be signed in to change notification settings - Fork 4
TGEditMessage
__SyS__ edited this page Jan 21, 2019
·
2 revisions
TGEditMessage
-
Description
Edits a specified message in a chat sent by the bot itself.
-
Parameters
-
TGBot:
bot
- bot instance id -
TGChatId:
chatid[]
- chat id to which message to be edited -
TGMessage:
messageid
- id of message to be edited -
text[]
- new message -
TGParseMode:
parse_mode
- (optional) parse the message in specified format before editing
-
TGBot:
-
Example
new TGBot:bot = TGConnect("your_bot_token_here"); new TGChatId:chatid[] = "562896556"; TGSendMessage( g_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); TGEditMessage(bot,chatid,messageid,"***edited message***",.parse_mode=MARKDOWN); return 1; }
-
Notes
Bot can only edit it's own message