Can anyone help me with args? i have tested .bet (number under 99) but its wont reply me the message and same as .bet (number more than 100)
//My code
if (message.content.startsWith(".bet")) {
let bet = args.join(" ");
// let bet = args[1]
if (!args[0]) {
return message.channel.send(`Woops, looks like you forgot to specify an amount to bet`)
}
and this is the problems
//the problems
if (args[1] <= 99) {
return
message.channel.send("Sorry, You cannot bet under 99$")
}
if (args[2] >= 100) {
return
await db.add(`user.money_${message.author.id}`, -bet)
message.channel.send("test")
}
//
}
The code snippet you added in your post doesn't show the part where you define the
argsvariable, so I created one here.