Startup bot edits
TelegramBotManager.start() can apply bot edits before update receiving starts.
At the moment this includes startup command menu registration via Telegram setMyCommands.
Configuration
You can configure startup edits in telegram-bot.edit.*.
source values:
null- disable startup command menu registrationcode- collect commands fromBotHandling.command(..., description = "...")config- read commands fromtelegram-bot.edit.commands.definition
blank-description values:
skip- command without description is ignoredfail- throw an exception if any command has blank description
source: code
Add descriptions in handlers:
Notes:
command names are validated (
/+ lowercase letters/digits/underscores, max length 32)description length must be from 1 to 256
optional numeric prefix like
1.is used for sorting and removed from final text
source: config
Define command menu statically:
Keys are command names without leading slash, values are descriptions.
Startup flow
When you call TelegramBotManager.start():
Startup edits are applied (if configured).
Update receiver is started.
If configuration is invalid (for example, source: config without definition), startup fails with an explicit exception.