soumyadeepdas/TbhRichBotPublic · Community Store Listing
Rich Message Demo [TBH]
17 commands0 envUpdated 5d agoCreated Jul 16, 2026
commands/_richFormatting.js
javascript · 58 lines · click line # to share
1/**#command2name: /richFormatting3answer: 4keyboard: 5parse_mode: 6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12const html = `13<h1>Rich Text Formatting</h1>14 15<p>This page demonstrates RichText formatting introduced in Bot API 10.1.</p>16 17<hr/>18 19<h3>Basic Formatting</h3>20<p><b>Bold Text</b></p>21<p><i>Italic Text</i></p>22<p><u>Underlined Text</u></p>23<p><s>Strikethrough Text</s></p>24 25<hr/>26 27<h3>Special Formatting</h3>28<p><mark>Highlighted Text</mark></p>29<p><tg-spoiler>Spoiler Text</tg-spoiler></p>30<p><code>Inline Code</code></p>31 32<hr/>33 34<h3>Scientific Formatting</h3>35<p>H<sub>2</sub>O</p>36<p>X<sup>2</sup></p>37 38<hr/>39 40<h3>Custom Emoji</h3>41<p><tg-emoji emoji-id="5368324170671202286">👍</tg-emoji> Custom Emoji</p>42 43<footer>Bot API 10.1 • RichText Formatting Demo</footer>44`;45 46Api.call("editMessageText", {47 chat_id: chat.chatid,48 message_id: update.callback_query.message.message_id,49 rich_message: { html: html },50 reply_markup: {51 inline_keyboard: [52 [53 { text: "« Home", callback_data: "/start" },54 { text: "Entities »", callback_data: "/richEntities" }55 ]56 ]57 }58});