I am trying to use SQLITE3 to store data for my discord bot and here i need to save a number that goes up each time a command is used. Here is my code: (creating table and setting the value to 0.)
db.run("CREATE TABLE gbanCases ( number INT )")
db.run("INSERT INTO gbanCases (number) VALUES ($number)", {
$number : 0
});
Trying to see what number returns:
var caseNumber = db.run("SELECT number FROM gbanCases")
console.log(caseNumber)
The thing is that caseNumber returns me "[object Object]" and I want it to return the 0 that was setted up earlier. Please help me if you can, i'm still very new to this.