MCPcopy Index your code
hub / github.com/antirez/botlib / botEditMessageText

Function botEditMessageText

botlib.c:468–488  ·  view source on GitHub ↗

Send a message to the specified channel, optionally as a reply to a * specific message (if reply_to is non zero). * Return 1 on success, 0 on error. */

Source from the content-addressed store, hash-verified

466 * specific message (if reply_to is non zero).
467 * Return 1 on success, 0 on error. */
468int botEditMessageText(int64_t chat_id, int message_id, sds text) {
469 char *options[10];
470 int optlen = 5;
471 options[0] = "chat_id";
472 options[1] = sdsfromlonglong(chat_id);
473 options[2] = "message_id";
474 options[3] = sdsfromlonglong(message_id);
475 options[4] = "text";
476 options[5] = text;
477 options[6] = "parse_mode";
478 options[7] = "Markdown";
479 options[8] = "disable_web_page_preview";
480 options[9] = "true";
481
482 int res;
483 sds body = makeGETBotRequest("editMessageText",&res,options,optlen);
484 sdsfree(body);
485 sdsfree(options[1]);
486 sdsfree(options[3]);
487 return res;
488}
489
490/* This function should be called from the bot implementation callback.
491 * If the bot request has a file (the user can see that by inspecting

Callers 1

handleRequestFunction · 0.85

Calls 3

sdsfromlonglongFunction · 0.85
makeGETBotRequestFunction · 0.85
sdsfreeFunction · 0.85

Tested by

no test coverage detected