I'm trying to make my database easier to access when I'm coding.
This is the function (located in the main bot file):
function getDB(area,argument){
db.collection(area).doc(argument).get().then((q) => {
})
}
This is how I call it:
getDB('economy',msg.author.id)
When you console.log() getDB it returns nothing, but when you console.log() q.data() in the main function it does print the full string from the DB.
How would I get it to return the database information?