editMessageMedia

Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.

Arguments
Name Type Description Required
media inputMedia | array | stdClass A JSON-serialized object for a new media content of the message yes
chat_id int | string | null Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername) no
message_id int | null Required if inline_message_id is not specified. Identifier of the message to edit no
inline_message_id string | null Required if chat_id and message_id are not specified. Identifier of the inline message no
reply_markup inlineKeyboardMarkup | null | stdClass A JSON-serialized object for a new inline keyboard. no
token string | null You can use this method on another bot with specify this parameter no
forgot bool | null You can set to not receive request result, dont set it or pass null for turn it off no
answer bool | null You can set to answer to webhook, dont set it or pass null for turn it off no

Output : BPT\types\message | bool | BPT\types\responseError

Static or normal : Static

Examples :

request::editMessageMedia(media: InputMedia, chat_id: int | string | null, message_id: int | null, inline_message_id: string | null, reply_markup: InlineKeyboardMarkup | null, token: String | null, forgot: Boolean | null, answer: Boolean | null);
request::editMessageMedia(['media' => InputMedia, 'chat_id' => int | string | null, 'message_id' => int | null, 'inline_message_id' => string | null, 'reply_markup' => InlineKeyboardMarkup | null, 'token' => String | null, 'forgot' => Boolean | null, 'answer' => Boolean | null]);
request::editMessageMedia(media: InputMedia);
request::editMessageMedia(['media' => InputMedia]);