修复qq提取

This commit is contained in:
雅诺狐
2025-08-28 13:37:20 +08:00
parent c1a219b5bd
commit 5d3e0315b2

View File

@@ -150,8 +150,8 @@ class PermissionCommand(PlusCommand):
def _parse_user_mention(self, mention: str) -> Optional[str]:
"""解析用户提及提取QQ号"""
# 匹配 @用户 格式提取QQ号
at_match = re.search(r'\[CQ:at,qq=(\d+)\]', mention)
# 匹配 @<用户名:QQ号> 格式提取QQ号
at_match = re.search(r'@<[^:]+:(\d+)>', mention)
if at_match:
return at_match.group(1)