mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 05:07:46 +00:00
fix:部分逻辑
This commit is contained in:
parent
800bc15007
commit
c5d9131c1d
9 changed files with 56 additions and 30 deletions
|
|
@ -20,12 +20,14 @@ export class Abyss extends ZZZPlugin {
|
|||
});
|
||||
}
|
||||
async abyss() {
|
||||
const { api } = await this.getAPI();
|
||||
const { api, deviceFp } = await this.getAPI();
|
||||
await this.getPlayerInfo();
|
||||
const method = this.e.msg.match(`(上期|往期)`)
|
||||
? 'zzzChallengePeriod'
|
||||
: 'zzzChallenge';
|
||||
const abyssData = await api.getFinalData(method).catch(e => {
|
||||
const abyssData = await api.getFinalData(method, {
|
||||
deviceFp,
|
||||
}).catch(e => {
|
||||
this.reply(e.message);
|
||||
throw e;
|
||||
});
|
||||
|
|
|
|||
14
apps/card.js
14
apps/card.js
|
|
@ -20,22 +20,28 @@ export class Card extends ZZZPlugin {
|
|||
});
|
||||
}
|
||||
async card() {
|
||||
const { api } = await this.getAPI();
|
||||
const { api, deviceFp } = await this.getAPI();
|
||||
await this.getPlayerInfo();
|
||||
const indexData = await api.getFinalData('zzzIndex').catch(e => {
|
||||
const indexData = await api.getFinalData('zzzIndex', {
|
||||
deviceFp,
|
||||
}).catch(e => {
|
||||
this.reply(e.message);
|
||||
throw e;
|
||||
});
|
||||
if (!indexData) return false;
|
||||
|
||||
let zzzAvatarList = await api.getFinalData('zzzAvatarList').catch(e => {
|
||||
let zzzAvatarList = await api.getFinalData('zzzAvatarList', {
|
||||
deviceFp,
|
||||
}).catch(e => {
|
||||
this.reply(e.message);
|
||||
throw e;
|
||||
});
|
||||
if (!zzzAvatarList) return false;
|
||||
indexData.avatar_list = zzzAvatarList.avatar_list;
|
||||
|
||||
let zzzBuddyList = await api.getFinalData('zzzBuddyList').catch(e => {
|
||||
let zzzBuddyList = await api.getFinalData('zzzBuddyList', {
|
||||
deviceFp,
|
||||
}).catch(e => {
|
||||
this.reply(e.message);
|
||||
throw e;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -20,12 +20,14 @@ export class deadly extends ZZZPlugin {
|
|||
});
|
||||
}
|
||||
async deadly() {
|
||||
const { api } = await this.getAPI();
|
||||
const { api, deviceFp } = await this.getAPI();
|
||||
await this.getPlayerInfo();
|
||||
const method = this.e.msg.match(`(上期|往期)`)
|
||||
? 'zzzDeadlyPeriod'
|
||||
: 'zzzDeadly';
|
||||
const deadlyData = await api.getFinalData(method).catch(e => {
|
||||
const deadlyData = await api.getFinalData(method, {
|
||||
deviceFp,
|
||||
}).catch(e => {
|
||||
this.reply(e.message);
|
||||
throw e;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -35,10 +35,11 @@ export class monthly extends ZZZPlugin {
|
|||
}
|
||||
let year = match[3];
|
||||
let month = match[5];
|
||||
const { api } = await this.getAPI();
|
||||
const { api, deviceFp } = await this.getAPI();
|
||||
await this.getPlayerInfo();
|
||||
const monthlyResponse = await getMonthly(
|
||||
api,
|
||||
deviceFp,
|
||||
this.getDateString(year, month)
|
||||
).catch(e => {
|
||||
this.reply(e.message);
|
||||
|
|
@ -60,9 +61,12 @@ export class monthly extends ZZZPlugin {
|
|||
}
|
||||
|
||||
async monthlyCollect() {
|
||||
const { api } = await this.getAPI();
|
||||
const { api, deviceFp } = await this.getAPI();
|
||||
await this.getPlayerInfo();
|
||||
const collect = await getMonthlyCollect(api).catch(e => {
|
||||
const collect = await getMonthlyCollect(
|
||||
api,
|
||||
deviceFp,
|
||||
).catch(e => {
|
||||
this.reply(e.message);
|
||||
throw e;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -20,9 +20,11 @@ export class Note extends ZZZPlugin {
|
|||
});
|
||||
}
|
||||
async note() {
|
||||
const { api } = await this.getAPI();
|
||||
const { api, deviceFp } = await this.getAPI();
|
||||
await this.getPlayerInfo();
|
||||
const noteResponse = await api.getFinalData('zzzNote').catch(e => {
|
||||
const noteResponse = await api.getFinalData('zzzNote', {
|
||||
deviceFp,
|
||||
}).catch(e => {
|
||||
this.reply(e.message);
|
||||
throw e;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -60,11 +60,11 @@ export class Panel extends ZZZPlugin {
|
|||
await this.reply(`${coldTime}秒内只能刷新一次,请稍后再试`);
|
||||
return false;
|
||||
}
|
||||
const { api } = await this.getAPI();
|
||||
const { api, deviceFp } = await this.getAPI();
|
||||
await redis.set(`ZZZ:PANEL:${uid}:LASTTIME`, Date.now());
|
||||
await this.reply('正在刷新面板列表,请稍候...');
|
||||
await this.getPlayerInfo();
|
||||
const result = await refreshPanelFunction(api).catch(e => {
|
||||
const result = await refreshPanelFunction(api, deviceFp).catch(e => {
|
||||
this.reply(e.message);
|
||||
throw e;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue