I want to get each user who has a specific value in their row and access each of them. I want something like
sql.prepare("SELECT * FROM raid WHERE raid1 > 0 AND NOT id='685337576810610734'").get().forEach(async (user) => {
bot.users.get(user).send("THE CORRUPT HAS APPEARED! YOU FAILED TO DEFEATH THE CORRUPTED!")
let usera = await getScore.get(user)
usera.raid1 = 0
setScore.run(usera)
})
But for it to actually go through each user who has raid1 > 0. Im trying to iterate through the array as its output but I have no idea how to start this out. Node.js The code returns a Type not a function error at the .get() I want to have it go through each user who passed the WHERE raid1 > 0 .
The sqlite method doesn't work and Im not sure how to get all users who have raid1 > 0.