Format numbers, style changes, fixes

This commit is contained in:
Daniel Odendahl Jr
2018-10-13 02:28:07 +00:00
parent 5c2c9d25a5
commit b0780575be
45 changed files with 146 additions and 159 deletions
+3 -2
View File
@@ -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\`
`);
}
};