mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 05:07:46 +00:00
feat: 角色命座
This commit is contained in:
parent
5830178362
commit
73715f015f
12 changed files with 324 additions and 14 deletions
|
|
@ -208,6 +208,13 @@ const helpData = [
|
|||
needSK: false,
|
||||
commands: ['角色名+天赋[+等级]'],
|
||||
},
|
||||
{
|
||||
title: '角色意象影画图鉴',
|
||||
desc: '查看角色命座图鉴',
|
||||
needCK: false,
|
||||
needSK: false,
|
||||
commands: ['角色名+命座', '角色名+意象', '角色名+影画'],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
|||
21
apps/wiki.js
21
apps/wiki.js
|
|
@ -43,10 +43,15 @@ export class Wiki extends ZZZPlugin {
|
|||
reg: `${rulePrefix}(.*)天赋(.*)$`,
|
||||
fnc: 'skills',
|
||||
},
|
||||
{
|
||||
reg: `${rulePrefix}(.*)(意象影画|意象|影画|命座)$`,
|
||||
fnc: 'cinema',
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
async skills() {
|
||||
logger.debug('skills');
|
||||
const reg = new RegExp(`${rulePrefix}(.*)天赋(.*)$`);
|
||||
const charname = this.e.msg.match(reg)[4];
|
||||
if (!charname) return false;
|
||||
|
|
@ -94,4 +99,20 @@ export class Wiki extends ZZZPlugin {
|
|||
};
|
||||
await this.render('skills/index.html', finalData);
|
||||
}
|
||||
async cinema() {
|
||||
const reg = new RegExp(`${rulePrefix}(.*)(意象影画|意象|影画|命座)$`);
|
||||
const charname = this.e.msg.match(reg)[4];
|
||||
if (!charname) return false;
|
||||
const charData = await getHakushCharacterData(charname);
|
||||
const cinemaData = charData?.Talent;
|
||||
if (!cinemaData) {
|
||||
await this.reply(`未找到${charname}的数据`);
|
||||
return false;
|
||||
}
|
||||
await charData.get_assets();
|
||||
const finalData = {
|
||||
charData,
|
||||
};
|
||||
await this.render('cinema/index.html', finalData);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue