From d63f46eefc861239c80039ac076b6ad325e0a2b6 Mon Sep 17 00:00:00 2001 From: Taran Nathan Date: Sun, 23 Aug 2026 18:25:50 -0700 Subject: [PATCH] stops arguments from chaining --- src/bot.nim | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/bot.nim b/src/bot.nim index ee36893..dc92722 100644 --- a/src/bot.nim +++ b/src/bot.nim @@ -25,33 +25,33 @@ proc messageCreate(s: Shard, m: Message) {.event(discord).} = let channel = m.gchannel - if rand(100) < 02: - await m.react("distorted_face:1541167187694460999") - - if rand(100) < 06: + if rand(100) < 04: let messages = ["gimme balls", "balls", "more balls"] echo "sending to balls channel" - discard await discord.api.sendMessage(ballsChannel, messages[rand(messages.high)]) + discard await discord.api.sendMessage(ballsChannel, messages[rand( + messages.high)]) if m.author.username == "mooooooo0": - if rand(100) < 03: + if rand(100) < 02: await m.react("🫡") if rand(100) < 02: discard await m.reply("what that guy said", mention = true) if m.referenced_message.isSome(): - if m.referenced_message.get().author.username == "moo bot" and not (m.author.id == getOutBot): + if m.referenced_message.get().author.username == "moo bot" and not ( + m.author.id == getOutBot): discard await m.reply("it is I", mention = true) if m.content.contains("moo") or m.content.contains("taran"): discard await m.reply("ig bro", mention = true) - if m.author.id == getOutBot and rand(100) < 45: + if m.author.id == getOutBot and (m.referenced_message.isNone or + m.referenced_message.get.author.username != "moo bot"): let responses = ["stfu bot", "get a load of this guy ^^", "NERD ALERT 🚨", "stfu clanker"] discard await m.reply(responses[rand(responses.high)], mention = true) if rand(100) < 05: - let emojis = ["🥵", "🥶", "🤯", "🤓", "🫦", "🪱", "🦧"] + let emojis = ["🥵", "🥶", "🤯", "🤓", "🫦", "🪱", "🦧", "distorted_face:1541167187694460999"] await m.react(emojis[rand(emojis.high)]) if m.mention_users.len > 0: @@ -66,7 +66,7 @@ proc messageCreate(s: Shard, m: Message) {.event(discord).} = # Connect to Discord and run the bot. -waitFor discord.startSession(gateway_intents={ +waitFor discord.startSession(gateway_intents = { giGuilds, giGuildEmojisAndStickers, giGuildMessages, @@ -74,5 +74,5 @@ waitFor discord.startSession(gateway_intents={ giDirectMessages, giDirectMessageReactions, giMessageContent - }) # Don't forget to specify the gateway_intent argument and double check your priviliged intent + }) # Don't forget to specify the gateway_intent argument and double check your priviliged intent -- 2.47.3