agtong/yii2-telegram-bot
最新稳定版本:v1.0.0
Composer 安装命令:
composer require agtong/yii2-telegram-bot
包简介
Telegram bot for Yii 2
README 文档
README
Yii2 Telegram bot.
Installation
The preferred way to install this extension is through composer.
Either run
composer require agtong/yii2-telegram-bot
or add
"agtong/yii2-telegram-bot": "*"
to the require section of your composer.json file.
Usage
Use the below code to send a message.
$bot = new TelegramBot(['token' => '123456:abcde');
$bot->sendMessage('123456', 'Hello World!');
The sendMessage function and it's optional paramters are shown below.
sendMessage($chat_id, $text, $parse_mode = null, $disable_web_page_preview = null, $disable_notification = null, $reply_to_message_id = null, $reply_markup = null)
Read more about the parameters here.
统计信息
- 总下载量: 152
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-04-19