rezident/self-documented-telegram-bot-sdk
最新稳定版本:6.6.0
Composer 安装命令:
composer require rezident/self-documented-telegram-bot-sdk
包简介
Self-documented Telegram Bot Sdk
README 文档
README
This is a simple Telegram Bot SDK written in PHP.
Usage
Getting Bot updates
use Rezident\SelfDocumentedTelegramBotSdk\components\Executor; use Rezident\SelfDocumentedTelegramBotSdk\methods\GettingUpdates\GetUpdatesMethod; $executor = new Executor('8360528562:Eim2eitahSh3ohshi7zee2Hoh2gaewee6eV'); $updates = GetUpdatesMethod::new()->exec($executor); foreach ($updates as $update) { echo $update->getMessage()->getText(); }
Sending messages
use Rezident\SelfDocumentedTelegramBotSdk\components\Executor; use Rezident\SelfDocumentedTelegramBotSdk\methods\GettingUpdates\GetUpdatesMethod; $executor = new Executor('8360528562:Eim2eitahSh3ohshi7zee2Hoh2gaewee6eV'); $sentMessage = SendMessageMethod::new(8376498, 'Hello my dear friend!')->exec($executor); ...
统计信息
- 总下载量: 32
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-10-24