BotNetwork

Registering bot commands with setMyCommands

setMyCommands controls the in-client command menu; scopes decide where each command appears.

Guide1 min readUpdated

Why it matters

SetMyCommands controls the in-client command menu; scopes decide where each command appears.

Practical steps

  1. Call setMyCommands after each deploy that changes commands
  2. Use BotCommandScopeDefault plus group/private scopes as needed
  3. Pass language_code when you ship localized menus
  4. Remove obsolete entries with deleteMyCommands
  5. Confirm with getMyCommands in staging

Watch out for

  • Copy-pasting outdated snippets for telegram setmycommands without re-reading current official docs.
  • Shipping telegram setmycommands to production without a staging rehearsal and a documented rollback.

Related comparisons and tools