From 8fbd3366d837c7dada8b7bd4ec6a18f18a65aeca Mon Sep 17 00:00:00 2001 From: bietiaop <1527109126@qq.com> Date: Fri, 16 Aug 2024 22:50:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=91=E5=AE=9A=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/help.js | 27 +++++++++++++++++++++------ apps/user.js | 21 +++++++++++++++++++-- defSet/priority.yaml | 1 + lib/mysapi.js | 4 +++- 4 files changed, 44 insertions(+), 9 deletions(-) diff --git a/apps/help.js b/apps/help.js index 35e1ff0..0b9fbd8 100644 --- a/apps/help.js +++ b/apps/help.js @@ -100,12 +100,7 @@ const helpData = [ desc: '查看自定义角色面板图,在添加或者删除角色图后,会导致角色图的ID发生变化,此时需要重新获取图片列表来查看ID,否则可能会删除错误的图片', needCK: false, needSK: false, - commands: [ - '查看+角色名+面板图[+页码]', - '查看+角色名+角色图[+页码]', - '获取+角色名+面板图[+页码]', - '获取+角色名+角色图[+页码]', - ], + commands: ['查看+角色名+面板图[+页码]', '查看+角色名+角色图[+页码]'], }, { title: '获取角色面板图', @@ -169,6 +164,26 @@ const helpData = [ }, ], }, + { + title: '其他', + icon: 'fire', + items: [ + { + title: '绑定设备', + desc: '用于解决10041报错等问题', + needCK: true, + needSK: false, + commands: ['绑定设备'], + }, + { + title: '绑定设备帮助', + desc: '查看如何绑定设备', + needCK: true, + needSK: false, + commands: ['绑定设备帮助'], + }, + ], + }, ]; export class Help extends ZZZPlugin { constructor() { diff --git a/apps/user.js b/apps/user.js index 33a9729..2ff3395 100644 --- a/apps/user.js +++ b/apps/user.js @@ -1,8 +1,7 @@ import { ZZZPlugin } from '../lib/plugin.js'; -import render from '../lib/render.js'; import { rulePrefix } from '../lib/common.js'; -import { getPanelList, refreshPanel, getPanel } from '../lib/avatar.js'; import settings from '../lib/settings.js'; +import common from '../../../lib/common/common.js'; import _ from 'lodash'; export class Panel extends ZZZPlugin { @@ -17,6 +16,10 @@ export class Panel extends ZZZPlugin { reg: `${rulePrefix}绑定设备$`, fnc: 'bindDevice', }, + { + reg: `${rulePrefix}绑定设备帮助$`, + fnc: 'bindDeviceHelp', + }, ], }); } @@ -83,4 +86,18 @@ export class Panel extends ZZZPlugin { return false; } } + async bindDeviceHelp() { + const msgs = [ + '绑定设备帮助', + 'https://mirror.ghproxy.com/https://raw.githubusercontent.com/forchannot/get_device_info/main/app/build/outputs/apk/debug/app-debug.apk', + '1. 使用常用米游社手机下载以上APK,并安装', + '2. 打开后点击按钮复制', + '3. 给机器人发送"%绑定设备"指令', + '4. 机器人会提示发送设备信息', + '5. 粘贴设备信息发送', + '6. 提示绑定成功', + ], + msg = msgs.join('\n'); + await this.reply(await common.makeForwardMsg(this.e, msg, '绑定设备帮助')); + } } diff --git a/defSet/priority.yaml b/defSet/priority.yaml index 89683e0..9057efe 100644 --- a/defSet/priority.yaml +++ b/defSet/priority.yaml @@ -7,3 +7,4 @@ manage: 70 # 管理 note: 70 # 体力 panel: 70 # 面板 update: 70 # 更新 +user: 70 # 账号操作 \ No newline at end of file diff --git a/lib/mysapi.js b/lib/mysapi.js index 916f236..cfedd1b 100644 --- a/lib/mysapi.js +++ b/lib/mysapi.js @@ -255,7 +255,9 @@ export default class MysZZZApi extends MysApi { break; case 10041: case 5003: - this.e.reply(`UID:${this.uid},米游社账号异常,暂时无法查询`); + this.e.reply( + `UID:${this.uid},米游社账号异常,暂时无法查询,请尝试%绑定设备` + ); break; case 10035: case 1034: {