Fix effects helper returning an error when the buttons are disabled (#454)
All checks were successful
Test / build (push) Successful in 45s
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:
parent
434f162a01
commit
c9f7c443cf
1 changed files with 1 additions and 1 deletions
|
@ -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\`!`;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue