Skip to content

Commit

Permalink
Merge branch 'master' of github.com:gamer-gang/gamerbot
Browse files Browse the repository at this point in the history
  • Loading branch information
calico32 committed Dec 4, 2024
2 parents 295aabc + 3b7ff9b commit 383ee80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/games/_wager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export async function canAfford(
where: { userId },
select: { balance: true },
})
if ((user?.balance ?? 0) < wager) {
if ((user?.balance ?? 0) < Math.abs(wager)) {
interaction.reply({
embeds: [Embed.error(`You are too broke to bet ${wager} egg${wager === 1 ? '' : 's'}.`)],
})
Expand All @@ -24,7 +24,7 @@ export async function canAfford(
select: { balance: true },
})

if ((opponent?.balance ?? 0) < wager) {
if ((opponent?.balance ?? 0) < Math.abs(wager)) {
interaction.reply({
embeds: [
Embed.error(
Expand Down

0 comments on commit 383ee80

Please sign in to comment.