version: 2.1.3
editMessageText
Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.
Parameters
chat_id | int | string | Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format @channelusername) | Optional |
message_id | int | Required if inline_message_id is not specified. Identifier of the message to edit | Optional |
inline_message_id | string | Required if chat_id and message_id are not specified. Identifier of the inline message | Optional |
text | string | New text of the message, 1-4096 characters after entities parsing | Yes |
parse_mode | string | Mode for parsing entities in the message text. See formatting options for more details. | Optional |
entities | Array of MessageEntity | A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode | Optional |
disable_web_page_preview | bool | Disables link previews for links in this message | Optional |
reply_markup | InlineKeyboardMarkup | A JSON-serialized object for an inline keyboard. | Optional |
token | String | You can use this method on another bot with specify this parameter | Optional |
return_array | Boolean | Specify the result type , if pass true results will be array otherwise will be object | Optional |
forgot | Boolean | You can set to not receive request result, dont set it or pass null for turn it off | Optional |
answer | Boolean | You can set to answer to webhook, dont set it or pass null for turn it off | Optional |
Method errors
ErrorName | description |
---|---|
required parameters not found | required parameter for this method is not founded. you can see them in log |
answer mode not allowed | you can use answer mode only once for each webhook update and you already did |
answer mode not allowed bc multi | you can't use answer mode when multi is on |
Method examples
$this->editMessageText(['chat_id' => int | string, 'message_id' => int, 'inline_message_id' => string, 'text' => string, 'parse_mode' => string, 'entities' => Array of MessageEntity, 'disable_web_page_preview' => bool, 'reply_markup' => InlineKeyboardMarkup]);
$this->editMessageText(['text' => string]);
Method alices
editmessagetext
edittext