Added discord methods in events.js and renamed some variables in config then adapted the code around that. Redid date structures in Logger

This commit is contained in:
plane000
2018-10-26 21:13:06 +01:00
parent c3a98599cd
commit 3f1a80e83b
5 changed files with 41 additions and 18 deletions

View File

@@ -3,8 +3,7 @@ import Discord from 'discord.js';
import {Logger} from './logger';
import {Config} from './config';
import {Database} from './database/database';
let client;
import {Events} from './events';
init();
async function init() {
@@ -15,8 +14,10 @@ async function init() {
config.load();
await Database.init();
Logger.debug(JSON.stringify(await Database.Guilds.newGuild(1234, "Hello"), null, 4));
Logger.debug(JSON.stringify(await Database.Guilds.deleteGuild(1234), null, 4));
// Logger.debug(JSON.stringify(await Database.Guilds.newGuild(1234, "Hello"), null, 4));
// Logger.debug(JSON.stringify(await Database.Guilds.deleteGuild(1234), null, 4));
client = new Discord.Client();
const client = new Discord.Client();
const eventHandler = new Events(client);
eventHandler.handle();
}