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 2022-08-13 06:31:03 +08:00 committed by leiyilu
parent 441c67b845
commit d398327fc9
2 changed files with 3 additions and 10 deletions

View File

@ -158,7 +158,7 @@ export async function mysSign(e) {
return retry(e); return retry(e);
}); });
}, RETRY_OPTIONS); }, RETRY_OPTIONS);
Bot.logger.info(`${forum.name} 签到结果: [${resObj.message}]`); Bot.logger.mark(`${e.user_id}:${forum.name} 签到结果: [${resObj.message}]`);
resultMessage += `签到: [${resObj.message}]\n`; resultMessage += `签到: [${resObj.message}]\n`;
} catch (e) { } catch (e) {
Bot.logger.error(`${forum.name} 签到失败 [${e.message}]`); Bot.logger.error(`${forum.name} 签到失败 [${e.message}]`);
@ -349,7 +349,6 @@ export async function allMysSign() {
//获取需要签到的用户 //获取需要签到的用户
for (let data of stoken) { for (let data of stoken) {
let user_id = data.qq; let user_id = data.qq;
Bot.logger.mark(`正在为qq${user_id}签到`);
let e = { let e = {
user_id, user_id,
isTask: true isTask: true
@ -357,12 +356,6 @@ export async function allMysSign() {
e.cookie = `stuid=${data.stuid};stoken=${data.stoken};ltoken=${data.ltoken};`; e.cookie = `stuid=${data.stuid};stoken=${data.stoken};ltoken=${data.ltoken};`;
Bot.logger.mark(`正在为qq${user_id}进行米游币签到中...`); Bot.logger.mark(`正在为qq${user_id}进行米游币签到中...`);
e.msg = "全部" e.msg = "全部"
//已签到不重复执行
let key = `genshin:mys:signed_bbs:${user_id}`;
if (await redis.get(key)) {
continue;
}
e.reply = (msg) => { e.reply = (msg) => {
//关闭签到消息推送 //关闭签到消息推送
if (!isPushSign||ismysbool) { if (!isPushSign||ismysbool) {

View File

@ -119,12 +119,12 @@ export default class MihoYoApi {
let message = `\n${name}共计${data.list.length}个账号\n`; let message = `\n${name}共计${data.list.length}个账号\n`;
for (let item of data.list) { for (let item of data.list) {
let objshuj = await this.isPostSign(kkbody, item.game_uid, item.region) let objshuj = await this.isPostSign(kkbody, item.game_uid, item.region)
if(objshuj.data.is_sign){ if(objshuj?.data?.is_sign){
message+=`游戏id${item.nickname}-${item.game_uid}:今日已签到~\n`; message+=`游戏id${item.nickname}-${item.game_uid}:今日已签到~\n`;
continue; continue;
} }
objshuj=(await this.postSign(kkbody, item.game_uid, item.region)) objshuj=(await this.postSign(kkbody, item.game_uid, item.region))
if(objshuj.data.gt){ if(objshuj?.data?.gt){
message+=`游戏id${item.nickname}-${item.game_uid}:签到出现验证码~\n请晚点后重试,或者手动上米游社签到`; message+=`游戏id${item.nickname}-${item.game_uid}:签到出现验证码~\n请晚点后重试,或者手动上米游社签到`;
}else{ }else{
message += `游戏id${item.nickname}-${item.game_uid}${objshuj.message=="OK"?"签到成功":objshuj.message}\n` message += `游戏id${item.nickname}-${item.game_uid}${objshuj.message=="OK"?"签到成功":objshuj.message}\n`