Welcome and menu
Reply to /start with a message and a simple keyboard.
Bot.sendMessage("Welcome! Choose an option below.");
Bot.sendKeyboard("About, Help", "What would you like to know?");
Browser demo · Telegram Bot API
Connect a bot you control, select an example, then send /start in Telegram. The demo polls only while this page stays open.
1. Create or choose a bot
It takes about two minutes. The bot and token you create here can be used later in Bots.Business. Use a separate test bot so you do not interrupt a live project.
Open @BotFather ↗ in Telegram.
Send /newbot, then choose its display name and a username ending in bot.
Copy the token BotFather sends you. Read Telegram's step-by-step guide ↗
2. Pick a small pattern
These are BJS equivalents based on the Bots.Business Bot functions guide ↗. This page runs a fixed browser adapter, not the full hosted BJS runtime.
Reply to /start with a message and a simple keyboard.
Bot.sendMessage("Welcome! Choose an option below.");
Bot.sendKeyboard("About, Help", "What would you like to know?");
Ask for a name, then keep it for this browser session.
// /start
Bot.sendMessage("What is your name?");
// /save_name (after the reply)
User.setProp("name", message, "string");
Bot.sendMessage("Nice to meet you, " + message);
Offer two inline buttons and react to the callback.
Bot.sendInlineKeyboard(
[
{ title: "Build", command: "/build" },
{ title: "Explore", command: "/explore" }
],
"Which path would you like to try?"
);