editMessageText method
editMessage text return result
{
}
Implementation
Future<Map> editMessageText({
dynamic chat_id,
dynamic message_id,
dynamic inline_message_id,
required String text,
String? parse_mode = "html",
List? entities,
bool? disable_web_page_preview = false,
Map? reply_markup,
required int clientId,
String? extra,
bool? isUseCache,
Duration? durationCacheExpire,
}) async {
entities ??= [];
var pesan = parseMode(text, parse_mode, entities);
if (inline_message_id is String && inline_message_id.isNotEmpty) {
return await invoke(
"editInlineMessageText",
parameters: {
"inline_message_id": inline_message_id,
"reply_markup": replyMarkup(reply_markup),
"input_message_content": {
'@type': "inputMessageText",
"text": pesan,
"disable_web_page_preview": disable_web_page_preview,
"clear_draft": false,
}
},
isUseCache: isUseCache,
durationCacheExpire: durationCacheExpire,
clientId: clientId,
extra: extra,
);
} else {
return await invoke(
"editMessageText",
parameters: {
"chat_id": chat_id,
"message_id": message_id,
"reply_markup": replyMarkup(reply_markup),
"input_message_content": {
'@type': "inputMessageText",
"text": pesan,
"disable_web_page_preview": disable_web_page_preview,
"clear_draft": false,
}
},
isUseCache: isUseCache,
durationCacheExpire: durationCacheExpire,
clientId: clientId,
extra: extra,
);
}
}