Explorar o código

Only warn non-messages for normal messages

ghorsington %!s(int64=2) %!d(string=hai) anos
pai
achega
a187b71e88
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      bot/src/plugins/file_only_channel_checker.ts

+ 4 - 0
bot/src/plugins/file_only_channel_checker.ts

@@ -27,6 +27,10 @@ export class FileOnlyChannelChecker {
 
         msg.delete();
 
+        // Non-default system message (e.g. pin or thread create) => there is no one to warn, so just remove it to keep the channel clean
+        if (msg.type != "DEFAULT")
+            return;
+
         const ch = msg.guild?.channels.resolve(entry.warningMessageChannelId);
         
         if(ch instanceof TextChannel)