Fix effects helper returning an error when the buttons are disabled (#454)
All checks were successful
Test / build (push) Successful in 45s

-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: #454
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
This commit is contained in:
Ethan Lane 2025-05-28 16:14:42 +01:00 committed by Vylpes
parent 434f162a01
commit c9f7c443cf

View file

@ -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\`!`;
}