From 161cc01bcb3863d386cc759529a08aa432c75bd7 Mon Sep 17 00:00:00 2001 From: Matthieu Pignolet Date: Fri, 21 Jun 2024 18:27:21 +0400 Subject: [PATCH] better sanitizing --- discordjs/src/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discordjs/src/index.mjs b/discordjs/src/index.mjs index 1d5c81f..a85ba4f 100644 --- a/discordjs/src/index.mjs +++ b/discordjs/src/index.mjs @@ -51,7 +51,7 @@ const messageAction = async (message) => { if (message.author.bot) return; const cleanText = sanitizeWord(message.cleanContent); if (countChars(cleanText) > 0) { - let response = await completeWord(); + let response = await completeWord(cleanText); // Ignore if there is no completion const shouldReply = (Math.random() > 0.98 || specialChannels.includes(message.channelId) || message.guild == null); -- 2.39.5