feat 微信自动注册菜单

This commit is contained in:
jxxghp 2023-09-05 11:33:42 +08:00
parent 551f32491d
commit b564f70c63
3 changed files with 8 additions and 8 deletions

View File

@ -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": {

View File

@ -96,6 +96,7 @@ class WechatModule(_ModuleBase):
# 解析消息内容
if msg_type == "event" and event == "click":
# 校验用户有权限执行交互命令
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):

View File

@ -286,7 +286,7 @@ class WeChat(metaclass=Singleton):
"data": {}
}
}
注册报文格式子菜单最多只有5条
注册报文格式一级菜单只有最多3条子菜单最多只有5条
{
"button":[
{