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

index a85ba4fbc6e98ec68889ac4089c2de523ccca25f..faa94f3b71a6db7562d2db529996250bfb00d0b9 100644 (file)
@@ -54,7 +54,7 @@ const messageAction = async (message) => {
     let response = await completeWord(cleanText);
 
     // Ignore if there is no completion
-    const shouldReply = (Math.random() > 0.98 || specialChannels.includes(message.channelId) || message.guild == null);
+    const shouldReply = (Math.random() > 0.995 || specialChannels.includes(message.channelId) || message.guild == null);
     if ((response || response === "") && shouldReply) {
       message.reply(response);
     }