Skip to content

refactor(telegram): derive commands, /help, and the menu from one enum#100

Merged
asiniscalchi merged 1 commit into
mainfrom
refactor/bot-commands-derive
Jun 11, 2026
Merged

refactor(telegram): derive commands, /help, and the menu from one enum#100
asiniscalchi merged 1 commit into
mainfrom
refactor/bot-commands-derive

Conversation

@asiniscalchi

Copy link
Copy Markdown
Owner

A teloxide BotCommands enum is now the single source of truth: parsing (including /cmd@botname handling), the /help text generated from the per-command descriptions, and the command menu registered with Telegram via set_my_commands at startup — so clients show autocomplete for every command and nothing can drift out of sync. The hand-written parsers and the static help/unknown-command strings are gone, and the Help/Unknown variants leave JournalCommand since they are transport concerns handled in the adapter.

A teloxide BotCommands enum is now the single source of truth: parsing
(including /cmd@botname handling), the /help text generated from the
per-command descriptions, and the command menu registered with
Telegram via set_my_commands at startup — so clients show autocomplete
for every command and nothing can drift out of sync. The hand-written
parsers and the static help/unknown-command strings are gone, and the
Help/Unknown variants leave JournalCommand since they are transport
concerns handled in the adapter.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@asiniscalchi asiniscalchi merged commit 6e743d8 into main Jun 11, 2026
2 checks passed
@asiniscalchi asiniscalchi deleted the refactor/bot-commands-derive branch June 11, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant