mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-29 17:27:41 +00:00
使用 markdown 格式的强调语法
This commit is contained in:
@ -20,8 +20,8 @@ class Event(abc.ABC, BaseModel):
|
||||
|
||||
:返回:
|
||||
|
||||
* ``Literal["message", "notice", "request", "meta_event"]``
|
||||
* 其他自定义 ``str``
|
||||
* `Literal["message", "notice", "request", "meta_event"]`
|
||||
* 其他自定义 `str`
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
@ -32,7 +32,7 @@ class Event(abc.ABC, BaseModel):
|
||||
|
||||
:返回:
|
||||
|
||||
* ``str``
|
||||
* `str`
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
@ -43,7 +43,7 @@ class Event(abc.ABC, BaseModel):
|
||||
|
||||
:返回:
|
||||
|
||||
* ``str``
|
||||
* `str`
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
@ -52,15 +52,15 @@ class Event(abc.ABC, BaseModel):
|
||||
|
||||
def get_log_string(self) -> str:
|
||||
"""
|
||||
获取事件日志信息的方法,通常你不需要修改这个方法,只有当希望 NoneBot 隐藏该事件日志时,可以抛出 ``NoLogException`` 异常。
|
||||
获取事件日志信息的方法,通常你不需要修改这个方法,只有当希望 NoneBot 隐藏该事件日志时,可以抛出 `NoLogException` 异常。
|
||||
|
||||
:返回:
|
||||
|
||||
* ``str``
|
||||
* `str`
|
||||
|
||||
:异常:
|
||||
|
||||
- ``NoLogException``
|
||||
- `NoLogException`
|
||||
"""
|
||||
return f"[{self.get_event_name()}]: {self.get_event_description()}"
|
||||
|
||||
@ -71,7 +71,7 @@ class Event(abc.ABC, BaseModel):
|
||||
|
||||
:返回:
|
||||
|
||||
* ``str``
|
||||
* `str`
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
@ -82,7 +82,7 @@ class Event(abc.ABC, BaseModel):
|
||||
|
||||
:返回:
|
||||
|
||||
* ``str``
|
||||
* `str`
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
@ -93,17 +93,17 @@ class Event(abc.ABC, BaseModel):
|
||||
|
||||
:返回:
|
||||
|
||||
* ``Message``
|
||||
* `Message`
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def get_plaintext(self) -> str:
|
||||
"""
|
||||
获取消息纯文本的方法,通常不需要修改,默认通过 ``get_message().extract_plain_text`` 获取。
|
||||
获取消息纯文本的方法,通常不需要修改,默认通过 `get_message().extract_plain_text` 获取。
|
||||
|
||||
:返回:
|
||||
|
||||
* ``str``
|
||||
* `str`
|
||||
"""
|
||||
return self.get_message().extract_plain_text()
|
||||
|
||||
@ -114,6 +114,6 @@ class Event(abc.ABC, BaseModel):
|
||||
|
||||
:返回:
|
||||
|
||||
* ``bool``
|
||||
* `bool`
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
Reference in New Issue
Block a user