2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-22 19:10:53 +08:00

修正米社自动签到报错问题

This commit is contained in:
Ctrlcvs 2023-04-27 20:23:05 +08:00
parent 4dcd63efe9
commit ceaf5f2903
2 changed files with 11 additions and 4 deletions

View File

@ -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)
}

View File

@ -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) {