Skip to content

Commit 383ee80

Browse files
committed
Merge branch 'master' of github.com:gamer-gang/gamerbot
2 parents 295aabc + 3b7ff9b commit 383ee80

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/commands/games/_wager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export async function canAfford(
1212
where: { userId },
1313
select: { balance: true },
1414
})
15-
if ((user?.balance ?? 0) < wager) {
15+
if ((user?.balance ?? 0) < Math.abs(wager)) {
1616
interaction.reply({
1717
embeds: [Embed.error(`You are too broke to bet ${wager} egg${wager === 1 ? '' : 's'}.`)],
1818
})
@@ -24,7 +24,7 @@ export async function canAfford(
2424
select: { balance: true },
2525
})
2626

27-
if ((opponent?.balance ?? 0) < wager) {
27+
if ((opponent?.balance ?? 0) < Math.abs(wager)) {
2828
interaction.reply({
2929
embeds: [
3030
Embed.error(

0 commit comments

Comments
 (0)