ZM\Context\Context
getServer
public function getServer(): Server
描述
作者很懒,什么也没有说
返回
getData
public function getData(): mixed
描述
作者很懒,什么也没有说
返回
reply
public function reply(array|string $msg, bool|callable|Closure $yield): array|bool
描述
only can used by cq->message event function
参数
| 名称 |
类型 |
描述 |
| msg |
array |
string |
| yield |
bool |
callable |
返回
finalReply
public function finalReply(array|string $msg, bool $yield): mixed
描述
作者很懒,什么也没有说
参数
| 名称 |
类型 |
描述 |
| msg |
array |
string |
| yield |
bool |
是否协程挂起(true),是否绑定异步事件(Closure) |
返回
waitMessage
public function waitMessage(string $prompt, int $timeout, string $timeout_prompt): string
描述
作者很懒,什么也没有说
参数
| 名称 |
类型 |
描述 |
| prompt |
string |
|
| timeout |
int |
|
| timeout_prompt |
string |
|
返回
getArgs
public function getArgs(int|string $mode, string|Stringable $prompt_msg): float|int|string
描述
根据选定的模式获取消息参数
参数
| 名称 |
类型 |
描述 |
| mode |
int |
string |
| prompt_msg |
string |
Stringable |
返回
getNextArg
public function getNextArg(string $prompt_msg): int|mixed|string
描述
获取下一个参数
参数
| 名称 |
类型 |
描述 |
| prompt_msg |
string |
提示语回复 |
返回
getFullArg
public function getFullArg(string $prompt_msg): int|mixed|string
描述
获取接下来所有的消息当成一个完整的参数(包含空格)
参数
| 名称 |
类型 |
描述 |
| prompt_msg |
string |
提示语回复 |
返回
getNumArg
public function getNumArg(string $prompt_msg): int|mixed|string
描述
获取下一个数字类型的参数
参数
| 名称 |
类型 |
描述 |
| prompt_msg |
string |
提示语回复 |
返回
cloneFromParent
public function cloneFromParent(): ContextInterface
描述
作者很懒,什么也没有说
返回
| 类型 |
描述 |
| ContextInterface |
返回上下文 |