Compare commits
No commits in common. "322a88e0ad7bd24ef17d41a6584afd80b26a30fa" and "f8cf68af83a67d6383902496b17b70139d794676" have entirely different histories.
322a88e0ad
...
f8cf68af83
@ -63,7 +63,7 @@ func main() {
|
|||||||
viper.AddConfigPath(".")
|
viper.AddConfigPath(".")
|
||||||
err = viper.ReadInConfig()
|
err = viper.ReadInConfig()
|
||||||
|
|
||||||
if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
|
if err != nil {
|
||||||
log.Fatalf("fatal error config file: %v", err)
|
log.Fatalf("fatal error config file: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,18 +147,14 @@ func reactionHandler(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|||||||
|
|
||||||
for _, a := range m.Attachments {
|
for _, a := range m.Attachments {
|
||||||
if strings.HasPrefix(a.ContentType, "image/") {
|
if strings.HasPrefix(a.ContentType, "image/") {
|
||||||
for i := 0; i < command.RandInt(1, len(emojis)); i++ {
|
r := emojis[rand.Intn(len(emojis))]
|
||||||
r := emojis[rand.Intn(len(emojis))]
|
s.MessageReactionAdd(m.ChannelID, m.ID, r)
|
||||||
s.MessageReactionAdd(m.ChannelID, m.ID, r)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for range m.Embeds {
|
for range m.Embeds {
|
||||||
for i := 0; i < command.RandInt(1, len(emojis)); i++ {
|
r := emojis[rand.Intn(len(emojis))]
|
||||||
r := emojis[rand.Intn(len(emojis))]
|
s.MessageReactionAdd(m.ChannelID, m.ID, r)
|
||||||
s.MessageReactionAdd(m.ChannelID, m.ID, r)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user