Fix various environment-dependent compilation errors
diff --git a/src/utils/database.ts b/src/utils/database.ts
index 19aa00b..4f94712 100644
--- a/src/utils/database.ts
+++ b/src/utils/database.ts
@@ -16,10 +16,8 @@
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);
+if ("username" in config.mongoOptions) username = encodeURIComponent(config.mongoOptions.username as string);
+if ("password" in config.mongoOptions) password = encodeURIComponent(config.mongoOptions.password as string);
const mongoClient = new MongoClient(
username
@@ -224,7 +222,7 @@
interface findDocSchema {
channelID: string;
messageID: string;
- transcript: string;
+ code: string;
}
export class Transcript {