forked from embee/woomy
		
	Merge pull request #4 from Terryiscool160/master
Fixing of my bugs and new stuff.
This commit is contained in:
		
						commit
						c19e502a91
					
				
					 5 changed files with 35 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -17,7 +17,7 @@ exports.conf = {
 | 
			
		|||
  
 | 
			
		||||
  exports.help = {
 | 
			
		||||
    name: "catfact",
 | 
			
		||||
    category: "User",
 | 
			
		||||
    category: "Fun",
 | 
			
		||||
    description: "Sends a fun fact about a cat.",
 | 
			
		||||
    usage: "catfact/kittenfact"
 | 
			
		||||
  };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										27
									
								
								src/commands/diceroll.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								src/commands/diceroll.js
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,27 @@
 | 
			
		|||
exports.run = async (bot, message, args) => {
 | 
			
		||||
    if (args.length === 0) {
 | 
			
		||||
      message.channel.send(`🎲 You rolled a ${Array.from(Array(6).keys()).random() + 1}!`);
 | 
			
		||||
    } else {
 | 
			
		||||
      if (args[0].match(/^\d+$/)) {
 | 
			
		||||
        message.channel.send(`🎲 You rolled a ${Array.from(Array(parseInt(args[0])).keys()).random() + 1}!`);
 | 
			
		||||
      } else {
 | 
			
		||||
        message.channel.send(`🎲 You rolled a ${Array.from(Array(6).keys()).random() + 1}!`);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
  
 | 
			
		||||
  exports.conf = {
 | 
			
		||||
    enabled: true,
 | 
			
		||||
    guildOnly: false,
 | 
			
		||||
    aliases: ["diceroll"],
 | 
			
		||||
    permLevel: "User",
 | 
			
		||||
    requiredPerms: []
 | 
			
		||||
  };
 | 
			
		||||
  
 | 
			
		||||
  exports.help = {
 | 
			
		||||
    name: "dice",
 | 
			
		||||
    category: "Fun",
 | 
			
		||||
    description: "Rolls a dice.",
 | 
			
		||||
    usage: "dice"
 | 
			
		||||
  };
 | 
			
		||||
  
 | 
			
		||||
| 
						 | 
				
			
			@ -17,7 +17,7 @@ exports.conf = {
 | 
			
		|||
  
 | 
			
		||||
  exports.help = {
 | 
			
		||||
    name: "dogfact",
 | 
			
		||||
    category: "User",
 | 
			
		||||
    category: "Fun",
 | 
			
		||||
    description: "Sends a fun fact about a doggo.",
 | 
			
		||||
    usage: "dogfact/pupfact"
 | 
			
		||||
  };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										3
									
								
								src/events/disconnect.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								src/events/disconnect.js
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,3 @@
 | 
			
		|||
module.exports = client => { // logs if the bot gets disconnected from discord.
 | 
			
		||||
	client.logger.warn(`Bot disconnected at ${new Date()}`);
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										3
									
								
								src/events/reconnection.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								src/events/reconnection.js
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,3 @@
 | 
			
		|||
module.exports = client => { // logs when the bot reconnects to discord
 | 
			
		||||
	client.logger.info(`Reconnecting at ${new Date()}`);
 | 
			
		||||
};
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue