glass-shatter, ghost, tax Commands + Bug Fixes

This commit is contained in:
Dragon Fire
2020-04-19 16:23:43 -04:00
parent d24a413785
commit 0a3f632b7a
10 changed files with 147 additions and 7 deletions
+32
View File
@@ -0,0 +1,32 @@
const Command = require('../../structures/Command');
const { formatNumber } = require('../../util/Util');
module.exports = class TaxCommand extends Command {
constructor(client) {
super(client, {
name: 'tax',
group: 'edit-number',
memberName: 'tax',
description: 'Determines the total cost of something plus tax.',
args: [
{
key: 'rate',
prompt: 'What is the tax rate (in %)?',
type: 'integer',
max: 100,
min: 0
},
{
key: 'amount',
prompt: 'How much money should be converted?',
type: 'float'
},
]
});
}
run(msg, { rate, amount }) {
const result = amount + ((rate / 100) * amount);
return msg.reply(`$${formatNumber(result, 2)}`);
}
};