qbhy / mirai
Installs: 203
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/qbhy/mirai
Requires
- ext-json: *
- hanson/foundation-sdk: ^4.0
- nesbot/carbon: ^2.36
Requires (Dev)
- symfony/var-dumper: ^5.1
This package is auto-updated.
Last update: 2020-09-07 09:34:17 UTC
README
mirai http api 的 PHP sdk.
暂未封装 websocket 相关接口
安装 - install
$ composer require qbhy/mirai
使用 - usage
$bot = new \Qbhy\Mirai\Bot([ 'debug' => true, 'host' => 'http://localhost:8000', 'auth_key' => 'your auth key', ]); $bot->auth; // 授权相关接口 $bot->plugin; // 插件相关接口 $bot->manager; // 管理相关接口 $bot->message; // 消息相关接口 // 给指定还有发送文本消息 $bot->message->sendFriendMessage(572490755, [ \Qbhy\Mirai\Util\MessageUtil::plain('文本消息'), ]);