woomy/commands/ping.js

24 lines
518 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-04-01 08:33:02 +00:00
cooldown: 2000
2020-03-31 07:59:09 +00:00
}
exports.help = {
name: 'ping',
2020-04-11 09:30:51 +00:00
category: 'Bot',
2020-03-31 07:59:09 +00:00
description: 'Displays bot latency in miliseconds.',
2020-04-06 16:35:06 +00:00
usage: 'ping',
params: ''
2020-03-31 07:59:09 +00:00
}
exports.run = async (client, message, args, level, data) => {
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-04-01 08:33:02 +00:00
`Pong! \`${msg.createdTimestamp - message.createdTimestamp}ms\` (💗 \`${Math.round(client.ws.ping)}ms\`)`
2020-03-31 07:59:09 +00:00
)
}