Sakib1467/TBLWebappBotPublic · Bot Template

AIThis bot demonstrates Telegram WebApp integration by providing both inline and keyboard buttons that open a mini app. The /start command sends two messages with buttons to launch the web app, while the WebApp command renders an HTML page. It also handles inline queries with a test article response and processes web_app_data from the mini app, displaying the received button text and data back to the user. The bot includes two HTML files: one is a Vue.js-based demo mini app with Telegram theme support, and the other is a wallpaper customization tool using the TWallpaper library.

Utilitywebappminiappinline-modeweb-app-datavuewallpaper
ProfileTelegram
6 commands0 envUpdated 8d agoCreated Aug 30, 2026
Back to folder

commands/_start.js

javascript · 53 lines

Raw
1/**#command2name: /start3answer: 4keyboard: 5parse_mode: 6aliases: 7allow_only_group: false8need_reply: false9is_web: 010#command**/11 12//Command: /start13 14// get the url for the webapp — you can see url by doing inspect see at line 4215let webapp = Webapp.getUrl("WebApp");16 17// Inline Button Style18Api.sendMessage({19  text: `<tg-emoji emoji-id="5472427507842032538">👋</tg-emoji> <b>Telegram WebApp Demo</b>\n\nTap below to open via <b>inline button</b>:`,20  parse_mode: "HTML",21  reply_markup: {22    inline_keyboard: [23      [{24        text: "Open Demo Miniapp",25        icon_custom_emoji_id: "5890925363067886150",26        style: "primary",27        web_app: {28          url: webapp29        }30      }]31    ]32  }33})34 35// Keyboard Button Style36Api.sendMessage({37  text: `<tg-emoji emoji-id="5325881587319982195">👇</tg-emoji> Or open via <b>keyboard button</b>:`,38  parse_mode: "HTML",39  reply_markup: {40    resize_keyboard: true,41    keyboard: [42      [{43        text: "Open Demo MiniApp",44        icon_custom_emoji_id: "5890925363067886150",45        style: "success",46        web_app: {47          url: webapp48        }49      }]50    ]51  }52})53// Bot.inspect(webapp) // get the webapp url