mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 22:27:44 +02:00
format number in wyptb
This commit is contained in:
@@ -3,7 +3,7 @@ const request = require('node-superfetch');
|
|||||||
const Entities = require('html-entities').AllHtmlEntities;
|
const Entities = require('html-entities').AllHtmlEntities;
|
||||||
const entities = new Entities();
|
const entities = new Entities();
|
||||||
const { stripIndents } = require('common-tags');
|
const { stripIndents } = require('common-tags');
|
||||||
const { verify } = require('../../util/Util');
|
const { verify, formatNumber } = require('../../util/Util');
|
||||||
|
|
||||||
module.exports = class WillYouPressTheButtonCommand extends Command {
|
module.exports = class WillYouPressTheButtonCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -45,7 +45,7 @@ module.exports = class WillYouPressTheButtonCommand extends Command {
|
|||||||
this.client.games.delete(msg.channel.id);
|
this.client.games.delete(msg.channel.id);
|
||||||
return msg.reply(stripIndents`
|
return msg.reply(stripIndents`
|
||||||
**${Math.round(((verification ? dilemma.yes : dilemma.no) / totalVotes) * 100)}%** of people agree!
|
**${Math.round(((verification ? dilemma.yes : dilemma.no) / totalVotes) * 100)}%** of people agree!
|
||||||
Yes ${dilemma.yes} - ${dilemma.no} No
|
Yes ${formatNumber(dilemma.yes)} - ${formatNumber(dilemma.no)} No
|
||||||
`);
|
`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.client.games.delete(msg.channel.id);
|
this.client.games.delete(msg.channel.id);
|
||||||
|
|||||||
Reference in New Issue
Block a user