zomboy7 / telegram-bot-bundle
Telegram机器人套件
此包的规范存储库似乎已不存在,因此该包已被冻结。
3.0.4
2019-10-04 08:55 UTC
Requires
- php: ^7.0
- ext-curl: *
- symfony/console: ^3.4 || ^4.0
- symfony/event-dispatcher: ^3.4 || ^4.0
- symfony/framework-bundle: ^3.4 || ^4.0
- telegram-bot/api: ^2.3.10
Requires (Dev)
- phpunit/phpunit: ^6.5
README
Composer
$ composer require zomboy7/telegram-bot-bundle
安装
- 在
config/packages/目录下创建boshurik_telegram_bot.yaml并插入以下内容:
boshurik_telegram_bot:
api:
token: "telegrab_bot_token"
proxy: "socks5://127.0.0.1:8888"
name: "username_bot"
- 安装包
$ composer require zomboy7/telegram-bot-bundle
- 在
routes.yaml中创建新路由
BoShurikTelegramBotBundle:
resource: "@BoShurikTelegramBotBundle/Resources/config/routing.yml"
prefix: /_telegram/<secret_path>
- 使用getUpdates
$ php bin/console telegram:update
- 使用webHooks
$ php bin/console telegram:webhook:set <url from the new route>
套件创建者:BoShurik 从 TelegramBotBundle 分支而来