sonko-dmitry/yii2-telegram-bot-api
最新稳定版本:v1.0.0
Composer 安装命令:
composer require sonko-dmitry/yii2-telegram-bot-api
包简介
Telegram bot api component for Yii2
关键字:
README 文档
README
This extension is the way to integrate telegram-bot/api wrapper with your Yii2 application.
Installation
The preferred way to install this extension is through composer.
To install, either run
$ php composer.phar require sonko-dmitry/yii2-telegram-bot-api:*
or add
"sonko-dmitry/yii2-telegram-bot-api": "*"
to the require section of your composer.json file.
Usage
- Add the component configuration in your global
main.phpconfig file:
'components' => [ 'bot' => [ 'class' => 'SonkoDmitry\Yii\TelegramBot\Component', 'apiToken' => 'YOUR_BOT_API_TOKEN', ], ],
- Now you can use component
\Yii::$app->bot->sendMessage(1234567, 'Hello world!');
Where "1234567" receiver telegram id or chat id.
统计信息
- 总下载量: 31.92k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 21
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-07-31