]> git.puffer.fish Git - matthieu/gru.git/commitdiff
handle dm(s) and edits
authorMatthieu Pignolet <matthieu@matthieu-dev.xyz>
Thu, 6 Jun 2024 15:26:20 +0000 (19:26 +0400)
committerMatthieu Pignolet <matthieu@matthieu-dev.xyz>
Thu, 6 Jun 2024 15:26:20 +0000 (19:26 +0400)
discordjs/src/index.mjs

index 2d2842b8db3bd09be755b81d3ff9784bab367c45..aa2c1bd826f424d38caeedbf0a397b32e416b484 100644 (file)
@@ -52,7 +52,7 @@ client.on("messageCreate", async (message) => {
     let response = await completeWord(cutWord(message.cleanContent));
 
     // Ignore if there is no completion
-    if ((response || response === "") && (Math.random() > 0.95 || message.channelId == '1248226018406301696')) {
+    if ((response || response === "") && (Math.random() > 0.95 || message.channelId == '1248226018406301696' || message.guild == null)) {
       message.reply(response);
     }
   } catch (e) {