pashkevich-s-d / trainee-telegram-bot-client
此包最新版本(0.0.2)的许可证信息不可用。
Telegram机器人客户端示例
0.0.2
2023-02-18 20:36 UTC
Requires
- symfony/dependency-injection: ^6.0
- symfony/http-client: ^6.0
- symfony/http-foundation: ^6.0
- symfony/mime: ^6.0
This package is not auto-updated.
Last update: 2024-09-29 05:29:21 UTC
README
Telegram机器人客户端示例
描述
此项目可以用作创建和使用composer安装包的示例。
它对学习PHP和相关技术的人来说很有用,或者对于那些在教授学生的人来说也很实用。
示例
添加当前包
composer require pashkevich-s-d/trainee-telegram-bot-client
然后
use \PashkevichSD\TraineeTelegramBotClient\Service\TelegramBotClient;
use \PashkevichSD\TraineeTelegramBotClient\Model\Request\Message;
$telegramBotClient = new TelegramBotClient('YourTelegramBotToken');
以便获取更新
$telegramBotClient->getUpdates();
以便发送消息
telegramBotClient->sendMessage((new Message())->setChatId($chatId)->setText($message));