editEphemeralMessageCaption()
Use this method to edit the caption of an ephemeral message. Note that it is not guaranteed that the user will receive the message edit event, especially if they are offline. On success, True is returned.
parameters
| parameter | type | required | description |
|---|---|---|---|
chat_id | number | string | required | Unique identifier for the target chat or username of the target supergroup in the format @username |
receiver_user_id | number | required | Identifier of the user who received the message |
ephemeral_message_id | number | required | Identifier of the ephemeral message to edit |
caption | string | optional | New caption of the message, 0-1024 characters after entities parsing |
parse_mode | string | optional | Mode for parsing entities in the message caption. See formatting options for more details. |
caption_entities | MessageEntity[] | optional | A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode |
show_caption_above_media | boolean | optional | Pass True if the caption must be shown above the message media. Supported only for animation, photo and video messages. |
reply_markup | InlineKeyboardMarkup | optional | A JSON-serialized object for an inline keyboard |
returns
boolean
usage in yaebal
editEphemeralMessageCaption is directly typed on Api — call it straight off bot.api.
import type { EditEphemeralMessageCaptionParams } from "@yaebal/types";
await bot.api.editEphemeralMessageCaption({
chat_id: 123456789,
receiver_user_id: 1,
ephemeral_message_id: 1,
} satisfies EditEphemeralMessageCaptionParams);context shortcut
also available as ctx.editEphemeralMessageCaption() on
17
context types — see @yaebal/contexts.
/** Use this method to edit the caption of an ephemeral message. Note that it is not guaranteed that the user will receive the message edit event, especially if they are offline. On success, *True* is returned. */
ctx.editEphemeralMessageCaption(params: Omit<EditEphemeralMessageCaptionParams, "chat_id">)official Bot API docs: https://core.telegram.org/bots/api/#editephemeralmessagecaption