From 98a28713a4073b10a176c40a7f7e61963c15b9ab Mon Sep 17 00:00:00 2001 From: Ctrlcvs <1509167646@qq.com> Date: Wed, 3 Aug 2022 15:15:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=93=E5=8A=9B=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=88=97=E8=A1=A8=E4=BF=A1=E6=81=AF=E5=8F=91=E9=80=81?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E4=B8=BA=E8=BD=AC=E5=8F=91=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/Note.js | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/apps/Note.js b/apps/Note.js index 46b2292..3b17e61 100644 --- a/apps/Note.js +++ b/apps/Note.js @@ -355,12 +355,34 @@ export async function pokeNote(e){ export async function Note_appoint(e) { + let mbPath=`${_path}/plugins/xiaoyao-cvs-plugin/resources/dailyNote/Template/`; let msg = e.msg.replace(/#|井|体力|模板|设置/g, ""); let All = ["默认", "随机", "0"]; let urlType = note_file(); let type = 0; if (msg.includes("列表")) { - e.reply(`当前支持选择的模板有:\n${urlType.join("\n")}`); + let mstList=[]; + urlType.unshift(`当前支持选择的模板有:`) + for (let item of urlType) { + let msg_pass=[]; + msg_pass.push(item) + if(item!=urlType[0]){ + msg_pass.push( segment.image(`file:///${mbPath}${item}/icon/bg/${fs.readdirSync(`${mbPath}${item}/icon/bg/`)[0]}`)) + } + let botqq; + if(isV3){ + let cfg = await import(`file://${_path}/lib/config/config.js`) + botqq=cfg.default.qq + }else{ + botqq=BotConfig?.account?.qq + } + mstList.push({ + message: msg_pass, + nickname: "云崽", + user_id: botqq + }) + } + e.reply(await Bot.makeForwardMsg(mstList)); return true; } if (!urlType.includes(msg) && !All.includes(msg)) {