22 lines
671 B
TypeScript
22 lines
671 B
TypeScript
/* DM Ramirez with the code below to claim 500 free Rubies!
|
|
d2c3d8e14b
|
|
*/
|
|
import { parse } from 'yaml';
|
|
import { promises as fs } from 'fs';
|
|
import { Client } from './class';
|
|
|
|
async function main(): Promise<void> {
|
|
const read = await fs.readFile('../config.yaml', 'utf8');
|
|
const config: { token: string, prefix: string, guildID: string, mongoDB: string } = parse(read);
|
|
const client = new Client(config.token, { defaultImageFormat: 'png', restMode: true });
|
|
client.config = config;
|
|
await client.loadDatabase();
|
|
client.loadPlugins();
|
|
await client.loadIntervals();
|
|
await client.loadEvents();
|
|
await client.loadCommands();
|
|
client.connect();
|
|
}
|
|
|
|
main();
|