| name | telegram-bot |
| description | Use when changing Telegram bot commands, message handling, menus, callbacks, notifications, or Telegram integration in Telegram Home Bot. |
Telegram Bot Skill
Use this skill for Telegram integration changes in Telegram Home Bot.
Project Context
The project uses Telegram bot integration for home automation commands, notifications, Wake-on-LAN, weather, and feature menus.
Important areas:
integrations.telegram
integrations.telegram.consume
integrations.telegram.send
integrations.telegram.menu
services.messages
services.commands
services.UserValidatorService
Rules
- Validate user access before executing Telegram commands.
- Keep Telegram message handling thin.
- Put business logic into services.
- Keep menu and callback logic readable and explicit.
- Use existing message formatting and i18n services where possible.
- Do not hardcode user-facing text if the project already uses message bundles.
- Do not log Telegram tokens, chat IDs, or user-sensitive data.
- Respect
integrations.telegram.enabled / TELEGRAM_ENABLED.
- Keep mock sender support for local development and tests.
Message Handling Flow
Expected flow:
- Receive update.
- Validate user.
- Parse command or callback.
- Delegate to service.
- Format response.
- Send response through Telegram sender.
Checklist
When adding a new Telegram command:
- Add command parsing or callback handling.
- Check authorization.
- Add business logic in a service.
- Add response formatting.
- Add i18n message keys if needed.
- Add tests where practical.
- Verify behavior when Telegram integration is disabled.
Callback Menus
- Keep callback data short and stable.
- Avoid putting sensitive data into callback payloads.
- Prefer explicit callback prefixes for feature areas.
- Handle unknown or outdated callbacks gracefully.
Notifications
- Avoid duplicate notifications.
- Keep notification text concise.
- Include enough context for the user to act.
- Do not block scheduled jobs on Telegram send failures unless required.