diff --git a/src/utils/database.ts b/src/utils/database.ts
index c46a39d..89c108b 100644
--- a/src/utils/database.ts
+++ b/src/utils/database.ts
@@ -55,7 +55,7 @@
             } catch (e) {
                 guildObj = null;
             }
-            if(!guildObj) await this.delete(guild.id);
+            if (!guildObj) await this.delete(guild.id);
         }
     }
 
@@ -251,8 +251,13 @@
             .replace(/\//g, "_")
             .replace(/\+/g, "-")
             .substring(0, 32);
-        const iv = getIV().toString("base64").substring(0, 16).replace(/=/g, "").replace(/\//g, "_").replace(/\+/g, "-");
-	console.log(iv);
+        const iv = getIV()
+            .toString("base64")
+            .substring(0, 16)
+            .replace(/=/g, "")
+            .replace(/\//g, "_")
+            .replace(/\+/g, "-");
+        console.log(iv);
         for (const message of transcript.messages) {
             if (message.content) {
                 const encCipher = crypto.createCipheriv("AES-256-CBC", key, iv);
@@ -321,10 +326,10 @@
     }
 
     async read(code: string, key: string, iv: string) {
-        console.log("Transcript read")
+        console.log("Transcript read");
         let doc: TranscriptSchema | null = await this.transcripts.findOne({ code: code });
         let findDoc: findDocSchema | null = null;
-	console.log(doc)
+        console.log(doc);
         if (!doc) findDoc = await this.messageToTranscript.findOne({ transcript: code });
         if (findDoc) {
             const message = await (
@@ -350,7 +355,7 @@
             if (!data) return null;
             doc = JSON.parse(Buffer.from(data).toString()) as TranscriptSchema;
         }
-	console.log(doc)
+        console.log(doc);
         if (!doc) return null;
         for (const message of doc.messages) {
             if (message.content) {
@@ -406,8 +411,8 @@
                     topRole: {
                         color: message.member ? message.member.roles.highest.color : 0x000000
                     },
-                    iconURL: (message.member?.user || message.author)?.displayAvatarURL({ forceStatic: true }),
-                    bot: message.author?.bot || false
+                    iconURL: (message.member?.user || message.author).displayAvatarURL({ forceStatic: true }),
+                    bot: message.author.bot || false
                 },
                 createdTimestamp: message.createdTimestamp
             };
