🐛 修复群权限检测获取群问题并优化代码

This commit is contained in:
HibiKier
2024-08-02 21:38:32 +08:00
parent 36047693aa
commit 51fcdf649e
6 changed files with 117 additions and 89 deletions
@@ -417,9 +417,12 @@ class AuthChecker:
"""
if group_id := session.id3 or session.id2:
text = message.extract_plain_text()
group, _ = await GroupConsole.get_or_create(
group = await GroupConsole.get_or_none(
group_id=group_id, channel_id__isnull=True
)
if not group:
"""群不存在"""
raise IgnoredException("群不存在")
if group.level < 0:
"""群权限小于0"""
logger.debug(