From cf3fece52c7dd30d2aa04b0a33b4092e2472a8b4 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Mon, 22 Aug 2022 19:30:56 -0500 Subject: [PATCH] Reaction handler will not add a variable number of reactions --- cmd/bb/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/bb/main.go b/cmd/bb/main.go index 558923a..6e5b08b 100644 --- a/cmd/bb/main.go +++ b/cmd/bb/main.go @@ -141,7 +141,7 @@ func reactionHandler(s *discordgo.Session, m *discordgo.MessageCreate) { for _, a := range m.Attachments { if strings.HasPrefix(a.ContentType, "image/") { - for i := 0; i < command.RandInt(1, len(emojis)); i++ { + for i := 1; i <= command.RandInt(1, len(emojis)); i++ { r := emojis[rand.Intn(len(emojis))] s.MessageReactionAdd(m.ChannelID, m.ID, r) } @@ -149,7 +149,7 @@ func reactionHandler(s *discordgo.Session, m *discordgo.MessageCreate) { } for range m.Embeds { - for i := 0; i < command.RandInt(1, len(emojis)); i++ { + for i := 1; i <= command.RandInt(1, len(emojis)); i++ { r := emojis[rand.Intn(len(emojis))] s.MessageReactionAdd(m.ChannelID, m.ID, r) }