mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-01-19 01:18:19 +08:00
🎨 fix docstring format
This commit is contained in:
parent
bac56635c0
commit
1280cf9ba3
@ -1044,14 +1044,14 @@ mirai-api-http 协议事件,字段与 mirai-api-http 一致。各事件字段
|
||||
|
||||
用户权限枚举类
|
||||
|
||||
>
|
||||
> * `OWNER`: 群主
|
||||
|
||||
* `OWNER`: 群主
|
||||
|
||||
|
||||
> * `ADMINISTRATOR`: 群管理
|
||||
* `ADMINISTRATOR`: 群管理
|
||||
|
||||
|
||||
> * `MEMBER`: 普通群成员
|
||||
* `MEMBER`: 普通群成员
|
||||
|
||||
|
||||
|
||||
@ -1433,14 +1433,14 @@ Bot被邀请入群申请
|
||||
|
||||
用户权限枚举类
|
||||
|
||||
>
|
||||
> * `OWNER`: 群主
|
||||
|
||||
* `OWNER`: 群主
|
||||
|
||||
|
||||
> * `ADMINISTRATOR`: 群管理
|
||||
* `ADMINISTRATOR`: 群管理
|
||||
|
||||
|
||||
> * `MEMBER`: 普通群成员
|
||||
* `MEMBER`: 普通群成员
|
||||
|
||||
|
||||
|
||||
@ -1453,11 +1453,11 @@ Bot被邀请入群申请
|
||||
|
||||
戳一戳类型枚举类
|
||||
|
||||
>
|
||||
> * `Group`: 群
|
||||
|
||||
* `Group`: 群
|
||||
|
||||
|
||||
> * `Friend`: 好友
|
||||
* `Friend`: 好友
|
||||
|
||||
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
import json
|
||||
from enum import Enum
|
||||
from typing import Any, Dict, Optional, Type
|
||||
|
||||
from pydantic import BaseModel, Field, ValidationError
|
||||
from typing_extensions import Literal
|
||||
from typing import Any, Dict, Type, Optional
|
||||
|
||||
from pydantic import Field, BaseModel, ValidationError
|
||||
|
||||
from nonebot.adapters import Event as BaseEvent
|
||||
from nonebot.adapters import Message as BaseMessage
|
||||
from nonebot.log import logger
|
||||
from nonebot.typing import overrides
|
||||
from nonebot.utils import escape_tag
|
||||
from nonebot.adapters import Event as BaseEvent
|
||||
from nonebot.adapters import Message as BaseMessage
|
||||
|
||||
|
||||
class UserPermission(str, Enum):
|
||||
@ -18,9 +18,9 @@ class UserPermission(str, Enum):
|
||||
|
||||
用户权限枚举类
|
||||
|
||||
* ``OWNER``: 群主
|
||||
* ``ADMINISTRATOR``: 群管理
|
||||
* ``MEMBER``: 普通群成员
|
||||
* ``OWNER``: 群主
|
||||
* ``ADMINISTRATOR``: 群管理
|
||||
* ``MEMBER``: 普通群成员
|
||||
"""
|
||||
OWNER = 'OWNER'
|
||||
ADMINISTRATOR = 'ADMINISTRATOR'
|
||||
@ -33,8 +33,8 @@ class NudgeSubjectKind(str, Enum):
|
||||
|
||||
戳一戳类型枚举类
|
||||
|
||||
* ``Group``: 群
|
||||
* ``Friend``: 好友
|
||||
* ``Group``: 群
|
||||
* ``Friend``: 好友
|
||||
"""
|
||||
Group = 'Group'
|
||||
Friend = 'Friend'
|
||||
@ -107,7 +107,7 @@ class Event(BaseEvent):
|
||||
|
||||
@overrides(BaseEvent)
|
||||
def get_type(self) -> Literal["message", "notice", "request", "meta_event"]:
|
||||
from . import message, meta, notice, request
|
||||
from . import meta, notice, message, request
|
||||
if isinstance(self, message.MessageEvent):
|
||||
return 'message'
|
||||
elif isinstance(self, notice.NoticeEvent):
|
||||
|
Loading…
Reference in New Issue
Block a user