I am still very new with coding so I follow tutorials and I'm currently trying to make a currency system and so I've been trying to follow this tutorial: https://youtu.be/PnXv-0RUdRI and one of the things that are in his code is import * as db from "quick.db";
however I got this error SyntaxError: Unexpected token *
and I'm not sure how to change or fix it. I've looked everywhere but nothing makes sense to me.
This is the code that I've currently been following
import * as db from "quick.db";
import { isNull } from "util";
let allUsers = client.users.array();
for(let i = 0; i < allUsers.length; i++){
if(isNull(db.get(allUsers[i].id))){
db.set(allUsers[i].id, {money: 50, items: [] })
}
}
if(isNull(db.get(member.id))){
db.set(member.id, {money: 50, items: [] })
}
I was expecting it to go just like the video where I start up the bot and I get a json.sqlite
but instead I got a SyntaxError: Unexpected token *