This commit is contained in:
Emily 2020-10-29 00:29:35 +11:00
parent 8e8d372b86
commit 25af0382c7
3 changed files with 37 additions and 1 deletions

24
bot/commands/Bot/ping.js Normal file
View 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\``);
});
}
};

View file

@ -2,5 +2,6 @@ module.exports = {
activities: require('./activities.json'),
colours: require('./colours.json'),
emojis: require('./emojis.json'),
categories: require('./categories.json')
categories: require('./categories.json'),
responses: require ('./responses.json')
};

View file

@ -0,0 +1,11 @@
{
"ping": [
"Heya!",
"Pong!",
"Did you need something?",
"Hello?",
"Hi there!",
"You called?",
"Huh?"
]
}