soumyadeepdas/TbhRichBotPublic · Community Store Listing
Rich Message Demo [TBH]
17 commands0 envUpdated 5d agoCreated Jul 16, 2026
commands/_richEntities.js
javascript · 73 lines · click line # to share
1/**#command2name: /richEntities3answer: 4keyboard: 5parse_mode: 6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12/* Command: /richEntities */13 14const html = `15<h1>Links & Entities</h1>16 17<p>This page demonstrates RichText entity types introduced in Bot API 10.1.</p>18 19<hr/>20 21<h3>Links</h3>22<p><a href="https://core.telegram.org/bots/api">Telegram Bot API</a></p>23<p><a href="https://t.me/BotFather">BotFather</a></p>24 25<hr/>26 27<h3>Email & Phone</h3>28<p><a href="mailto:user@example.com">user@example.com</a></p>29<p><a href="tel:+1234567890">+1 234 567 890</a></p>30 31<hr/>32 33<h3>User Mentions</h3>34<p>@username</p>35<p><a href="tg://user?id=${user.telegramid}">User Mention by ID</a></p>36 37<hr/>38 39<h3>Social Entities</h3>40<p>#Telegram</p>41<p>#BotAPI</p>42<p>$BTC</p>43<p>$TON</p>44 45<hr/>46 47<h3>Bot Commands</h3>48<p>/start</p>49<p>/help</p>50<p>/settings</p>51 52<hr/>53 54<h3>Automatic Detection</h3>55<p>https://telegram.org support@telegram.org @BotFather #Telegram $TON /start</p>56 57<footer>Bot API 10.1 • RichText Entities Demo</footer>58`;59 60Api.call("editMessageText", {61 chat_id: chat.chatid,62 message_id: update.callback_query.message.message_id,63 rich_message: { html: html },64 reply_markup: {65 inline_keyboard: [66 [67 { text: "« Formatting", callback_data: "/richFormatting" },68 { text: "Home", callback_data: "/start" },69 { text: "Date & Time »", callback_data: "/richDateTime" }70 ]71 ]72 }73});