From f577534b608e3c164b3d730ad9a8634a9edd9783 Mon Sep 17 00:00:00 2001 From: Ole Date: Fri, 15 Jul 2022 14:28:58 +0200 Subject: [PATCH 1/2] Fix: Fixede the shop buy command --- modules/economy-system/commands/shop.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/economy-system/commands/shop.js b/modules/economy-system/commands/shop.js index 2af10c14..3dbd84fc 100644 --- a/modules/economy-system/commands/shop.js +++ b/modules/economy-system/commands/shop.js @@ -50,7 +50,7 @@ module.exports.subcommands = { content: interaction.client.configurations['economy-system']['strings']['notEnoughMoney'], ephemeral: true }); - balance(interaction.client, interaction.user.id, 'remove', item.price); + await editBalance(interaction.client, interaction.user.id, 'remove', item.price); await interaction.member.roles.add(item.role); createleaderboard(interaction.client); interaction.reply(embedType(interaction.client.configurations['economy-system']['strings']['buyMsg'], {'%item%': itemName['value']}, {ephemeral: true})); @@ -152,4 +152,4 @@ module.exports.config = { ] } ] -}; \ No newline at end of file +}; From 2563129fa8b44759e33a156d44d78256e4990cbc Mon Sep 17 00:00:00 2001 From: Ole Date: Fri, 15 Jul 2022 14:32:17 +0200 Subject: [PATCH 2/2] Updated imports --- modules/economy-system/commands/shop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/economy-system/commands/shop.js b/modules/economy-system/commands/shop.js index 3dbd84fc..922dec48 100644 --- a/modules/economy-system/commands/shop.js +++ b/modules/economy-system/commands/shop.js @@ -1,4 +1,4 @@ -const {createShopItem, balance, createShopMsg, deleteShopItem, createleaderboard} = require('../economy-system'); +const {createShopItem, editBalance, createShopMsg, deleteShopItem, createleaderboard} = require('../economy-system'); const {embedType} = require('../../../src/functions/helpers'); const {localize} = require('../../../src/functions/localize');