Development (#83)

pull/89/head
Skyler 3 years ago committed by GitHub
commit 9f1836b3ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -25,7 +25,7 @@ const mongoClient = new MongoClient(
: `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);

@ -2,7 +2,7 @@ import { Agenda } from "@hokify/agenda";
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 @@ class EventScheduler {
constructor() {
this.agenda = new Agenda({
mongo: database,
db: {
address: config.mongoOptions.host,
collection: "eventScheduler"
}
});

Loading…
Cancel
Save