Make reaction handler more shit-posty

This commit is contained in:
Ryan Cavicchioni 2022-08-22 07:59:39 -05:00
parent 0fd921ee28
commit 322a88e0ad
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -147,15 +147,19 @@ 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++ {
r := emojis[rand.Intn(len(emojis))]
s.MessageReactionAdd(m.ChannelID, m.ID, r)
}
}
}
for range m.Embeds {
for i := 0; i < command.RandInt(1, len(emojis)); i++ {
r := emojis[rand.Intn(len(emojis))]
s.MessageReactionAdd(m.ChannelID, m.ID, r)
}
}
}