From 33306ecc59fd6fa5f71a8b80b18950090f2486f4 Mon Sep 17 00:00:00 2001 From: Ctrlcvs <1509167646@qq.com> Date: Sat, 3 Sep 2022 09:57:59 +0800 Subject: [PATCH] =?UTF-8?q?#=E6=9B=B4=E6=96=B0=E6=8A=BD=E5=8D=A1=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=94=B9=E4=B8=BA=E5=90=88=E5=B9=B6=E8=BD=AC=E5=8F=91?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=8F=91=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/user.js | 7 +++++++ model/mys/utils.js | 21 ++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/apps/user.js b/apps/user.js index c970a45..a5c611b 100644 --- a/apps/user.js +++ b/apps/user.js @@ -106,6 +106,12 @@ export async function gclog(e) { url += `${item}=${postdata[item]}&` } e.msg= url.substring(0, url.length - 1); + let sendMsg=[]; + e.reply("抽卡记录获取中请稍等...") + e._reply=e.reply; + e.reply = (msg) => { + sendMsg.push(msg) + } if(isV3){ let gclog= (await import(`file:///${_path}/plugins/genshin/model/gachaLog.js`)).default await (new gclog(e)).logUrl() @@ -116,6 +122,7 @@ export async function gclog(e) { e.isPrivate = true; await bing(e) } + utils.replyMake(e,sendMsg,1) let time=(configData.gclogEx||5)*60 redis.set(`xiaoyao:gclog:${e.user_id}`, Math.floor(Date.now()/1000)+time, { //把色图链接写入缓存防止一直色色 EX: time diff --git a/model/mys/utils.js b/model/mys/utils.js index ecacc27..04ee53b 100644 --- a/model/mys/utils.js +++ b/model/mys/utils.js @@ -36,8 +36,27 @@ export async function relpyPrivate (userId, msg) { }) } } +export async function replyMake(e,_msg,lenght){ + let nickname = Bot.nickname; + if (e.isGroup) { + let info = await Bot.getGroupMemberInfo(e.group_id, Bot.uin) + nickname = info.card || info.nickname + } + let msgList=[]; + for(let [index,item] of Object.entries(_msg)){ + if(index