Compare commits

..

No commits in common. "322a88e0ad7bd24ef17d41a6584afd80b26a30fa" and "f8cf68af83a67d6383902496b17b70139d794676" have entirely different histories.

View File

@ -63,7 +63,7 @@ func main() {
viper.AddConfigPath(".")
err = viper.ReadInConfig()
if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
if err != nil {
log.Fatalf("fatal error config file: %v", err)
}
@ -147,19 +147,15 @@ 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)
}
}
}