This commit is contained in:
Marcus Netz
2020-11-23 14:24:29 +01:00
parent 1270815aba
commit 057859a820
12 changed files with 454 additions and 429 deletions

View File

@ -1,20 +1,22 @@
module.exports = async (message, args, db) => {
try {
console.log(message)
db.find({
user: message.author.tag
}, function (err, docs) {
if(!docs.length>0)
db.insert({user: message.author.tag,
gold: 0,
silver: 0,
bronce: 0,
iron: 0,
hp: 0
})
console.log(docs)
});
} catch (e) {
throw e
}
}
try {
console.log(message);
db.find({
user: message.author.tag,
}, function(err, docs) {
if(!docs.length > 0) {
db.insert({ user: message.author.tag,
gold: 0,
silver: 0,
bronce: 0,
iron: 0,
hp: 0,
});
}
console.log(docs);
});
}
catch (e) {
throw e;
}
};