From ea75e5e0b43ef39653acac1fd632153c78b00bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=93=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D0=B5=D0=B2?= Date: Thu, 2 Oct 2025 20:37:11 +0300 Subject: [PATCH 1/2] Add recipe for andrew-gos/telegram-bot-bundle https://packagist.org/packages/andrew-gos/telegram-bot-bundle --- .../packages/andrew_gos_telegram_bot.yaml | 72 +++++++++++++++++++ .../telegram-bot-bundle/1.0/manifest.json | 8 +++ 2 files changed, 80 insertions(+) create mode 100644 andrew-gos/telegram-bot-bundle/1.0/config/packages/andrew_gos_telegram_bot.yaml create mode 100644 andrew-gos/telegram-bot-bundle/1.0/manifest.json diff --git a/andrew-gos/telegram-bot-bundle/1.0/config/packages/andrew_gos_telegram_bot.yaml b/andrew-gos/telegram-bot-bundle/1.0/config/packages/andrew_gos_telegram_bot.yaml new file mode 100644 index 00000000..4e2935c7 --- /dev/null +++ b/andrew-gos/telegram-bot-bundle/1.0/config/packages/andrew_gos_telegram_bot.yaml @@ -0,0 +1,72 @@ +# ----------------------------------------------------------------------------- +# 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. +# +# ❗️ 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: + # 🤖 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: + # 🏭 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: + # ✅ Best Practice: Never hardcode secrets! + # This reads the token from your .env file. + # $token: '%env(string:TELEGRAM_BOT_TOKEN)%' + + # 🔌 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' + + # 🔄 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 \ No newline at end of file diff --git a/andrew-gos/telegram-bot-bundle/1.0/manifest.json b/andrew-gos/telegram-bot-bundle/1.0/manifest.json new file mode 100644 index 00000000..f422a7dc --- /dev/null +++ b/andrew-gos/telegram-bot-bundle/1.0/manifest.json @@ -0,0 +1,8 @@ +{ + "bundles": { + "AndrewGos\\TelegramBotBundle\\AndrewGosTelegramBotBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + } +} From 174471006eb81a7175ebb882d5d74ceebe7c885c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=93=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D0=B5=D0=B2?= Date: Thu, 2 Oct 2025 20:55:01 +0300 Subject: [PATCH 2/2] Add recipe for andrew-gos/telegram-bot-bundle --- .../1.0/config/packages/andrew_gos_telegram_bot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/andrew-gos/telegram-bot-bundle/1.0/config/packages/andrew_gos_telegram_bot.yaml b/andrew-gos/telegram-bot-bundle/1.0/config/packages/andrew_gos_telegram_bot.yaml index 4e2935c7..536729cd 100644 --- a/andrew-gos/telegram-bot-bundle/1.0/config/packages/andrew_gos_telegram_bot.yaml +++ b/andrew-gos/telegram-bot-bundle/1.0/config/packages/andrew_gos_telegram_bot.yaml @@ -69,4 +69,4 @@ andrew_gos_telegram_bot: # handler: App\Telegram\Handler\DefaultMessageHandler # A negative priority ensures this runs last. - # priority: -10 \ No newline at end of file + # priority: -10