]> git.puffer.fish Git - matthieu/gru.git/commitdiff
better sanitizing
authorMatthieu Pignolet <matthieu@matthieu-dev.xyz>
Fri, 21 Jun 2024 14:27:21 +0000 (18:27 +0400)
committerMatthieu Pignolet <matthieu@matthieu-dev.xyz>
Fri, 21 Jun 2024 14:27:21 +0000 (18:27 +0400)
discordjs/src/index.mjs

index 1d5c81f0982761f8b28eba25a9b8423c59fd2b30..a85ba4fbc6e98ec68889ac4089c2de523ccca25f 100644 (file)
@@ -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);