diff --git a/src/utils/database.ts b/src/utils/database.ts
index 75a79d9..62aee7c 100644
--- a/src/utils/database.ts
+++ b/src/utils/database.ts
@@ -14,14 +14,17 @@
 import _ from "lodash";
 import defaultData from "../config/default.js";
 
-const username = encodeURIComponent(config.mongoOptions.username);
-const password = encodeURIComponent(config.mongoOptions.password);
+let username, password;
+
+// @ts-expect-error
+if (Object.keys(config.mongoOptions).includes("username")) username = encodeURIComponent(config.mongoOptions.username);
+// @ts-expect-error
+if (Object.keys(config.mongoOptions).includes("password")) password = encodeURIComponent(config.mongoOptions.password);
 
 const mongoClient = new MongoClient(
     username
-        ? `mongodb://${username}:${password}@${config.mongoOptions.host}?authMechanism=DEFAULT`
-        : `mongodb://${config.mongoOptions.host}`,
-    { authSource: config.mongoOptions.authSource }
+        ? `mongodb://${username}:${password}@${config.mongoOptions.host}?authMechanism=DEFAULT&authSource=${config.mongoOptions.authSource}`
+        : `mongodb://${config.mongoOptions.host}`
 );
 await mongoClient.connect();
 const database = mongoClient.db();
@@ -221,7 +224,7 @@
 interface findDocSchema {
     channelID: string;
     messageID: string;
-    code: string;
+    transcript: string;
 }
 
 export class Transcript {
@@ -284,20 +287,16 @@
     async deleteAll(guild: string) {
         // console.log("Transcript delete")
         const filteredDocs = await this.transcripts.find({ guild: guild }).toArray();
-        const filteredDocs1  = await this.messageToTranscript.find({ guild: guild }).toArray();
         for (const doc of filteredDocs) {
             await this.transcripts.deleteOne({ code: doc.code });
         }
-        for (const doc of filteredDocs1) {
-            await this.messageToTranscript.deleteOne({ code: doc.code });
-        }
     }
 
     async readEncrypted(code: string) {
         // console.log("Transcript read")
         let doc: TranscriptSchema | null = await this.transcripts.findOne({ code: code });
         let findDoc: findDocSchema | null = null;
-        if (!doc) findDoc = await this.messageToTranscript.findOne({ code: code });
+        if (!doc) findDoc = await this.messageToTranscript.findOne({ transcript: code });
         if (findDoc) {
             const message = await (
                 client.channels.cache.get(findDoc.channelID) as Discord.TextBasedChannel | null
@@ -334,7 +333,7 @@
         let doc: TranscriptSchema | null = await this.transcripts.findOne({ code: code });
         let findDoc: findDocSchema | null = null;
         console.log(doc);
-        if (!doc) findDoc = await this.messageToTranscript.findOne({ code: code });
+        if (!doc) findDoc = await this.messageToTranscript.findOne({ transcript: code });
         if (findDoc) {
             const message = await (
                 client.channels.cache.get(findDoc.channelID) as Discord.TextBasedChannel | null
@@ -837,6 +836,10 @@
     }
 }
 
+export class Plugins {
+    
+}
+
 export interface GuildConfig {
     id: string;
     version: number;
