🏷️ update pyi

This commit is contained in:
yanyongyu
2020-09-26 14:40:08 +08:00
parent 8bd1aa0662
commit bbeea86fd5
3 changed files with 192 additions and 11 deletions

View File

@ -1,5 +1,110 @@
from nonebot.adapters import BaseBot
from nonebot.typing import Any, Dict, List, Union, Message, Optional
from nonebot.typing import Any, Dict, List, Union, Optional
def log(level: str, message: str):
"""
:说明:
用于打印 CQHTTP 日志。
:参数:
* ``level: str``: 日志等级
* ``message: str``: 日志信息
"""
...
def escape(s: str, *, escape_comma: bool = True) -> str:
"""
:说明:
对字符串进行 CQ 码转义。
:参数:
* ``s: str``: 需要转义的字符串
* ``escape_comma: bool``: 是否转义逗号(``,``)。
"""
...
def unescape(s: str) -> str:
"""
:说明:
对字符串进行 CQ 码去转义。
:参数:
* ``s: str``: 需要转义的字符串
"""
...
def _b2s(b: Optional[bool]) -> Optional[str]:
"""转换布尔值为字符串。"""
...
async def _check_reply(bot: "Bot", event: "Event"):
"""
:说明:
检查消息中存在的回复,去除并赋值 ``event.reply``, ``event.to_me``
:参数:
* ``bot: Bot``: Bot 对象
* ``event: Event``: Event 对象
"""
...
def _check_at_me(bot: "Bot", event: "Event"):
"""
:说明:
检查消息开头或结尾是否存在 @机器人,去除并赋值 ``event.to_me``
:参数:
* ``bot: Bot``: Bot 对象
* ``event: Event``: Event 对象
"""
...
def _check_nickname(bot: "Bot", event: "Event"):
"""
:说明:
检查消息开头是否存在,去除并赋值 ``event.to_me``
:参数:
* ``bot: Bot``: Bot 对象
* ``event: Event``: Event 对象
"""
...
def _handle_api_result(result: Optional[Dict[str, Any]]) -> Any:
"""
:说明:
处理 API 请求返回值。
:参数:
* ``result: Optional[Dict[str, Any]]``: API 返回数据
"""
...
class ResultStore:
...
class Bot(BaseBot):
@ -674,3 +779,15 @@ class Bot(BaseBot):
* ``self_id``: 机器人 QQ 号
"""
...
class Event:
...
class MessageSegment:
...
class Message:
...