init
This commit is contained in:
		
							
								
								
									
										77
									
								
								config.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								config.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,77 @@
 | 
				
			|||||||
 | 
					const fs = require('fs');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const Markup = require('telegraf/markup');
 | 
				
			||||||
 | 
					const Extra = require('telegraf/extra');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const example_lang = require('./lang.js');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//=== TOOL FUNCTIONS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const sound_list = {
 | 
				
			||||||
 | 
						'meep_merp':{
 | 
				
			||||||
 | 
							name: 'Meep Merp',
 | 
				
			||||||
 | 
							file: 'meep_merp.mp3',
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						'oof':{
 | 
				
			||||||
 | 
							name: 'Oof',
 | 
				
			||||||
 | 
							file: 'oof.mp3',
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					//=== 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){
 | 
				
			||||||
 | 
										return event.replyWithAudio('./sounds/'+ sound_list[ss].file);
 | 
				
			||||||
 | 
									}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 : []
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								sounds/meep_merp.mp3
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								sounds/meep_merp.mp3
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								sounds/oof.mp3
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								sounds/oof.mp3
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user