From 826f28556e5e2d988db6d147856aa32cfe9de2c1 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Mon, 15 Jun 2020 21:34:41 -0400 Subject: [PATCH] new config options --- src/class/Client.ts | 8 ++++---- src/main.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/class/Client.ts b/src/class/Client.ts index 886c53c..2d25fb8 100644 --- a/src/class/Client.ts +++ b/src/class/Client.ts @@ -2,10 +2,10 @@ import eris from 'eris'; import mongoose from 'mongoose'; import { promises as fs } from 'fs'; import { Collection, Command, Util, ServerManagement, Event } from '.'; -import { Member, MemberInterface, Moderation, ModerationInterface, Redirect, RedirectInterface } from '../models'; +import { Member, MemberInterface, Moderation, ModerationInterface, PagerNumber, PagerNumberInterface, Redirect, RedirectInterface } from '../models'; export default class Client extends eris.Client { - public config: { token: string, prefix: string, guildID: string, mongoDB: string }; + public config: { token: string, prefix: string, guildID: string, mongoDB: string, emailPass: string, }; public commands: Collection; @@ -17,14 +17,14 @@ export default class Client extends eris.Client { public serverManagement: ServerManagement; - public db: { Member: mongoose.Model, Moderation: mongoose.Model, Redirect: mongoose.Model }; + public db: { Member: mongoose.Model, Moderation: mongoose.Model, PagerNumber: mongoose.Model, Redirect: mongoose.Model }; constructor(token: string, options?: eris.ClientOptions) { super(token, options); this.commands = new Collection(); this.events = new Collection(); this.intervals = new Collection(); - this.db = { Member, Moderation, Redirect }; + this.db = { Member, Moderation, PagerNumber, Redirect }; } public async loadDatabase() { diff --git a/src/main.ts b/src/main.ts index c3682ad..4677d4b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -9,7 +9,7 @@ import * as commandFiles from './commands'; async function main(): Promise { const read = await fs.readFile('../config.yaml', 'utf8'); - const config: { token: string, prefix: string, guildID: string, mongoDB: string } = parse(read); + const config: { token: string, prefix: string, guildID: string, mongoDB: string, emailPass: string } = parse(read); const client = new Client(config.token, { defaultImageFormat: 'png', restMode: true }); client.config = config; await client.loadDatabase();