diff --git a/discordMessage.go b/discordMessage.go index a56d2c2..d73ffd2 100644 --- a/discordMessage.go +++ b/discordMessage.go @@ -31,10 +31,8 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) { } return } - for role := range m.Member.Roles { - if fmt.Sprintf("%+v", role) == config.AdminRole { - adminInteraction(s, m.Author.ID) - } + if isAdmin(m.Member) { + adminInteraction(s, m.Author.ID) } if m.ChannelID != config.AdminChannel { lastActiveChan = m.ChannelID