Telegram

What are Telegram bot commands, and why won't my list update?

A Telegram bot command is one of the slash keywords a bot publishes so people can see what it does. They appear in the menu beside the message box, and Telegram's own definition is the plain one: "A command is a simple /keyword that tells the bot what to do."

The part worth a page is not what they are but which ones a given person sees, because that is decided by a precedence rule rather than by a single list, and it is the usual reason a change appears not to have taken effect.

What can a command look like?

Telegram's format rules are strict and short. Commands "must always start with the / symbol and contain up to 32 characters. They can use Latin letters, numbers and underscores, though simple lowercase text is recommended for a cleaner look."

So no spaces, no hyphens, no accented characters, and nothing longer than 32 characters including the slash's keyword. A command outside those rules is not a shorter command; it is not a command.

Three are expected of everyone. Telegram asks that all developers support /start, /help and /settings where applicable, so that people meet a consistent set whichever bot they open. Treating those three as reserved is a good habit even where your bot does something unrelated with the same word.

How are commands set?

Two ways, and they are the same underlying list.

You can set them conversationally through Telegram's own @BotFather, which is the usual route while building. Or you can set them from code with the Bot API method setMyCommands, which takes the list as an array, accepts at most 100 commands, and takes an optional scope that "Defaults to BotCommandScopeDefault".

The API route is the one to use once anything about your commands depends on state, because it can be called whenever that state changes rather than only when a human remembers to.

Why does my command list not change?

Because scopes do not merge, and a narrower list you set earlier is still winning.

Telegram's model is that a bot "is able to show different commands to different users and groups", controlled by scopes, of which there are seven:

  • BotCommandScopeDefault
  • BotCommandScopeAllPrivateChats
  • BotCommandScopeAllGroupChats
  • BotCommandScopeAllChatAdministrators
  • BotCommandScopeChat
  • BotCommandScopeChatAdministrators
  • BotCommandScopeChatMember

And the resolution rule is a single sentence in Telegram's documentation, under "Determining list of commands": "The first list of commands which is set is returned."

That is the whole answer to the most common complaint. The lists are not combined. Telegram walks an ordered sequence from the most specific scope to the least, and stops at the first one that is set.

In a private chat with the bot, the order Telegram walks is: botCommandScopeChat with a matching language_code, then botCommandScopeChat, then botCommandScopeAllPrivateChats with a language code, then botCommandScopeAllPrivateChats, then botCommandScopeDefault with a language code, then botCommandScopeDefault.

In groups and supergroups the sequence is longer, running from botCommandScopeChatMember through the administrator-only scopes and botCommandScopeAllGroupChats before it reaches the default.

One thing inverts between the two, and it is the trap. In a private chat botCommandScopeChat is the most specific scope there is. In a group it is not: both botCommandScopeChatAdministrators and its language variant sit above it, so an administrators list you set once beats the per-chat list for those people, in the one place you would expect per-chat to win.

So if you set a per-chat list during testing and later change the default, that one chat keeps showing the old list forever. The fix is to clear the narrower scope rather than to keep editing the broader one, and the same applies to a language_code variant, which sits above its own scope in the order.

What should I actually do?

Three habits follow from the precedence rule.

  1. Set the default scope first and change it last. It is the fallback everyone reaches when nothing narrower exists, so it is the list most of your users see.
  2. Use a narrow scope deliberately, not for convenience. Anything you set at chat or member level is invisible to you afterwards unless you go looking, and it silently overrides everything broader.
  3. When a list looks stale, enumerate scopes rather than re-setting the one you edited. The one that is winning is usually not the one you have been changing.

Does Bird support Telegram?

For verification codes, yes, and for nothing described on this page.

Bird Verify delivers one-time passcodes over Telegram alongside email, SMS and WhatsApp, using Telegram's own verified notification account rather than a bot you run. That is a different mechanism from a bot with a command menu: there is no bot to register, no commands to publish, and nothing on this page applies to it. If passcode delivery is what brought you here, Bird Verify covers the channels and how they fall back.

Everything above is Telegram's own platform behaviour. Their bot features guide and the Bot API reference are the source and the place to check for changes.

Construa na mesma rede.

Uma chave de API de teste é sua imediatamente. A produção é desbloqueada quando adicionar um método de pagamento e verificar um remetente.

Comece com um canal.
Adicione os outros quando estiver pronto.

Uma chave API de teste é sua imediatamente. A produção é desbloqueada quando você adiciona um método de pagamento e verifica um remetente.

Usa Claude Code, Cursor ou Codex? Copie um prompt de configuração e o seu agente instala o Bird CLI e as skills por si. Escolha o seu:

Cursor