Skip to content

Commit

Permalink
docs: 更新文档 (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
st1020 authored Mar 26, 2024
1 parent 7d9d463 commit 253ef3d
Show file tree
Hide file tree
Showing 39 changed files with 345 additions and 3,336 deletions.
17 changes: 0 additions & 17 deletions docs/api/adapter/apscheduler/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,3 @@ APScheduler 配置类,将在适配器被加载时被混入到机器人主配
- **Attributes**

- **scheduler\_config** (_Dict\[str, Any\]_) - 调度器配置。

### _method_ `__init__(self, /, **data)` {#BaseModel.\_\_init\_\_}

Create a new model by parsing and validating input data from keyword arguments.

Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.

`self` is explicitly positional-only to allow `self` as a field name.

- **Arguments**

- **data** (_Any_)

- **Returns**

Type: _None_
23 changes: 3 additions & 20 deletions docs/api/adapter/apscheduler/event.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,19 @@ APSchedulerEvent 事件基类。

- **plugin\_class** (_Type\[alicebot.plugin.Plugin\]_)

### _method_ `__init__(self, /, **data)` {#BaseModel.\_\_init\_\_}

Create a new model by parsing and validating input data from keyword arguments.

Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.

`self` is explicitly positional-only to allow `self` as a field name.

- **Arguments**

- **data** (_Any_)

- **Returns**

Type: _None_

### _readonly property_ `job` {#APSchedulerEvent.job}
### _readonly property_ `job` {#APSchedulerEvent-job}

Type: _apscheduler.job.Job_

产生当前事件的 APScheduler `Job` 对象。

### _readonly property_ `trigger` {#APSchedulerEvent.trigger}
### _readonly property_ `trigger` {#APSchedulerEvent-trigger}

Type: _Union\[str, apscheduler.triggers.base.BaseTrigger, NoneType\]_

当前事件对应的 Plugin 的 `trigger`

### _readonly property_ `trigger_args` {#APSchedulerEvent.trigger\_args}
### _readonly property_ `trigger_args` {#APSchedulerEvent-trigger-args}

Type: _Optional\[Dict\[str, Any\]\]_

Expand Down
41 changes: 6 additions & 35 deletions docs/api/adapter/apscheduler/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,36 +29,7 @@ APScheduler 配置类,将在适配器被加载时被混入到机器人主配

- **scheduler\_config** (_Dict\[str, Any\]_) - 调度器配置。

#### _method_ `__init__(self, /, **data)` {#BaseModel.\_\_init\_\_}

Create a new model by parsing and validating input data from keyword arguments.

Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.

`self` is explicitly positional-only to allow `self` as a field name.

- **Arguments**

- **data** (_Any_)

- **Returns**

Type: _None_

### _method_ `__init__(self, bot)` {#Adapter.\_\_init\_\_}

初始化。

- **Arguments**

- **bot** (_Bot_) - 当前机器人对象。

- **Returns**

Type: _None_

### _async method_ `create_event(self, plugin_class)` {#APSchedulerAdapter.create\_event}
### _async method_ `create_event(self, plugin_class)` {#APSchedulerAdapter-create-event}

创建 `APSchedulerEvent` 事件。

Expand All @@ -70,15 +41,15 @@ validated to form a valid model.

Type: _None_

### _async method_ `run(self)` {#APSchedulerAdapter.run}
### _async method_ `run(self)` {#APSchedulerAdapter-run}

启动调度器。

- **Returns**

Type: _None_

### _async method_ `send(self, *args, **kwargs)` {#APSchedulerAdapter.send}
### _async method_ `send(self, *args, **kwargs)` {#APSchedulerAdapter-send}

APScheduler 适配器不适用发送消息。

Expand All @@ -92,23 +63,23 @@ APScheduler 适配器不适用发送消息。

Type: _Any_

### _async method_ `shutdown(self)` {#APSchedulerAdapter.shutdown}
### _async method_ `shutdown(self)` {#APSchedulerAdapter-shutdown}

关闭调度器。

- **Returns**

Type: _None_

### _async method_ `startup(self)` {#APSchedulerAdapter.startup}
### _async method_ `startup(self)` {#APSchedulerAdapter-startup}

创建 `AsyncIOScheduler` 对象。

- **Returns**

Type: _None_

## _function_ `scheduler_decorator(trigger, trigger_args, override_rule = False)` {#scheduler\_decorator}
## _function_ `scheduler_decorator(trigger, trigger_args, override_rule = False)` {#scheduler-decorator}

用于为插件类添加计划任务功能的装饰器。

Expand Down
17 changes: 0 additions & 17 deletions docs/api/adapter/cqhttp/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,3 @@ CQHTTP 配置类,将在适配器被加载时被混入到机器人主配置中
- **api\_timeout** (_int_) - 进行 API 调用时等待返回响应的超时时间。

- **access\_token** (_str_) - 鉴权。

### _method_ `__init__(self, /, **data)` {#BaseModel.\_\_init\_\_}

Create a new model by parsing and validating input data from keyword arguments.

Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.

`self` is explicitly positional-only to allow `self` as a field name.

- **Arguments**

- **data** (_Any_)

- **Returns**

Type: _None_
Loading

0 comments on commit 253ef3d

Please sign in to comment.