ping
This commit is contained in:
		
							parent
							
								
									8e8d372b86
								
							
						
					
					
						commit
						25af0382c7
					
				
					 3 changed files with 37 additions and 1 deletions
				
			
		
							
								
								
									
										24
									
								
								bot/commands/Bot/ping.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								bot/commands/Bot/ping.js
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,24 @@
 | 
				
			||||||
 | 
					module.exports = class {
 | 
				
			||||||
 | 
					    constructor (name, category) {
 | 
				
			||||||
 | 
					        this.name = name,
 | 
				
			||||||
 | 
					        this.category = category,
 | 
				
			||||||
 | 
					        this.enabled = true,
 | 
				
			||||||
 | 
					        this.devOnly = false,
 | 
				
			||||||
 | 
					        this.aliases = [],
 | 
				
			||||||
 | 
					        this.userPerms = [],
 | 
				
			||||||
 | 
					        this.botPerms = [],
 | 
				
			||||||
 | 
					        this.cooldown = 2000,
 | 
				
			||||||
 | 
					        this.help = {
 | 
				
			||||||
 | 
					            description: 'Test response time between Woomy and Discord.',
 | 
				
			||||||
 | 
					            usage: 'ping',
 | 
				
			||||||
 | 
					            examples: null
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    run (client, message, args, data) { //eslint-disable-line no-unused-vars
 | 
				
			||||||
 | 
					        message.channel.createMessage(client.constants.responses.ping.random())
 | 
				
			||||||
 | 
					            .then(m => {
 | 
				
			||||||
 | 
					                m.edit(`${m.content} \`roundtrip: ${m.timestamp - message.timestamp}ms | websocket: ${message.channel.guild.shard.latency}ms\``);
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
| 
						 | 
					@ -2,5 +2,6 @@ module.exports = {
 | 
				
			||||||
    activities: require('./activities.json'),
 | 
					    activities: require('./activities.json'),
 | 
				
			||||||
    colours: require('./colours.json'),
 | 
					    colours: require('./colours.json'),
 | 
				
			||||||
    emojis: require('./emojis.json'),
 | 
					    emojis: require('./emojis.json'),
 | 
				
			||||||
    categories: require('./categories.json')
 | 
					    categories: require('./categories.json'),
 | 
				
			||||||
 | 
					    responses: require ('./responses.json')
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
							
								
								
									
										11
									
								
								bot/constants/responses.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								bot/constants/responses.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,11 @@
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    "ping": [
 | 
				
			||||||
 | 
					        "Heya!",
 | 
				
			||||||
 | 
					        "Pong!",
 | 
				
			||||||
 | 
					        "Did you need something?",
 | 
				
			||||||
 | 
					        "Hello?",
 | 
				
			||||||
 | 
					        "Hi there!",
 | 
				
			||||||
 | 
					        "You called?",
 | 
				
			||||||
 | 
					        "Huh?"
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue