Remade database connections, based on promises now

This commit is contained in:
2019-05-01 21:41:06 +10:00
parent f9b5512073
commit 581bedf162
2 changed files with 100 additions and 123 deletions

View File

@@ -14,10 +14,14 @@ const colors = require('colors');
//Database Connection
client.database.connect().then(con => {
try {
client.database.get_setting('token').then(token => {
console.log("=Discord==================")
client.login(token)
})
console.log("=Discord==================")
client.database.get_setting('token')
.then(token => {
client.login(token)
})
.catch(e => {
console.log("Error getting token")
})
} catch (e) {
console.log(e)
}