From: Matthieu Pignolet Date: Fri, 21 Jun 2024 14:27:21 +0000 (+0400) Subject: better sanitizing X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=161cc01bcb3863d386cc759529a08aa432c75bd7;p=matthieu%2Fgru.git better sanitizing --- 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);