telebot-soundboard/config.js

126 lines
2.0 KiB
JavaScript
Raw Normal View History

2019-12-25 15:36:20 +01:00
const fs = require('fs');
const Markup = require('telegraf/markup');
const Extra = require('telegraf/extra');
//=== TOOL FUNCTIONS
const sound_list = {
'meep_merp':{
name: 'Meep Merp',
file: 'meep_merp.mp3',
2020-04-28 20:11:13 +02:00
},
'silence':{
name: 'Silence',
file: 'silence.mp3',
},
'frog':{
name: 'Frog',
file: 'frog.mp3',
2019-12-25 15:36:20 +01:00
},
'oof':{
name: 'Oof',
file: 'oof.mp3',
},
2019-12-25 20:32:52 +01:00
'exalted':{
name: 'Exalted',
file: 'exalted.mp3',
},
2019-12-27 12:05:54 +01:00
'turtle':{
name: 'Turtle',
file: 'turtle.mp3',
},
2020-04-26 12:17:45 +02:00
'reee':{
name: 'Reeee',
file: 'reee.mp3',
},
'mc_nom':{
name: 'Minecraft Nom',
file: 'mc_nom.mp3',
},
'mc_oof':{
name: 'Minecraft Oof',
file: 'mc_oof.mp3',
},
'mc_hmm':{
name: 'Minecraft hmm',
file: 'mc_hmm.mp3',
},
'steam':{
name: 'Steam Message',
file: 'steam.mp3',
},
'wololo':{
name: 'Wololo',
file: 'wololo.mp3',
},
'tuturu':{
name: 'Tururuuuu !',
file: 'tuturu.mp3',
},
'tobecontinued':{
name: 'To Be Continued =>',
file: 'tobecontinued.mp3',
},
'kabuki':{
name: 'Kabuki',
file: 'kabuki.mp3',
}
2019-12-25 15:36:20 +01:00
};
//=== MAIN MODULE CONFIG
module.exports = function(cmds){
return {
name : "SoundBoard",
key : 'sndbrd',
version : 0.1,
requirements : {
gps: false,
},
text : [
{
trigger : cmds,
public : true,
desc : {0:"Plays Sound",
1:"Joue un son",
},
requirements : (bot,event,message)=>{
return new Promise((resolve, reject)=>{
return resolve(200);
});
},
action : (bot,event,message)=>{
const ss = message.text.replace('/','');
if(sound_list[ss] != undefined){
2019-12-25 16:52:23 +01:00
return event.replyWithVoice({source:__dirname+'/sounds/'+ sound_list[ss].file});
2019-12-25 15:36:20 +01:00
}else{
return event.reply("Unknown Sound !");
}
}
},
],
reply : [],
regex : [],
media : [],
callback : [
{
trigger : 'template',
requirements : (bot,event,data)=>{
return new Promise((resolve, reject)=>{
return resolve(200);
});
},
action : (bot,event,data)=>{
return event.reply("Beep");
}
},
],
inline : [],
new_member : (bot,event)=>{},
weburl : [],
cron : []
}
}