const { Command } = require('discord.js-commando');

const Money = require('../../postgreSQL/models/Money');
const Redis = require('../../redis/Redis');

const redis = new Redis();

module.exports = class MoneyRemoveCommand extends Command {
	constructor(client) {
		super(client, {
			name: 'remove-money',
			aliases: ['remove-donut', 'remove-donuts', 'money-remove', 'donut-remove', 'donuts-remove'],
			group: 'currency',
			memberName: 'remove',
			description: 'Displays the money you have earned.',
			details: 'Display the amount of money you have earned.',

			args: [
				{
					key: 'member',
					prompt: 'What user would you like to remove donuts?',
					type: 'member'
				},
				{
					key: 'donuts',
					prompt: 'How many donuts do you want to remove from that user?',
					type: 'integer'
				}
			]
		});
	}

	hasPermission(msg) {
		return msg.author.id === this.client.options.owner;
	}

	async run(msg, args) {
		const user = args.member;
		const donuts = args.donuts;

		return Money.findOne({ where: { userID: user.id } }).then(member => {
			if (!member) {
				return msg.say('Fek u no user.');
			} else {
				member.decrement('money', { by: donuts });
				member.save();
				return redis.db.getAsync(`money${user.id}`).then(balance => {
					redis.db.setAsync(`money${user.id}`, parseInt(balance) - donuts);
				});
			}
		});
	}
};

@@ -56,126 +56,76 @@
 nst 
-Money = require('../../postgreSQL/models/Money');%0Aconst Redis = require('../../redis/Redis');%0A%0Aconst redis = new Redis
+Currency = require('../../Currency');%0A%0Aconst currency = new Currency
 ();%0A
@@ -940,340 +940,38 @@
 %0A%0A%09%09
-return Money.findOne(%7B where: %7B userID: user.id %7D %7D).then(member =%3E %7B%0A%09%09%09if (!member) %7B%0A%09%09%09%09return msg.say('Fek u no user.');%0A%09%09%09%7D else %7B%0A%09%09%09%09member.decrement('money', %7B by: donuts %7D);%0A%09%09%09%09member.save();%0A%09%09%09%09return redis.db.getAsync(%60money$%7Buser.id%7D%60).then(balance =%3E %7B%0A%09%09%09%09%09redis.db.setAsync(%60money$%7Buser.id%7D%60, parseInt(balance)
+currency.addBalance(user.id,
  -
- 
 donu
@@ -979,27 +979,8 @@
 s);%0A
-%09%09%09%09%7D);%0A%09%09%09%7D%0A%09%09%7D);%0A
 %09%7D%0A%7D

Rewrite remove donuts command