woomy-v2/bot/commands/Bot/ping.js

25 lines
834 B
JavaScript
Raw Normal View History

2020-10-28 13:29:35 +00:00
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.',
2020-10-29 08:20:45 +00:00
arguments: '',
details: '',
examples: ''
2020-10-28 13:29:35 +00:00
};
}
run (client, message, args, data) { //eslint-disable-line no-unused-vars
2020-10-29 08:20:45 +00:00
message.channel.createMessage(client.constants.replies.ping.random())
2020-10-28 13:29:35 +00:00
.then(m => {
m.edit(`${m.content} \`roundtrip: ${m.timestamp - message.timestamp}ms | websocket: ${message.channel.guild.shard.latency}ms\``);
});
}
};