This commit is contained in:
Cedric Hoelzl 2020-01-05 18:23:59 +01:00
parent ff36d5632e
commit 5e69e4b604

View File

@ -6,7 +6,7 @@ const Extra = require('telegraf/extra');
//=== TOOL FUNCTIONS //=== TOOL FUNCTIONS
const diblacklist = ["dionys", "Dionys", "DIT", "dit", "dis", "di"]; const diblacklist = ["dionys", "Dionys", "DIT", "dit", "dis", "di","dire"];
//=== MAIN MODULE CONFIG //=== MAIN MODULE CONFIG
@ -117,13 +117,13 @@ module.exports = function(){
action : (bot,event,message, matcher)=>{ action : (bot,event,message, matcher)=>{
let txt = ''; let txt = '';
for(let i of matcher){ for(let i of matcher){
if(diblacklist.indexOf(i)>=0) if(i.length <= 4 || diblacklist.indexOf(i)>=0)
continue; continue;
txt += i.slice(2).toUpperCase()+" !\n" txt += i.slice(2).toUpperCase()+" !\n"
} }
if(txt.length < 4){ if(txt.length < 4){
return null; return Promise.resolve(0);
}else{ }else{
return event.reply(txt, {"parse_mode":"Markdown"}); return event.reply(txt, {"parse_mode":"Markdown"});
} }