telebot-feurbot/config.js

183 lines
4.1 KiB
JavaScript
Raw Normal View History

2020-01-04 15:09:59 +01:00
const fs = require('fs');
const Markup = require('telegraf/markup');
const Extra = require('telegraf/extra');
//=== TOOL FUNCTIONS
2020-01-05 18:23:59 +01:00
const diblacklist = ["dionys", "Dionys", "DIT", "dit", "dis", "di","dire"];
2020-01-05 18:26:54 +01:00
const criblacklist = [];
2020-01-04 15:09:59 +01:00
//=== 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"});
}
},
{
2020-01-05 18:26:54 +01:00
trigger : /[dD][iI](\w*)/gm,
2020-01-04 15:09:59 +01:00
public : true,
desc : {
1: "DiSCUTE !",
},
requirements : (bot,event,message)=>{
return new Promise((resolve, reject)=>{
return resolve(200);
});
},
action : (bot,event,message, matcher)=>{
let txt = '';
2020-01-05 10:40:06 +01:00
for(let i of matcher){
2020-01-05 18:23:59 +01:00
if(i.length <= 4 || diblacklist.indexOf(i)>=0)
2020-01-04 15:09:59 +01:00
continue;
2020-01-05 10:44:44 +01:00
txt += i.slice(2).toUpperCase()+" !\n"
2020-01-04 15:09:59 +01:00
}
if(txt.length < 4){
2020-01-05 18:23:59 +01:00
return Promise.resolve(0);
2020-01-04 15:09:59 +01:00
}else{
2020-01-05 10:40:06 +01:00
return event.reply(txt, {"parse_mode":"Markdown"});
2020-01-04 15:09:59 +01:00
}
}
},
2020-01-05 18:26:54 +01:00
{
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"});
}
}
},
2020-01-04 15:09:59 +01:00
{
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 : []
}
}