telebot-feurbot/config.js
2020-01-05 18:44:26 +01:00

160 lines
3.7 KiB
JavaScript

const fs = require('fs');
const Markup = require('telegraf/markup');
const Extra = require('telegraf/extra');
//=== TOOL FUNCTIONS
const diblacklist = ["dionys", "Dionys", "DIT", "dit", "dis", "di","dire"];
const criblacklist = [];
//=== MAIN MODULE CONFIG
module.exports = function(){
return {
name : "FeurBot",
key : "qfeur",
version : 0.1,
requirements : {
gps: false,
},
text : [
{
trigger : ["/ping"], //Array of Triggers
public : true, //Should it be shown to user (user can still run the command without knowing it exists)
desc : {0:"Pings the user",
1:"Envois un ping à l'utilisateur",
2:"Yu-za- de pingu wo tsukawashite",
3:"*insert arabic*",
},
requirements : (bot,event,message)=>{
return new Promise((resolve, reject)=>{
return resolve(200);
});
},
action : (bot,event,message)=>{
return event.reply("pong");
}
},
],
reply : [],
regex : [
{
trigger : /(quoi|ga|chaud|gars|staff|chauf|koi|piaf|gre|gol|gole|blu|koa|esbrou|tou|tous|tout|touf|gris|gri|pia|sta|sniff|snif|sni|soeur|sur|seur|gras|gra|bouf|schtroump)[\W]*$/,
public : true,
desc : {
1: "Répond FEUR",
},
requirements : (bot,event,message)=>{
return new Promise((resolve, reject)=>{
return resolve(200);
});
},
action : (bot,event,message)=>{
return event.reply("FEUR !", {"parse_mode":"Markdown"});
}
},
{
trigger : /(ca|sa|ssa)[\W]*$/,
public : true,
desc : {
1: "Répond LOPE or PEUR-POMPIER",
},
requirements : (bot,event,message)=>{
return new Promise((resolve, reject)=>{
return resolve(200);
});
},
action : (bot,event,message)=>{
if(Math.random()>0.5){
return event.reply("PEUR-POMPIER !", {"parse_mode":"Markdown"});
}else{
return event.reply("LOPE !", {"parse_mode":"Markdown"});
}
}
},
{
trigger : /(comment|coman|comman|comen|coment)[\W]*$/,
public : true,
desc : {
1: "Répond DANT COUSTEAU",
},
requirements : (bot,event,message)=>{
return new Promise((resolve, reject)=>{
return resolve(200);
});
},
action : (bot,event,message)=>{
return event.reply("DANT COUSTEAU !", {"parse_mode":"Markdown"});
}
},
{
trigger : /(wiiii(i*)|ouiiii(i*)|viiii(i*)|wheee(e*))[\W]*$/,
public : true,
desc : {
1: "Répond OUUIIIIIIIIIIII",
},
requirements : (bot,event,message)=>{
return new Promise((resolve, reject)=>{
return resolve(200);
});
},
action : (bot,event,message)=>{
return event.reply("[OUUIIIIIIIIIIII](https://www.youtube.com/watch?v=tymI71r7Zp4)", {"parse_mode":"Markdown"});
}
},
{
trigger : /([cC][hH]{0,1}[rR][iI]|[dD][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 || diblacklist.indexOf(i)>=0)
continue;
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);
}else{
return event.reply(txt, {"parse_mode":"Markdown"});
}
}
},
{
trigger : /(nice)[\W]*$/,
public : true,
desc : {
1: "Répond POLYNice",
},
requirements : (bot,event,message)=>{
return new Promise((resolve, reject)=>{
return resolve(200);
});
},
action : (bot,event,message)=>{
return event.reply("POLYNice !", {"parse_mode":"Markdown"});
}
}
],
media : [],
callback : [],
inline : [],
new_member : (bot,event)=>{},
weburl : [],
cron : []
}
}