We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 295aabc + 3b7ff9b commit 383ee80Copy full SHA for 383ee80
src/commands/games/_wager.ts
@@ -12,7 +12,7 @@ export async function canAfford(
12
where: { userId },
13
select: { balance: true },
14
})
15
- if ((user?.balance ?? 0) < wager) {
+ if ((user?.balance ?? 0) < Math.abs(wager)) {
16
interaction.reply({
17
embeds: [Embed.error(`You are too broke to bet ${wager} egg${wager === 1 ? '' : 's'}.`)],
18
@@ -24,7 +24,7 @@ export async function canAfford(
24
25
26
27
- if ((opponent?.balance ?? 0) < wager) {
+ if ((opponent?.balance ?? 0) < Math.abs(wager)) {
28
29
embeds: [
30
Embed.error(
0 commit comments