From d69688963bdc75dd7bcd989dc701a1cb5ceab3f7 Mon Sep 17 00:00:00 2001 From: PineappleFan Date: Mon, 13 Mar 2023 11:23:25 +0000 Subject: [PATCH] Removed a bunch of console.logs --- src/Unfinished/categorizationTest.ts | 2 -- src/commands/nucleus/premium.ts | 1 - src/commands/settings/moderation.ts | 1 - src/commands/settings/tracks.ts | 2 -- src/context/users/userinfo.ts | 2 -- src/reflex/scanners.ts | 2 -- src/utils/database.ts | 4 ---- src/utils/log.ts | 2 -- 8 files changed, 16 deletions(-) diff --git a/src/Unfinished/categorizationTest.ts b/src/Unfinished/categorizationTest.ts index 763669c..dfe9098 100644 --- a/src/Unfinished/categorizationTest.ts +++ b/src/Unfinished/categorizationTest.ts @@ -51,7 +51,6 @@ const callback = async (interaction: CommandInteraction): Promise => { let channel: string | GuildChannel; if (typeof c === "string") channel = interaction.guild!.channels.cache.get(c as string)!.id; else channel = (c[0] as unknown as GuildChannel).id; - console.log(channel); if (!predicted[channel]) predicted[channel] = []; m = await interaction.editReply({ embeds: [ @@ -139,7 +138,6 @@ const callback = async (interaction: CommandInteraction): Promise => { } categorized[channel] = selected; } - console.log(categorized); }; const check = () => { diff --git a/src/commands/nucleus/premium.ts b/src/commands/nucleus/premium.ts index f544045..67b2be6 100644 --- a/src/commands/nucleus/premium.ts +++ b/src/commands/nucleus/premium.ts @@ -94,7 +94,6 @@ const dmcallback = async (interaction: CommandInteraction, firstDescription: str closed = true; } else { const response = await client.database.premium.removePremium(interaction.user.id, i.values[0]!); - console.log(response); } } while (!closed); await interaction.deleteReply(); diff --git a/src/commands/settings/moderation.ts b/src/commands/settings/moderation.ts index 6ee6e1e..4d850a9 100644 --- a/src/commands/settings/moderation.ts +++ b/src/commands/settings/moderation.ts @@ -29,7 +29,6 @@ const callback = async (interaction: CommandInteraction): Promise => { while (!timedOut) { const config = await client.database.guilds.read(interaction.guild!.id); const moderation = config.moderation; - console.log(moderation); await interaction.editReply({ embeds: [ new EmojiEmbed() diff --git a/src/commands/settings/tracks.ts b/src/commands/settings/tracks.ts index b79f54d..e608f31 100644 --- a/src/commands/settings/tracks.ts +++ b/src/commands/settings/tracks.ts @@ -472,9 +472,7 @@ const callback = async (interaction: CommandInteraction) => { const newPage = await editTrack(i, m, roles); if (_.isEqual(newPage, defaultTrackData)) break; if (!newPage) break; - console.log(newPage); tracks.push(newPage); - console.log(tracks); page = tracks.length - 1; break; } diff --git a/src/context/users/userinfo.ts b/src/context/users/userinfo.ts index 7a75754..9c7433f 100644 --- a/src/context/users/userinfo.ts +++ b/src/context/users/userinfo.ts @@ -4,7 +4,6 @@ import { userAbout } from "../../commands/user/about.js"; const command = new ContextMenuCommandBuilder().setName("User info"); const callback = async (interaction: UserContextMenuCommandInteraction) => { - console.log("callback"); const guild = interaction.guild!; let member = interaction.targetMember; if (!member) member = await guild.members.fetch(interaction.targetId); @@ -12,7 +11,6 @@ const callback = async (interaction: UserContextMenuCommandInteraction) => { }; const check = async (_interaction: UserContextMenuCommandInteraction) => { - console.log("check"); return true; }; diff --git a/src/reflex/scanners.ts b/src/reflex/scanners.ts index 1b9d740..6d3fc71 100644 --- a/src/reflex/scanners.ts +++ b/src/reflex/scanners.ts @@ -52,7 +52,6 @@ export async function testNSFW(url: string): Promise { const predictions = (await nsfw_model.classify(img, 1))[0]!; img.dispose(); - console.log(2, predictions); const nsfw = predictions.className === "Hentai" || predictions.className === "Porn"; await client.database.scanCache.write(hash, "nsfw", nsfw); @@ -204,7 +203,6 @@ export async function TestImage(url: string): Promise { oem: 1, psm: 3 }); - console.log(text); return text; } diff --git a/src/utils/database.ts b/src/utils/database.ts index 5386f7f..3121d06 100644 --- a/src/utils/database.ts +++ b/src/utils/database.ts @@ -268,7 +268,6 @@ export class Transcript { .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); @@ -337,10 +336,8 @@ export class Transcript { } async read(code: string, key: string, iv: string) { - console.log("Transcript read"); 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({ transcript: code }); if (findDoc) { const message = await ( @@ -366,7 +363,6 @@ export class Transcript { if (!data) return null; doc = JSON.parse(Buffer.from(data).toString()) as TranscriptSchema; } - console.log(doc); if (!doc) return null; for (const message of doc.messages) { if (message.content) { diff --git a/src/utils/log.ts b/src/utils/log.ts index 8c8c0c9..3b6048a 100644 --- a/src/utils/log.ts +++ b/src/utils/log.ts @@ -99,9 +99,7 @@ export const Logger = { }, async log(log: LoggerOptions): Promise { if (!(await isLogging(log.hidden.guild, log.meta.calculateType))) return; - 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;