woomy/commands/ping.js
2020-04-01 19:33:02 +11:00

22 lines
489 B
JavaScript

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