zomboy7/telegram-bot-bundle

Telegram机器人套件

此包的规范存储库似乎已不存在,因此该包已被冻结。

安装数: 1,550

依赖关系: 0

建议者: 0

安全: 0

星级: 0

关注者: 0

分支: 18

类型:symfony-bundle

3.0.4 2019-10-04 08:55 UTC

This package is auto-updated.

Last update: 2022-06-04 16:05:32 UTC


README

Composer

$ composer require zomboy7/telegram-bot-bundle

安装

  1. config/packages/目录下创建boshurik_telegram_bot.yaml并插入以下内容:
boshurik_telegram_bot:
    api:
        token: "telegrab_bot_token"
        proxy: "socks5://127.0.0.1:8888"
    name: "username_bot"
  1. 安装包
$ composer require zomboy7/telegram-bot-bundle
  1. routes.yaml中创建新路由
BoShurikTelegramBotBundle:
    resource: "@BoShurikTelegramBotBundle/Resources/config/routing.yml"
    prefix: /_telegram/<secret_path>
  1. 使用getUpdates
$ php bin/console telegram:update
  1. 使用webHooks
$ php bin/console telegram:webhook:set <url from the new route>

套件创建者:BoShurikTelegramBotBundle 分支而来