update api docs

This commit is contained in:
Github Build Bot
2022-04-02 17:31:48 +00:00
parent 520099aaba
commit c1a877489b
24 changed files with 502 additions and 728 deletions

View File

@@ -37,7 +37,7 @@ public function getData(): mixed
## reply
```php
public function reply(mixed $msg, bool $yield): array|bool
public function reply(array|string $msg, bool|callable|Closure $yield): array|bool
```
### 描述
@@ -48,20 +48,20 @@ only can used by cq->message event function
| 名称 | 类型 | 描述 |
| -------- | ---- | ----------- |
| msg | mixed | |
| yield | bool | |
| msg | array|string | 要回复的消息 |
| yield | bool|callable|Closure | 是否协程挂起true是否绑定异步事件Closure |
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| array|bool | |
| array|bool | 返回API调用结果 |
## finalReply
```php
public function finalReply(mixed $msg, bool $yield): mixed
public function finalReply(array|string $msg, bool $yield): mixed
```
### 描述
@@ -72,8 +72,8 @@ public function finalReply(mixed $msg, bool $yield): mixed
| 名称 | 类型 | 描述 |
| -------- | ---- | ----------- |
| msg | mixed | |
| yield | bool | |
| msg | array|string | 要回复的消息 |
| yield | bool | 是否协程挂起true是否绑定异步事件Closure |
### 返回
@@ -104,31 +104,31 @@ public function waitMessage(string $prompt, int $timeout, string $timeout_prompt
| 类型 | 描述 |
| ---- | ----------- |
| string | |
| string | 返回用户输入的内容 |
## getArgs
```php
public function getArgs(mixed $mode, mixed $prompt_msg): mixed|string
public function getArgs(int|string $mode, string|Stringable $prompt_msg): float|int|string
```
### 描述
作者很懒,什么也没有说
根据选定的模式获取消息参数
### 参数
| 名称 | 类型 | 描述 |
| -------- | ---- | ----------- |
| mode | mixed | |
| prompt_msg | mixed | |
| mode | int|string | 获取的模式 |
| prompt_msg | string|Stringable | 提示语回复 |
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| mixed|string | |
| float|int|string | |
## getNextArg
@@ -139,19 +139,19 @@ public function getNextArg(string $prompt_msg): int|mixed|string
### 描述
作者很懒,什么也没有说
获取下一个参数
### 参数
| 名称 | 类型 | 描述 |
| -------- | ---- | ----------- |
| prompt_msg | string | |
| prompt_msg | string | 提示语回复 |
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| int|mixed|string | |
| int|mixed|string | 返回获取的参数 |
## getFullArg
@@ -162,19 +162,19 @@ public function getFullArg(string $prompt_msg): int|mixed|string
### 描述
作者很懒,什么也没有说
获取接下来所有的消息当成一个完整的参数(包含空格)
### 参数
| 名称 | 类型 | 描述 |
| -------- | ---- | ----------- |
| prompt_msg | string | |
| prompt_msg | string | 提示语回复 |
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| int|mixed|string | |
| int|mixed|string | 返回获取的参数 |
## getNumArg
@@ -185,25 +185,25 @@ public function getNumArg(string $prompt_msg): int|mixed|string
### 描述
作者很懒,什么也没有说
获取下一个数字类型的参数
### 参数
| 名称 | 类型 | 描述 |
| -------- | ---- | ----------- |
| prompt_msg | string | |
| prompt_msg | string | 提示语回复 |
### 返回
| 类型 | 描述 |
| ---- | ----------- |
| int|mixed|string | |
| int|mixed|string | 返回获取的参数 |
## cloneFromParent
```php
public function cloneFromParent(): mixed
public function cloneFromParent(): ContextInterface
```
### 描述
@@ -214,4 +214,4 @@ public function cloneFromParent(): mixed
| 类型 | 描述 |
| ---- | ----------- |
| mixed | |
| ContextInterface | 返回上下文 |