Merge branch 'main' into development
diff --git a/src/utils/database.ts b/src/utils/database.ts
index 99972b7..67c1c5f 100644
--- a/src/utils/database.ts
+++ b/src/utils/database.ts
@@ -16,6 +16,7 @@
const collectionOptions = { authdb: "admin" };
const getIV = () => crypto.randomBytes(16);
+
export class Guilds {
guilds: Collection<GuildConfig>;
defaultData: GuildConfig;
@@ -533,7 +534,6 @@
const entry = await this.premium.findOne({ user: user });
return entry ? true : false;
}
-
async createUser(user: string, level: number) {
// console.log("Premium createUser");
await this.premium.insertOne({ user: user, appliesTo: [], level: level }, collectionOptions);
diff --git a/src/utils/log.ts b/src/utils/log.ts
index 11cabe8..bb95eda 100644
--- a/src/utils/log.ts
+++ b/src/utils/log.ts
@@ -82,6 +82,7 @@
console.log(log.hidden.guild)
const config = await client.database.guilds.read(log.hidden.guild);
console.log(config.logging.logs.channel)
+
if (config.logging.logs.channel) {
const channel = (await client.channels.fetch(config.logging.logs.channel)) as Discord.TextChannel | null;
const description: Record<string, string> = {};