From: Matthieu Pignolet Date: Thu, 6 Jun 2024 15:26:20 +0000 (+0400) Subject: handle dm(s) and edits X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=b2261c7e960a224904a9cd39b12b690720521000;p=matthieu%2Fgru.git handle dm(s) and edits --- diff --git a/discordjs/src/index.mjs b/discordjs/src/index.mjs index 2d2842b..aa2c1bd 100644 --- a/discordjs/src/index.mjs +++ b/discordjs/src/index.mjs @@ -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) {