Skip to main content

Bot command

A bot command is a Telegram message that starts with a forward slash — optionally followed by @botusername — which Telegram's clients recognize and offer to users as a tappable action rather than treating as ordinary text. Autogram's own bot answers two: /start, which carries the verification code from a Link Telegram deep link and binds your Telegram account to your Autogram account, and /language, which lets you switch the language the bot replies in without leaving Telegram.

The slash convention

A command is just a message whose first word begins with /, so a bot has to parse it out of ordinary message text like any other message — Telegram does no server-side interpretation of what a slash-prefixed word means. In a group or channel, a command is sent with the bot's username appended (/start@YourBot), because more than one bot might share the chat and the client needs to know which one a tap was meant for. Autogram's parser strips that suffix and compares only the bare command.

/start and the payload it carries

/start is the one command every Telegram bot receives specially: it fires when someone opens a t.me/<bot>?start=<payload> deep link, with everything after the equals sign arriving as the command's argument. Autogram uses this to bind an account — the payload is a short-lived verification code minted when you click Link Telegram in the browser, and redeeming it writes your Telegram user id onto your Autogram account. A bare /start with no payload is what Telegram's own START button sends, and Autogram answers it with a welcome message rather than silence.

/language and its suffix form

/language is a second, ordinary command with no special Telegram handling: sent alone it lists the available languages, and sent with a suffix — /language_en, /language_uk, /language_ru — it switches the bot's reply language directly, without opening a menu or leaving Telegram. It exists as a command rather than a tappable button because a button press arrives as a different kind of update Autogram's webhook does not subscribe to, while a slash command rides the same message updates the bot already listens for.

Put these concepts to work

Automate your Telegram publishing with AI content, quality scoring, and smart scheduling.