This commit is contained in:
Cedric Hoelzl 2020-01-05 18:26:54 +01:00
parent 5e69e4b604
commit f39e2d1394

View File

@ -7,6 +7,7 @@ const Extra = require('telegraf/extra');
//=== TOOL FUNCTIONS
const diblacklist = ["dionys", "Dionys", "DIT", "dit", "dis", "di","dire"];
const criblacklist = [];
//=== MAIN MODULE CONFIG
@ -104,7 +105,7 @@ module.exports = function(){
}
},
{
trigger : /di(\w*)/gm,
trigger : /[dD][iI](\w*)/gm,
public : true,
desc : {
1: "DiSCUTE !",
@ -129,6 +130,32 @@ module.exports = function(){
}
}
},
{
trigger : /[cC][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(txt.length < 4){
return Promise.resolve(0);
}else{
return event.reply(txt, {"parse_mode":"Markdown"});
}
}
},
{
trigger : /(nice)[\W]*$/,
public : true,