diff --git a/config.js b/config.js index e8a94db..7bb0a5b 100644 --- a/config.js +++ b/config.js @@ -105,7 +105,7 @@ module.exports = function(){ } }, { - trigger : /[dD][iI](\w*)/gm, + trigger : /([cC][hH]{0,1}[rR][iI]|[dD][iI])(\w*)/gm, public : true, desc : { 1: "DiSCUTE !", @@ -118,36 +118,13 @@ module.exports = function(){ action : (bot,event,message, matcher)=>{ let txt = ''; for(let i of matcher){ - if(i.length <= 4 || diblacklist.indexOf(i)>=0) + if(i.length < 5 || diblacklist.indexOf(i)>=0) continue; - - txt += i.slice(2).toUpperCase()+" !\n" - } - if(txt.length < 4){ - return Promise.resolve(0); - }else{ - return event.reply(txt, {"parse_mode":"Markdown"}); - } - } - }, - { - trigger : /[cC][hH]{0,1}[rR][iI](\w*)/gm, - public : true, - desc : { - 1: "DiSCUTE !", - }, - requirements : (bot,event,message)=>{ - return new Promise((resolve, reject)=>{ - return resolve(200); - }); - }, - action : (bot,event,message, matcher)=>{ - let txt = ''; - for(let i of matcher){ - if(i.length <= 5 || criblacklist.indexOf(i)>=0) - continue; - - txt += i.slice(3).toUpperCase()+" !\n" + if(i.charAt(0)=='c' || i.charAt(0)=='C'){ + txt += i.slice(3).toUpperCase()+" !\n"; + }else{ + txt += i.slice(2).toUpperCase()+" !\n"; + } } if(txt.length < 4){ return Promise.resolve(0);