Files
symfony-flex-recipes-contrib/andrew-gos.telegram-bot-bundle.1.0.json
T
github-action[bot]andgithub-action[bot] 4b4c6c3481 Update Flex endpoint
2025-10-04 14:20:02 +00:00

98 lines
6.2 KiB
JSON

{
"manifests": {
"andrew-gos/telegram-bot-bundle": {
"manifest": {
"bundles": {
"AndrewGos\\TelegramBotBundle\\AndrewGosTelegramBotBundle": [
"all"
]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
}
},
"files": {
"config/packages/andrew_gos_telegram_bot.yaml": {
"contents": [
"# -----------------------------------------------------------------------------",
"# AndrewGos Telegram Bot Bundle - Default Configuration",
"# -----------------------------------------------------------------------------",
"# This file was generated by the AndrewGos Telegram Bot Bundle recipe.",
"# It provides a solid foundation for your first Telegram bot.",
"#",
"# \u2757\ufe0f YOUR NEXT STEPS:",
"# 1. Set your bot's token in the .env file:",
"# TELEGRAM_BOT_TOKEN=\"123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11\"",
"#",
"# 2. Create the handler and checker classes referenced below, for example:",
"# src/Telegram/Handler/StartHandler.php",
"# src/Telegram/Checker/CommandChecker.php",
"# src/Telegram/Handler/DefaultMessageHandler.php",
"# -----------------------------------------------------------------------------",
"",
"andrew_gos_telegram_bot:",
" bots:",
" # \ud83e\udd16 This is the unique name for your bot.",
" # You'll use this name in console commands, e.g., `php bin/console andrew-gos:telegram-bot:listen default_bot`",
" # default_bot:",
" # \ud83c\udfed The factory defines how the Telegram API client is created.",
" # factory:",
" # 'getUpdates' is a shortcut for the long-polling factory. It's perfect for",
" # getting started quickly with the `listen` command.",
" # For production, you will likely switch to webhooks using the 'default' factory.",
" # method: 'getUpdates'",
" # arguments:",
" # \u2705 Best Practice: Never hardcode secrets!",
" # This reads the token from your .env file.",
" # $token: '%env(string:TELEGRAM_BOT_TOKEN)%'",
"",
" # \ud83d\udd0c Plugins are services that run on EVERY update before handlers.",
" # They are great for logging, analytics, or session management.",
" # Uncomment this section to enable a request logger.",
" # plugins:",
" # - class: App\\Telegram\\Plugin\\RequestLoggerPlugin",
" # arguments:",
" # # This injects the default Symfony logger for the 'telegram' channel.",
" # $logger: '@monolog.logger.telegram'",
"",
" # \ud83d\udd04 Handlers contain the core logic of your bot.",
" # They are checked in order of priority (higher numbers first).",
" # The first handler whose 'checker' passes will be executed.",
" # handlers:",
" # Handler for the '/start' command. It has a high priority.",
" # -",
" # The checker decides if the handler should run for the current update.",
" # checker:",
" # class: App\\Telegram\\Checker\\CommandChecker",
" # arguments:",
" # $command: '/start'",
"",
" # The handler contains the actual logic to execute.",
" # handler: App.Telegram.Handler.StartHandler",
"",
" # Middlewares run after the checker but before the handler.",
" # Useful for authentication, rate limiting, etc.",
" # middlewares:",
" # - App\\Telegram\\Middleware\\UserRateLimiterMiddleware",
"",
" # Higher priority means this handler is checked before others.",
" # priority: 10",
"",
" # A fallback handler for any message not caught by the handlers above.",
" # When a 'checker' is not specified, it defaults to `AnyChecker`,",
" # -",
" # which always passes. This makes it a perfect \"catch-all\".",
" # handler: App\\Telegram\\Handler\\DefaultMessageHandler",
"",
" # A negative priority ensures this runs last.",
" # priority: -10",
""
],
"executable": false
}
},
"ref": "1866f96fbf233b166ba4ed3a5f085e3a64f1efe0"
}
}
}