]> git.puffer.fish Git - matthieu/gru.git/commitdiff
feat: double the couner reply probability
authorMatthieu Pignolet <m@mpgn.dev>
Wed, 9 Apr 2025 15:57:34 +0000 (19:57 +0400)
committerMatthieu Pignolet <m@mpgn.dev>
Wed, 9 Apr 2025 15:57:34 +0000 (19:57 +0400)
discordjs/src/index.mjs

index 589d75ad9b0d17092fef2cb1fb857bf0e1851317..08502a038d1fa5aff3d38ee3e858591966a077c2 100644 (file)
@@ -82,7 +82,7 @@ const messageAction = async (message, ctx) => {
 
   let shouldReplyByTimestamp = currentTimestamp - lastMessageTimestamp >= 3600000;
   let shouldReplyByCounter =
-    messageReplyCounter >= Math.floor(Math.random() * 75) + 35;
+    messageReplyCounter * 2 >= Math.floor(Math.random() * 75) + 35;
   let shouldReply = (
     (ctx === SYMBOL_FOR_CREATE && shouldReplyByTimestamp) ||
     shouldReplyByCounter ||