From 0284949fbc3d524b29be025244058832c54795d2 Mon Sep 17 00:00:00 2001 From: e <1509167646@qq.com> Date: Sat, 18 Jun 2022 12:01:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/xiaoyao_image.js | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/apps/xiaoyao_image.js b/apps/xiaoyao_image.js index 992b557..da8614c 100644 --- a/apps/xiaoyao_image.js +++ b/apps/xiaoyao_image.js @@ -23,9 +23,9 @@ export async function roleInfo(e) { name = YunzaiApps.mysInfo.roleIdToName(id, true); if (!name) return false; } - console.log(name) + // console.log(name) - send_Msg(e,"image","爆炒肉片") + send_Msg(e,"jiaose_tujian",name) return true; } @@ -82,3 +82,33 @@ export async function weaponInfo(e) { return false; } + +export async function monsterInfo(e) { + + let msg = e.msg || ''; + + if(e.atBot){ + msg = "#" + msg.replace("#", ""); + } + + if(!/(#*食物(.*)|#(.*))$/.test(msg)) return; + + let name = weapon.get(msg.replace(/#|#|信息|图鉴|突破|食物/g, "")); + + if (name) { + + Bot.logger.mark(`[${e.group_name}] ${e.msg}:weaponInfo`); + + let path = `${_path}/resources/weaponInfo_xiaoyao/${name}.png` + + if (!fs.existsSync(path)) { + return true; + } + + e.reply(segment.image(`file:///${path}`)); + return true; + } + + return false; +} +