woomy/commands/ping.js

23 lines
488 B
JavaScript
Raw Normal View History

2020-03-31 07:59:09 +00:00
exports.conf = {
enabled: true,
guildOnly: false,
aliases: [],
permLevel: 'User',
requiredPerms: [],
2020-03-31 15:45:45 +00:00
cooldown: 5000
2020-03-31 07:59:09 +00:00
}
exports.help = {
name: 'ping',
category: 'Utility',
description: 'Displays bot latency in miliseconds.',
usage: 'ping'
}
exports.run = async (client, message) => {
2020-03-31 15:45:45 +00:00
const msg = await message.channel.send('Pinging...')
2020-03-31 07:59:09 +00:00
msg.edit(
2020-03-31 15:45:45 +00:00
`Pong! \`${msg.createdTimestamp - message.createdTimestamp}ms\` (💗\`${Math.round(client.ws.ping)}ms\`)`
2020-03-31 07:59:09 +00:00
)
}