# telegram.message.edit

Replaces the text (and the inline keyboard) of a message the bot sent

# telegram.message.edit

```
telegram.message.edit --credential TEXT --recipient TEXT --id N --text TEXT [--format text|markdown|html] [--keyboard KEY=TEXT…] → message
```

Replaces the text (and the inline keyboard) of a message the bot sent. Answers `message: { id, recipient, sent_at, edited_at, telegram }` and keeps the payload; a refusal from Telegram delivers `error`.

## Flags

- `--credential` (required): The telegram_bot credential: the bot that sent the message.
- `--recipient` (required): The chat the message is in: its id, or @username of a public channel.
- `--id` (required): The message to edit, e.g. {{ input.message.id }}.
- `--text` (required): The new text.
- `--format`: How --text is read: text (default), markdown (Telegram MarkdownV2) or html.
- `--keyboard`: The new inline buttons, LABEL=DATA, one per row. Repeat for several, or one {{ object }}.
