Resumen
Qué controla este paquete en el runtime
Bots adds a multi-platform messaging runtime to xtaskjs. It uses decorated gateway classes, adapter registration, and lifecycle-managed dispatch so bot workflows stay DI-friendly and consistent with the rest of the framework.
Qué ofrece
- BotGateway(), OnCommand(), OnMessage(), and OnCallbackQuery() declare bot handlers on DI-managed classes.
- BotsModule registers platform adapters such as Telegram, Slack, and WhatsApp in a single runtime.
- Injectable services can publish messages and inspect runtime adapter state through bot service tokens.
- Lifecycle integration starts and stops bot adapters together with application bootstrap and shutdown.
Cómo encaja
- Pairs with @xtaskjs/security in webhook scenarios where signed payloads and protected audit routes are required.
- Uses @xtaskjs/config in upstream samples for adapter credentials and runtime tuning.
- Demonstrated by samples 26-bots_app and 27-bots_webhook_security_app.