mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-09 22:00:01 +08:00
🐛 修复群权限检测获取群问题并优化代码
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user