editMessageCaption method
Future<Map>
editMessageCaption(
{ - dynamic chat_id,
- dynamic message_id,
- dynamic inline_message_id,
- required String caption,
- String? parse_mode = "html",
- List? entities,
- bool? disable_web_page_preview = false,
- Map? reply_markup,
- required int clientId,
- bool? isUseCache,
- Duration? durationCacheExpire,
})
Implementation
Future<Map> editMessageCaption({
dynamic chat_id,
dynamic message_id,
dynamic inline_message_id,
required String caption,
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(caption, parse_mode, entities);
if (inline_message_id is String && inline_message_id.isNotEmpty) {
return await invoke(
"editInlineMessageCaption",
parameters: {
"inline_message_id": inline_message_id,
"reply_markup": replyMarkup(reply_markup),
"caption": pesan,
},
isUseCache: isUseCache,
durationCacheExpire: durationCacheExpire,
clientId: clientId,
extra: extra,
);
} else {
return await invoke(
"editMessageCaption",
parameters: {
"chat_id": chat_id,
"message_id": message_id,
"reply_markup": replyMarkup(reply_markup),
"caption": pesan,
},
isUseCache: isUseCache,
durationCacheExpire: durationCacheExpire,
clientId: clientId,
extra: extra,
);
}
}