mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2025-07-27 22:40:55 +00:00
📝 修复生成文档中self多出类型注解的问题,修复__init__丢失的问题
This commit is contained in:
@ -65,7 +65,15 @@ Returns:
|
||||
|
||||
有两种接收工作方式,但是只能选择一种,主动接收和被动接收,主动接收使用 `receive` 方法,被动接收使用 `on_receive` 装饰器
|
||||
|
||||
###   ***def*** `send(self: Any, data: T) -> None`
|
||||
###   ***def*** `__init__(self, _id: str, type_check: bool) -> None`
|
||||
|
||||
 初始化通道
|
||||
|
||||
Args:
|
||||
|
||||
_id: 通道ID
|
||||
|
||||
###   ***def*** `send(self, data: T) -> None`
|
||||
|
||||
 发送数据
|
||||
|
||||
@ -73,17 +81,17 @@ Args:
|
||||
|
||||
data: 数据
|
||||
|
||||
###   ***def*** `receive(self: Any) -> T`
|
||||
###   ***def*** `receive(self) -> T`
|
||||
|
||||
 接收数据
|
||||
|
||||
Args:
|
||||
|
||||
###   ***def*** `close(self: Any) -> None`
|
||||
###   ***def*** `close(self) -> None`
|
||||
|
||||
 关闭通道
|
||||
|
||||
###   ***def*** `on_receive(self: Any, filter_func: Optional[FILTER_FUNC]) -> Callable[[Callable[[T], Any]], Callable[[T], Any]]`
|
||||
###   ***def*** `on_receive(self, filter_func: Optional[FILTER_FUNC]) -> Callable[[Callable[[T], Any]], Callable[[T], Any]]`
|
||||
|
||||
 接收数据并执行函数
|
||||
|
||||
|
@ -9,3 +9,7 @@ category: API
|
||||
|
||||
事件类
|
||||
|
||||
###   ***def*** `__init__(self, name: str, data: dict[str, Any]) -> None`
|
||||
|
||||
 
|
||||
|
||||
|
@ -25,7 +25,11 @@ category: API
|
||||
|
||||
|
||||
|
||||
###   ***def*** `set(self: Any, key: str, value: Any) -> None`
|
||||
###   ***def*** `__init__(self) -> None`
|
||||
|
||||
 
|
||||
|
||||
###   ***def*** `set(self, key: str, value: Any) -> None`
|
||||
|
||||
 设置键值对
|
||||
|
||||
@ -35,7 +39,7 @@ Args:
|
||||
|
||||
value: 值
|
||||
|
||||
###   ***def*** `get(self: Any, key: str, default: Optional[Any]) -> Optional[Any]`
|
||||
###   ***def*** `get(self, key: str, default: Optional[Any]) -> Optional[Any]`
|
||||
|
||||
 获取键值对
|
||||
|
||||
@ -51,7 +55,7 @@ Returns:
|
||||
|
||||
Any: 值
|
||||
|
||||
###   ***def*** `delete(self: Any, key: str, ignore_key_error: bool) -> None`
|
||||
###   ***def*** `delete(self, key: str, ignore_key_error: bool) -> None`
|
||||
|
||||
 删除键值对
|
||||
|
||||
@ -65,7 +69,7 @@ Args:
|
||||
|
||||
Returns:
|
||||
|
||||
###   ***def*** `get_all(self: Any) -> dict[str, Any]`
|
||||
###   ***def*** `get_all(self) -> dict[str, Any]`
|
||||
|
||||
 获取所有键值对
|
||||
|
||||
|
Reference in New Issue
Block a user