2020-02-01 23:23:36 +00:00
|
|
|
import 'module-alias/register';
|
|
|
|
|
|
|
|
import { token } from '@config/bot';
|
|
|
|
import { EventLoader } from '@events/eventLoader';
|
|
|
|
import { PluginClient } from '@lifeguard/PluginClient';
|
|
|
|
import { PluginLoader } from '@plugins/pluginLoader';
|
|
|
|
import { StructureLoader } from '@structures/structureLoader';
|
|
|
|
|
|
|
|
StructureLoader();
|
2020-01-13 04:10:56 +00:00
|
|
|
|
2020-01-13 22:38:12 +00:00
|
|
|
const lifeguard = new PluginClient();
|
2020-01-13 04:10:56 +00:00
|
|
|
|
2020-01-13 22:38:12 +00:00
|
|
|
EventLoader(lifeguard);
|
|
|
|
PluginLoader().then(plugins => {
|
|
|
|
lifeguard.plugins = plugins;
|
|
|
|
});
|
|
|
|
|
2020-01-19 18:55:35 +00:00
|
|
|
lifeguard.db
|
|
|
|
.connect()
|
|
|
|
.then(() => console.log('Connected to MongoDB'))
|
|
|
|
.catch(err => console.error(err));
|
|
|
|
|
2020-01-13 22:38:12 +00:00
|
|
|
lifeguard.login(token).then(() => {
|
|
|
|
if (lifeguard.user) {
|
2020-01-13 04:10:56 +00:00
|
|
|
console.log(
|
|
|
|
`Logged in to ${lifeguard.user.username}#${lifeguard.user.discriminator}`
|
2020-01-13 22:38:12 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|