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:
e 2022-06-18 12:01:41 +08:00
parent 7af27f6cdf
commit 0284949fbc

View File

@ -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;
}