mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 16:19:12 +02:00
Format numbers, style changes, fixes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { stripIndents } = require('common-tags');
|
||||
const { formatNumber } = require('../../util/Util');
|
||||
|
||||
module.exports = class PingCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -17,8 +18,8 @@ module.exports = class PingCommand extends Command {
|
||||
const message = await msg.say('Pinging...');
|
||||
const ping = Math.round(message.createdTimestamp - msg.createdTimestamp);
|
||||
return message.edit(stripIndents`
|
||||
🏓 P${'o'.repeat(Math.ceil(ping / 100))}ng! \`${ping}ms\`
|
||||
Heartbeat: \`${Math.round(this.client.ping)}ms\`
|
||||
🏓 P${'o'.repeat(Math.min(Math.round(ping / 100), 1500))}ng! \`${formatNumber(ping)}ms\`
|
||||
Heartbeat: \`${formatNumber(Math.round(this.client.ping))}ms\`
|
||||
`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user