|
Zhamao Framework 3.2.4
A high-performance chatbot + web framework
|
Public 成员函数 | |
| __construct (string $bot_id, string $platform) | |
| getEvent () | |
| promptString (string|\Stringable|MessageSegment|array $prompt='', int $timeout=600, string|\Stringable|MessageSegment|array $timeout_prompt='', int $option=ZM_PROMPT_NONE) | |
| hasReplied () | |
| flushReply () | |
| getBot (string $bot_id, string $platform='') | |
| setParams (array $params) | |
| getParam (string|int $name) | |
| getParamString (string|int $name) | |
| getParams () | |
| getSelf () | |
Protected 属性 | |
| array | $self |
| array | $params = [] |
静态 Protected 属性 | |
| static array | $bots = [] |
| __construct | ( | string | $bot_id, |
| string | $platform | ||
| ) |
| flushReply | ( | ) |
重置当前上下文为没有被回复过
| getBot | ( | string | $bot_id, |
| string | $platform = '' |
||
| ) |
获取其他机器人的上下文操作对象
| string | $bot_id | 机器人的 self.user_id 对应的 ID |
| string | $platform | 机器人的 self.platform 对应的 platform |
| OneBot12Exception |
| getEvent | ( | ) |
获取机器人事件对象
| DependencyException | |
| NotFoundException |
| getParam | ( | string|int | $name | ) |
获取单个参数值,不存在则返回 null
| int | string | $name | 参数名称或索引 |
| getParams | ( | ) |
获取所有参数
| getParamString | ( | string|int | $name | ) |
| getSelf | ( | ) |
| hasReplied | ( | ) |
返回是否已经调用过回复了
| promptString | ( | string|\Stringable|MessageSegment|array | $prompt = '', |
| int | $timeout = 600, |
||
| string|\Stringable|MessageSegment|array | $timeout_prompt = '', |
||
| int | $option = ZM_PROMPT_NONE |
||
| ) |
在当前会话等待用户一条消息,且直接返回消息的字符串形式 如果是私聊,就在对应的机器人私聊环境下等待 如果是单级群组,就在对应的群组下等待当前消息人的消息 如果是多级群组,则等待最小级下当前消息人的消息 @noinspection PhpUnhandledExceptionInspection
| setParams | ( | array | $params | ) |
设置该消息下解析出来的参数列表
| array | $params | 参数列表 |
|
staticprotected |
|
protected |
|
protected |