From ceaf5f29036c8b2fa800ad3183e087a2bace279e Mon Sep 17 00:00:00 2001 From: Ctrlcvs <1509167646@qq.com> Date: Thu, 27 Apr 2023 20:23:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=B1=B3=E7=A4=BE=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E7=AD=BE=E5=88=B0=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/mys/utils.js | 6 +++--- model/user.js | 9 ++++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/model/mys/utils.js b/model/mys/utils.js index e6497c5..aefd42e 100644 --- a/model/mys/utils.js +++ b/model/mys/utils.js @@ -118,10 +118,10 @@ export async function getCookieMap(cookie) { */ export function recallMsg(e,r,times){ setTimeout(()=>{ - if(e.group){ - e.group.recallMsg(r.message_id) + if(e?.group){ + e?.group?.recallMsg(r.message_id) }else{ - e.friend.recallMsg(r.message_id) + e?.friend?.recallMsg(r.message_id) } },1000 * times) } diff --git a/model/user.js b/model/user.js index 9d66b44..4bf2ecc 100644 --- a/model/user.js +++ b/model/user.js @@ -59,7 +59,7 @@ export default class user { for (let item of resSign?.upData) { let num = lodash.random(0, 9999); item.upName = item.upName == "原神" ? "ys" : item.upName == "崩坏3" ? "bh3" : item.upName == - "崩坏2" ? "bh2" : item.upName == "未定事件簿" ? "wdy" : "" + "崩坏2" ? "bh2" : item.upName == "未定事件簿" ? "wdy" : item.upName sumData[item.upName + "" + num] = { "uid": item.game_uid, "游戏昵称": item.nickname, @@ -389,6 +389,7 @@ export default class user { } let _reply = e.reply let msg = e?.msg; + //暂时先这样吧,等有空再优化~ this.allSign = { findModel: ["崩坏3", "崩坏2", '原神', '未定事件簿'], "崩坏3": { @@ -415,6 +416,12 @@ export default class user { isSign: 0, error: 0, }, + "崩坏星穹铁道": { + bindGame: 0, + sign: 0, + isSign: 0, + error: 0, + }, sendReply() { let msg = "" for (let item of this.findModel) {