From 16d9f7d19c9943a633d62c8769f73a779f676fc4 Mon Sep 17 00:00:00 2001 From: Ctrlcvs <1509167646@qq.com> Date: Thu, 15 Dec 2022 00:02:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E9=83=A8=E5=88=86=E5=88=AB?= =?UTF-8?q?=E5=90=8D=E5=AF=BC=E8=87=B4=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=83=E5=9C=A3=E5=8F=AC=E5=94=A4=E5=9B=BE=E7=89=87=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/xiaoyao_image.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/xiaoyao_image.js b/apps/xiaoyao_image.js index ef55a80..ac7e72f 100644 --- a/apps/xiaoyao_image.js +++ b/apps/xiaoyao_image.js @@ -16,6 +16,7 @@ const list = ["wuqi_tujian", "shiwu_tujian", "yuanmo_tujian", "mijin_tujian", "s const reglist = ["(#|专武|武器|图鉴)", "(#|食物|特殊料理|特色|料理|食材|图鉴)", "(#|原魔|怪物|图鉴|信息)", "(#|秘境|信息|图鉴)", "(#|圣遗物|图鉴|本|套)", "(#|图鉴|道具)" ] +let pathPlus = `${_path}/plugins/xiaoyao-cvs-plugin/resources/xiaoyao-plus/` export async function AtlasAlias(e) { if (!Cfg.get("Atlas.all")) { return false; @@ -52,11 +53,15 @@ export async function roleInfo(e) { name = msg; } else { name = Botcfg.roleIdToName(id, true); - if (!name) return false; } if(/原牌|七圣/.test(e.msg)) { + if(!name){ + let list = gsCfg.getfileYaml(`${_path}/plugins/xiaoyao-cvs-plugin/resources/Atlas_alias/`,'yuanmo_tujian') + name= info_img(e,list,msg) + } type=`basicInfo_tujian/role/${name}` } + if (!name) return false; send_Msg(e, type, name) return true; } @@ -71,7 +76,7 @@ const filePath = async function(e) { }else { msg=e.msg.replace(/#|#|信息|图鉴|命座|天赋/g, ""); } - let path = `${_path}/plugins/xiaoyao-cvs-plugin/resources/xiaoyao-plus/${val}/${msg}.png` + let path = `${pathPlus}${val}/${msg}.png` if (fs.existsSync(path)) { e.reply(segment.image(`file:///${path}`)); return true; @@ -94,7 +99,7 @@ const send_Msg = function(e, type, name) { } } } - path = `${_path}/plugins/xiaoyao-cvs-plugin/resources/xiaoyao-plus/${type}/${name}.png` + path = `${pathPlus}${type}/${name}.png` if (!fs.existsSync(path)) { return false; }