Development (#83)

diff --git a/src/utils/database.ts b/src/utils/database.ts
index 67ff5ac..b42b8b2 100644
--- a/src/utils/database.ts
+++ b/src/utils/database.ts
@@ -25,7 +25,7 @@
         : `mongodb://${config.mongoOptions.host}`
 );
 await mongoClient.connect();
-const database = mongoClient.db();
+export const database = mongoClient.db();
 
 const collectionOptions = { authdb: config.mongoOptions.authSource, w: "majority" };
 const getIV = () => crypto.randomBytes(16);
diff --git a/src/utils/eventScheduler.ts b/src/utils/eventScheduler.ts
index 48eee63..34ba4e8 100644
--- a/src/utils/eventScheduler.ts
+++ b/src/utils/eventScheduler.ts
@@ -2,7 +2,7 @@
 import client from "./client.js";
 import * as fs from "fs";
 import * as path from "path";
-import config from "../config/main.js";
+import { database } from "./database.js";
 import { TextChannel } from "discord.js";
 
 class EventScheduler {
@@ -10,8 +10,8 @@
 
     constructor() {
         this.agenda = new Agenda({
+            mongo: database,
             db: {
-                address: config.mongoOptions.host,
                 collection: "eventScheduler"
             }
         });