2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-23 03:20:52 +08:00

加入七圣召唤数据识别,需要先#更新图鉴获取七圣召唤数据

This commit is contained in:
Ctrlcvs 2022-12-14 22:33:03 +08:00
parent d6042d7d4f
commit 4eb6f8bb01

View File

@ -33,11 +33,9 @@ export async function AtlasAlias(e) {
return send_Msg(e, "all", ""); return send_Msg(e, "all", "");
} }
export async function roleInfo(e) { export async function roleInfo(e) {
let msg = e.msg.replace(/#||信息|图鉴|命座|天赋/g, ""); let msg = e.msg.replace(/#||信息|图鉴|命座|天赋|原牌|七圣/g, "");
let Botcfg; let Botcfg,id,type='juese_tujian';
let id;
if (isV3) { if (isV3) {
Botcfg = (await import(`file://${_path}/plugins/genshin/model/gsCfg.js`)).default; Botcfg = (await import(`file://${_path}/plugins/genshin/model/gsCfg.js`)).default;
id = Botcfg.roleNameToID(msg) id = Botcfg.roleNameToID(msg)
@ -56,7 +54,10 @@ export async function roleInfo(e) {
name = Botcfg.roleIdToName(id, true); name = Botcfg.roleIdToName(id, true);
if (!name) return false; if (!name) return false;
} }
send_Msg(e, "juese_tujian", name) if(/原牌|七圣/.test(e.msg)) {
type=`basicInfo_tujian/role/${name}`
}
send_Msg(e, type, name)
return true; return true;
} }
@ -114,6 +115,7 @@ export async function Atlas_list(e) {
} }
return false; return false;
} }
const info_img = function(e, list, name) { const info_img = function(e, list, name) {
for (let i in list) { for (let i in list) {
for (let val of list[i]) { for (let val of list[i]) {