diff --git a/app/command.py b/app/command.py index 21212820..8a3ed1cb 100644 --- a/app/command.py +++ b/app/command.py @@ -109,13 +109,12 @@ class Command(metaclass=Singleton): "/downloading": { "func": DownloadChain(self._db).remote_downloading, "description": "正在下载", - "category": "下载", "data": {} }, "/transfer": { "func": TransferChain(self._db).process, "description": "下载文件整理", - "category": "下载", + "category": "管理", "data": {} }, "/redo": { diff --git a/app/modules/wechat/__init__.py b/app/modules/wechat/__init__.py index 15059322..4def27e4 100644 --- a/app/modules/wechat/__init__.py +++ b/app/modules/wechat/__init__.py @@ -96,11 +96,12 @@ class WechatModule(_ModuleBase): # 解析消息内容 if msg_type == "event" and event == "click": # 校验用户有权限执行交互命令 - wechat_admins = settings.WECHAT_ADMINS.split(',') - if wechat_admins and not any( - user_id == admin_user for admin_user in wechat_admins): - self.wechat.send_msg(title="用户无权限执行菜单命令", userid=user_id) - return None + if settings.WECHAT_ADMINS: + wechat_admins = settings.WECHAT_ADMINS.split(',') + if wechat_admins and not any( + user_id == admin_user for admin_user in wechat_admins): + self.wechat.send_msg(title="用户无权限执行菜单命令", userid=user_id) + return None # 根据Event执行命令 content = event logger.info(f"收到微信事件:userid={user_id}, event={content}") diff --git a/app/modules/wechat/wechat.py b/app/modules/wechat/wechat.py index 38905e58..5d7751f4 100644 --- a/app/modules/wechat/wechat.py +++ b/app/modules/wechat/wechat.py @@ -286,7 +286,7 @@ class WeChat(metaclass=Singleton): "data": {} } } - 注册报文格式,子菜单最多只有5条: + 注册报文格式,一级菜单只有最多3条,子菜单最多只有5条: { "button":[ {