'Discordjs v12 args
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")
}
//
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
