From c1858143750a11ae58b9acf3acd1571c01447353 Mon Sep 17 00:00:00 2001 From: Bubu <2005901+BubuMVX@users.noreply.github.com> Date: Mon, 14 Oct 2024 20:30:42 +0200 Subject: [PATCH] Update documentation on how to use message entities --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 8ab5b78..73874ed 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,23 @@ const menuTemplate = new MenuTemplate((ctx) => { }); ``` +### Can I use entities or `grammyjs/parse-mode` in the message body? + +Yes, you can pass the option `entities`. + +This will be resolved automatically to`caption_entities` if you send a `media` message. + +```ts +const menu = new MenuTemplate(async () => { + const message = fmt`${bold(underline('Hello world!'))}` + + return { + text: message.text, + entities: message.entities, + }; +}); +``` + ### Can the menu body be some media? The menu body can be an object containing `media` and `type` for media.