Skip to content

Commit

Permalink
fix: 修复 gocq 环境下消息响应的一些问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Soulter authored Jan 3, 2024
1 parent 7725904 commit f3a46a7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions model/platform/qq_gocq.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,11 @@ async def handle_msg(self, message: Union[GroupMessage, FriendMessage, GuildMess
if message.type == "GroupMessage":
if i.qq == message.self_id:
resp = True
for i in self.nick_qq:
if i != '' and i in message.message[0].text:
resp = True
break
elif isinstance(i, Plain):
for nick in self.nick_qq:
if nick != '' and message.message[0].text.strip().startwith(nick):
resp = True
break

if not resp: return

Expand Down

0 comments on commit f3a46a7

Please sign in to comment.