soumyadeepdas/TbhRichBotPublic · Community Store Listing

Rich Message Demo [TBH]

ProfileTelegram
17 commands0 envUpdated 5d agoCreated Jul 16, 2026
Back to folder

commands/_richQuotes.js

javascript · 96 lines · click line # to share

1/**#command2name: /richQuotes3answer: 4keyboard: 5parse_mode: 6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12const html = `13<h1>Quotes & References</h1>14 15<p>This page demonstrates quotation and reference blocks introduced in Bot API 10.1.</p>16 17<hr/>18 19<h3>Standard Block Quote</h3>20<blockquote>The only way to do great work is to love what you do.<cite>Steve Jobs</cite></blockquote>21 22<hr/>23 24<h3>Multi-line Quote</h3>25<blockquote>Success is not final,<br/>Failure is not fatal,<br/>It is the courage to continue that counts.<cite>Winston Churchill</cite></blockquote>26 27<hr/>28 29<h3>Pull Quote</h3>30<aside>Simplicity is the ultimate sophistication.<cite>Leonardo da Vinci</cite></aside>31 32<hr/>33 34<h3>Quote With Citation</h3>35<blockquote>Programs must be written for people to read, and only incidentally for machines to execute.<a href="#ref1">[1]</a><cite>Harold Abelson</cite></blockquote>36 37<hr/>38 39<h3>Multiple References</h3>40<p>Rich Messages support multiple references in a document <a href="#ref1">[1]</a> <a href="#ref2">[2]</a> <a href="#ref3">[3]</a></p>41 42<hr/>43 44<h3>References Inside Quotes</h3>45<blockquote>Knowledge is power.<a href="#ref2">[2]</a><cite>Francis Bacon</cite></blockquote>46 47<hr/>48 49<h3>Expandable Quote Collection</h3>50<details>51<summary>Click to View More Quotes</summary>52<blockquote>Stay hungry, stay foolish.<cite>Steve Jobs</cite></blockquote>53<blockquote>First, solve the problem. Then, write the code.<cite>John Johnson</cite></blockquote>54<aside>Talk is cheap. Show me the code.<cite>Linus Torvalds</cite></aside>55</details>56 57<hr/>58 59<h3>Nested Quotations</h3>60<blockquote>61The outer quotation begins here and demonstrates a standard block quotation.62<blockquote>This is a quotation nested inside another quotation.<cite>Inner Author</cite></blockquote>63The outer quotation continues after the nested quotation.<cite>Outer Author</cite>64</blockquote>65 66<hr/>67 68<h3>Reference Definitions</h3>69<tg-reference name="ref1">Structure and Interpretation of Computer Programs by Harold Abelson and Gerald Jay Sussman.</tg-reference>70<tg-reference name="ref2">Meditationes Sacrae by Francis Bacon.</tg-reference>71<tg-reference name="ref3">Telegram Bot API 10.1 Rich Message Documentation.</tg-reference>72 73<hr/>74 75<h3>Reference Navigation</h3>76<p><a href="#ref1">Jump to Reference 1</a></p>77<p><a href="#ref2">Jump to Reference 2</a></p>78<p><a href="#ref3">Jump to Reference 3</a></p>79 80<footer>Bot API 10.1 • Quotes & References Demo</footer>81`;82 83Api.call("editMessageText", {84  chat_id: chat.chatid,85  message_id: update.callback_query.message.message_id,86  rich_message: { html: html },87  reply_markup: {88    inline_keyboard: [89      [90        { text: "« Lists", callback_data: "/richLists" },91        { text: "Home", callback_data: "/start" },92        { text: "Tables »", callback_data: "/richTables" }93      ]94    ]95  }96});