Skip to content

Commit

Permalink
Event.get_plaintext 方法去除文本首尾空白符
Browse files Browse the repository at this point in the history
  • Loading branch information
A-kirami committed Aug 4, 2023
1 parent 08fde75 commit 6f662fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nonebot/internal/adapter/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def get_message(self) -> "Message":
def get_plaintext(self) -> str:
"""获取消息纯文本的方法。
通常不需要修改,默认通过 `get_message().extract_plain_text` 获取。
通常不需要修改,默认通过 `get_message().extract_plain_text().strip()` 获取。
"""
return self.get_message().extract_plain_text()
return self.get_message().extract_plain_text().strip()

@abc.abstractmethod
def is_tome(self) -> bool:
Expand Down

0 comments on commit 6f662fa

Please sign in to comment.