diff --git a/src/automations/statsChannelRemove.ts b/src/automations/statsChannelRemove.ts
index 42ec580..4b24768 100644
--- a/src/automations/statsChannelRemove.ts
+++ b/src/automations/statsChannelRemove.ts
@@ -1,8 +1,9 @@
 import log from '../utils/log.js'
 import readConfig from '../utils/readConfig.js'
 import convertCurlyBracketString from '../utils/convertCurlyBracketString.js'
+import singleNotify from '../utils/singleNotify.js';
 
-export async function callback(_, member) {
+export async function callback(interaction, member) {
     let config = await readConfig(member.guild.id);
 
     config.stats.forEach(async element => {
@@ -13,7 +14,12 @@
 
             let channel = await member.client.channels.fetch(element.channel)
             if (channel.guild.id !== member.guild.id) return
-            if (!channel) return // TODO: Notify mods
+            if (!channel) return await singleNotify(interaction.client,
+                "statsChannelDeleted",
+                member.guild.id,
+                "The stats channel has been deleted. Please set a new channel to use this feature.",
+                "Critical"
+            )
             try {
                 await channel.edit({ name: string })
             } catch (err) {
diff --git a/src/automations/unscan.ts b/src/automations/unscan.ts
index 1fb47f8..743374b 100644
--- a/src/automations/unscan.ts
+++ b/src/automations/unscan.ts
@@ -1,10 +1,12 @@
 import * as scan from '../utils/scanners.js'
+import Tesseract from 'tesseract.js';
 
 export async function LinkCheck(message): Promise<boolean> {
     let links = message.content.match(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/gi) ?? []
     let detections = []
     const promises = links.map(async element => {
         try {
+            if (element.match(/https?:\/\/[a-zA-Z]+\.?discord(app)?\.(com|net)\/?/)) return // Also matches discord.net, not enough of a bug
             element = await scan.testLink(element)
         } catch {}
         detections.push({tags: element.tags || [], safe: element.safe})
@@ -27,9 +29,9 @@
 
 export async function NSFWCheck(element): Promise<boolean> {
     try {
+        let test = (await scan.testNSFW(element))
         //@ts-ignore
-        let test = (await scan.testNSFW(element)).nsfw
-        return test
+        return test.nsfw
     } catch {
         return false
     }
@@ -64,4 +66,8 @@
         }
     }
     return "none"
+}
+
+export async function TestImage(element): Promise<string> {
+    return "";
 }
\ No newline at end of file
diff --git a/src/automations/welcome.ts b/src/automations/welcome.ts
index 6505265..09e03d3 100644
--- a/src/automations/welcome.ts
+++ b/src/automations/welcome.ts
@@ -17,7 +17,6 @@
         }
     }
 
-
     if (!config.welcome.verificationRequired.message && config.welcome.channel) {
         let string = config.welcome.message
         if (string) {
@@ -32,7 +31,7 @@
             } else {
                 let channel = await member.client.channels.fetch(config.welcome.channel)
                 if (channel.guild.id !== member.guild.id) return
-                if (!channel) return // TODO: Notify mods
+                if (!channel) return
                 try {
                     await channel.send(string)
                 } catch (err) {
