summaryrefslogtreecommitdiff
path: root/discordjs
diff options
context:
space:
mode:
authorMatthieu Pignolet <matthieu@matthieu-dev.xyz>2024-06-06 19:26:20 +0400
committerMatthieu Pignolet <matthieu@matthieu-dev.xyz>2024-06-06 19:26:20 +0400
commitb2261c7e960a224904a9cd39b12b690720521000 (patch)
tree0166504ef7325a2f55b5b8756554b11d497c3eb9 /discordjs
parent1ef2af2826cb132215dc47a51f765a053a548614 (diff)
handle dm(s) and edits
Diffstat (limited to 'discordjs')
-rw-r--r--discordjs/src/index.mjs2
1 files changed, 1 insertions, 1 deletions
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) {