Skip to content

Commit

Permalink
Fix blackjack
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMonDon committed Jul 22, 2024
1 parent 056922f commit a18c160
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions commands/Economy/blackjack.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,21 +216,21 @@ class BlackJack extends Command {
const newAmount = cash + amount;
await db.set(`servers.${msg.guild.id}.users.${msg.member.id}.economy.cash`, newAmount.toString());

let csAmount = currencySymbol + newAmount.toLocaleString();
let csAmount = currencySymbol + amount.toLocaleString();
csAmount = csAmount.length > 1024 ? csAmount.slice(0, 1021) + '...' : csAmount;
return cardEmbed(`Result: You win ${csAmount}`);
} else if (blackjack) {
const newAmount = cash + amount;
await db.set(`servers.${msg.guild.id}.users.${msg.member.id}.economy.cash`, newAmount.toString());

let csAmount = currencySymbol + newAmount.toLocaleString();
let csAmount = currencySymbol + amount.toLocaleString();
csAmount = csAmount.length > 1024 ? csAmount.slice(0, 1021) + '...' : csAmount;
return cardEmbed(`Result: BlackJack, you win ${csAmount}`);
} else if (bust) {
const newAmount = cash - amount;
await db.set(`servers.${msg.guild.id}.users.${msg.member.id}.economy.cash`, newAmount.toString());

let csAmount = currencySymbol + newAmount.toLocaleString();
let csAmount = currencySymbol + amount.toLocaleString();
csAmount = csAmount.length > 1024 ? csAmount.slice(0, 1021) + '...' : csAmount;
return cardEmbed(`Result: Bust, you lose ${csAmount}`);
} else if (push) {
Expand Down

0 comments on commit a18c160

Please sign in to comment.