This commit is contained in:
Cedric Hoelzl 2020-01-04 15:09:59 +01:00
parent d7ebcad0de
commit 3dd6b7db1f
2 changed files with 156 additions and 3 deletions

View File

@ -1,3 +0,0 @@
# telebot-feurbot
Telegram FeurBot Module

156
config.js Normal file
View File

@ -0,0 +1,156 @@
const fs = require('fs');
const Markup = require('telegraf/markup');
const Extra = require('telegraf/extra');
//=== TOOL FUNCTIONS
const diblacklist = ["dionys", "Dionys", "DIT", "dit", "dis", "di"];
//=== 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 : /di(\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 res){
if(diblacklist.indexOf(i)>=0)
continue;
txt += i.slice(2).upper()+" !\n"
}
if(txt.length < 4){
return null;
}else{
return event.reply("", {"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 : []
}
}