mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-17 13:47:44 +00:00
add:challenge
This commit is contained in:
parent
1c9e390178
commit
8981fa84e9
2 changed files with 31 additions and 1 deletions
26
apps/challenge.js
Normal file
26
apps/challenge.js
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
import { ZZZPlugin } from '../lib/plugin.js';
|
||||||
|
import { rulePrefix } from '../lib/common.js';
|
||||||
|
|
||||||
|
export class Challenge extends ZZZPlugin {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: '[ZZZ-Plugin]challenge',
|
||||||
|
dsc: 'zzz式舆防卫战',
|
||||||
|
event: 'message',
|
||||||
|
priority: 100,
|
||||||
|
rule: [
|
||||||
|
{
|
||||||
|
reg: `${rulePrefix}(式舆防卫战|式舆|深渊|防卫战|防卫)$`,
|
||||||
|
fnc: 'challenge',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
async challenge() {
|
||||||
|
const { api, deviceFp } = await this.getAPI();
|
||||||
|
if (!api) return false;
|
||||||
|
await this.getPlayerInfo();
|
||||||
|
const indexData = await api.getFinalData(this.e, 'zzzChallenge', { deviceFp });
|
||||||
|
await this.reply('data:' + JSON.stringify(indexData));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -45,6 +45,10 @@ export default class ZZZApiTool {
|
||||||
url: `${this.hostRecord}event/game_record_zzz/api/zzz/buddy/info`,
|
url: `${this.hostRecord}event/game_record_zzz/api/zzz/buddy/info`,
|
||||||
query: `lang=zh-cn&role_id=${this.uid}&server=${this.server}`,
|
query: `lang=zh-cn&role_id=${this.uid}&server=${this.server}`,
|
||||||
},
|
},
|
||||||
|
zzzChallenge: {
|
||||||
|
url: `${this.hostRecord}event/game_record_zzz/api/zzz/challenge`,
|
||||||
|
query: `lang=zh-cn&role_id=${this.uid}&server=${this.server}&schedule_type=1`,
|
||||||
|
},
|
||||||
zzzAuthKey: {
|
zzzAuthKey: {
|
||||||
url: `${this.host}binding/api/genAuthKey`,
|
url: `${this.host}binding/api/genAuthKey`,
|
||||||
body: {
|
body: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue