]> git.puffer.fish Git - matthieu/gru.git/commitdiff
add more probabilty
authorMatthieu Pignolet <matthieu@matthieu-dev.xyz>
Tue, 18 Jun 2024 12:32:10 +0000 (16:32 +0400)
committerMatthieu Pignolet <matthieu@matthieu-dev.xyz>
Tue, 18 Jun 2024 12:32:10 +0000 (16:32 +0400)
discordjs/src/index.mjs

index b4d558d85e0119860470e341f42009cadc587d60..3f0643e50c560e68375270bc4023e7e142045888 100644 (file)
@@ -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.995 || message.channelId == '1248226018406301696' || message.guild == null)) {
+    if ((response || response === "") && (Math.random() > 0.98 || message.channelId == '1248226018406301696' || message.guild == null)) {
       message.reply(response);
     }
   } catch (e) {
@@ -69,7 +69,7 @@ client.on("messageUpdate", async (message) => {
     let response = await completeWord(cutWord(message.cleanContent));
 
     // Ignore if there is no completion
-    if ((response || response === "") && (Math.random() > 0.995 || message.channelId == '1248226018406301696' || message.guild == null)) {
+    if ((response || response === "") && (Math.random() > 0.98 || message.channelId == '1248226018406301696' || message.guild == null)) {
       message.reply(response);
     }
   } catch (e) {