2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-22 11:00:51 +08:00

fix:修正默认带#问题

This commit is contained in:
Ctrlcvs 2022-10-19 07:05:20 +08:00
parent 94c84da957
commit eb2ba8c4e4
4 changed files with 9 additions and 6 deletions

View File

@ -40,7 +40,7 @@ export class atlas extends plugin {
e.getMysApi = async function (cfg) {
return await getMysApi(e, cfg)
}
msg = '#' + msg.replace(/#|/, '').trim()
msg = msg.replace(/#|/, '#').trim()
for (let fn in Atlas.rule) {
let cfg = Atlas.rule[fn]
if (Atlas[fn] && new RegExp(cfg.reg).test(msg)) {

View File

@ -68,14 +68,15 @@ let rule = {
reg: "^#*(体力|树脂|查询体力|便笺|便签)$",
describe: "体力",
},
genShenMap:{
reg: "^#*(.*)(在(哪|那)里)$",
describe: "地图资源查询 #**在哪里",
},
Note_appoint: {
reg: "^#体力模板(设置(.*)|列表(.*))$",
describe: "体力模板设置",
},
genShenMap:{
reg: "^#(.*)(在(哪|那)里)$",
describe: "地图资源查询 #**在哪里",
},
pokeNote: {
reg: "#poke#",
describe: "体力",

View File

@ -23,7 +23,7 @@ export async function genShenMap(e){
try{
res=await res.json()
if(res.retcode==-1){
await e.reply(`${msg}:${res.message}`)
await e.reply(`${res.message}`)
return true;
}
}catch(ex){

View File

@ -38,6 +38,8 @@
"不灭月华": ["月华","心海","珊瑚宫心海"],
"千夜浮梦":["千夜","纳西达","草神"],
"昭心": ["糟心"],
"幽夜华尔兹": ["幽夜", "幽夜弓", "华尔兹", "皇女弓","皇女外观"],
"流浪乐章": ["赌狗书", "赌狗乐章", "赌狗"],