Telegram Bot Settings
Use the bundled Python CLI to inspect and update Telegram Bot API account-level settings.
This skill is runtime-neutral: it works from Codex, Claude Code, OpenClaw, or any other agent that can read local files and run python3.
Quick start
Run a full snapshot first:
python3 {baseDir}/scripts/telegram_bot_settings.py statusToken resolution
The CLI resolves the bot token in this order:
--tokenTELEGRAM_BOT_TOKEN,BOT_TOKEN, orTG_BOT_TOKEN--token-fileTELEGRAM_BOT_TOKEN_FILE,BOT_TOKEN_FILE,TG_BOT_TOKEN_FILE, orOPENCLAW_TELEGRAM_TOKEN_FILE- Common secret files and dotenv-style files such as
./secrets/telegram-bot-settings.env,./.env.local,./.env, or~/.config/telegram-bot-settings/bot.token
If you want a simple default, store the token in one of those secret locations and run the commands without passing --token each time.
Common tasks
Inspect current settings
python3 {baseDir}/scripts/telegram_bot_settings.py status
python3 {baseDir}/scripts/telegram_bot_settings.py get-name
python3 {baseDir}/scripts/telegram_bot_settings.py get-description
python3 {baseDir}/scripts/telegram_bot_settings.py get-short-descriptionChange public identity
python3 {baseDir}/scripts/telegram_bot_settings.py set-name --text "Northline Utility Bot"
python3 {baseDir}/scripts/telegram_bot_settings.py set-description --text "Workflow and automation bot for Telegram-based operations."
python3 {baseDir}/scripts/telegram_bot_settings.py set-short-description --text "Telegram bot settings helper"
python3 {baseDir}/scripts/telegram_bot_settings.py set-photo ./avatar.png
python3 {baseDir}/scripts/telegram_bot_settings.py remove-photoNotes:
set-photoauto-converts static non-JPEG images to JPEG when Pillow is available.- Add
--animated --main-frame-timestamp 0.0for MPEG4 animated avatars. - Add
--language-code uk(or another code) for localized name/description fields.
Manage commands
python3 {baseDir}/scripts/telegram_bot_settings.py get-commands
python3 {baseDir}/scripts/telegram_bot_settings.py set-commands --commands @commands.json
python3 {baseDir}/scripts/telegram_bot_settings.py delete-commandsManage menu button
python3 {baseDir}/scripts/telegram_bot_settings.py get-menu-button
python3 {baseDir}/scripts/telegram_bot_settings.py set-menu-button --button '{"type":"commands"}'Manage default admin rights
python3 {baseDir}/scripts/telegram_bot_settings.py get-default-admin-rights
python3 {baseDir}/scripts/telegram_bot_settings.py set-default-admin-rights --rights @rights.json
python3 {baseDir}/scripts/telegram_bot_settings.py set-default-admin-rights --clearRaw method escape hatch
Use raw when Telegram adds a method before this wrapper is updated:
python3 {baseDir}/scripts/telegram_bot_settings.py raw getMe
python3 {baseDir}/scripts/telegram_bot_settings.py raw setMyCommands --data @payload.jsonFor file uploads, pass --file field=/path/to/file and reference it via attach://field inside --data.
Guardrails
- Run
statusbefore large edits so you have a clean baseline. - Prefer
@file.jsonfor long payloads instead of fragile shell escaping. - Do not assume every BotFather setting exists in Bot API.
- If the request is about exact method coverage, JSON payload shapes, or what is still BotFather-only, read
references/bot-api-settings.md.