let lastNumb = 0;
client.on("messageCreate", msg => {
const num = Number(msg.content)
if (num >= 0) {
if (num == lastNumb + 1) {
msg.react(":white_check_mark:")
lastNumb += 1
} else {
msg.reply(`uh oh we lost it at: ${lastNumb}`)
}
} else if (num < 0) {
msg.reply("invalid number")
}
});
let lastNumb = 0;
client.on("messageCreate", msg => {
const num = Number(msg.content)
if (num >= 0) {
if (num == lastNumb + 1) {
msg.react(":white_check_mark:")
lastNumb += 1
} else {
msg.reply(`uh oh we lost it at: ${lastNumb}`)
}
} else if (num < 0) {
msg.reply("invalid number")
}
});