mirror of
https://github.com/litruv/DAdmin.git
synced 2026-07-24 02:36:11 +10:00
Remade database connections, based on promises now
This commit is contained in:
12
index.js
12
index.js
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user