From c9f7c443cfa9a8e83a376d7800b82a7fd026c1fd Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Wed, 28 May 2025 16:14:42 +0100 Subject: [PATCH] Fix effects helper returning an error when the buttons are disabled (#454) -This caused an issue with the updated embed after confirming to buy an effect it checking you had enough currency after taking the currency away #453 Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/454 Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- src/helpers/EffectHelper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/EffectHelper.ts b/src/helpers/EffectHelper.ts index 235ea08..09e096c 100644 --- a/src/helpers/EffectHelper.ts +++ b/src/helpers/EffectHelper.ts @@ -151,7 +151,7 @@ export default class EffectHelper { AppLogger.LogInfo("EffectHelper", `Created initial user entity for : ${userId}`); } - if (user.Currency < totalCost) { + if (!disabled && user.Currency < totalCost) { return `You don't have enough currency to buy this! You have \`${user.Currency} Currency\` and need \`${totalCost} Currency\`!`; }