diff --git a/.env.dev b/.env.dev index d9a7a016..21f61694 100644 --- a/.env.dev +++ b/.env.dev @@ -8,12 +8,19 @@ NICKNAME=["真寻", "小真寻", "绪山真寻", "小寻子"] SESSION_EXPIRE_TIMEOUT=30 +ALCONNA_USE_COMMAND_START=True + # 全局图片统一使用bytes发送,当真寻与协议端不在同一服务器上时为True -IMAGE_TO_BYTES = False +IMAGE_TO_BYTES = True # 回复消息时自称 SELF_NICKNAME="小真寻" +# 官bot appid:bot账号 +QBOT_ID_DATA = '{ + +}' + # 数据库配置 # 示例: "postgres://user:password@127.0.0.1:5432/database" # 示例: "mysql://user:password@127.0.0.1:3306/database" diff --git a/zhenxun/utils/rules.py b/zhenxun/utils/rules.py index 019fb249..a8ed2cce 100644 --- a/zhenxun/utils/rules.py +++ b/zhenxun/utils/rules.py @@ -27,14 +27,14 @@ async def _rule(bot: Bot, event: Event, session: Uninfo) -> bool: if PlatformUtils.is_qbot(session): """官bot接口,放弃所有权限检查""" return False - if session.id and session.group: + if session.group: level = a if isinstance(a, str) and key: level = Config.get_config(a, key) if level is not None: return bool( await LevelUser.check_level( - session.id, session.group.id, int(level) + session.user.id, session.group.id, int(level) ) ) return False