Skip to content

Commit

Permalink
修改 event.raw_message 为 str(event.message)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanbao2000 committed Oct 30, 2023
1 parent 9913af8 commit 0e20979
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/mokabot_url_parse/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def __init__(self, parse: Type[BaseParse]):
self._last_parse_dict: dict[int, tuple[str, str]] = {} # subtype, suburl, 标记最后一次解析内容以防止多个机器人循环解析

async def handle(self, event: MessageEvent):
subtype, suburl = await self._parse.preprocesse(event.raw_message)
# TODO 其他地方的 event.raw_message 也要对应修改
subtype, suburl = await self._parse.preprocesse(str(event.message))
message_from = event.group_id if isinstance(event, GroupMessageEvent) else event.user_id

if self._last_parse_dict.get(message_from, None) == (subtype, suburl):
Expand Down

0 comments on commit 0e20979

Please sign in to comment.