Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions site/docs/guide/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,17 @@ bot.command("start", async (ctx) => {
});
});
```

## Editing Messages

You can edit a message sent by your bot like this:

```ts
bot.command("think", async (ctx) => {
const msg = await ctx.reply("Thinking...");

const newText = await getSomeNewText();

await ctx.api.editMessageText(ctx.chatId, msg.message_id, newText);
});
```
Comment thread
KnorpelSenf marked this conversation as resolved.
Loading