From 3c0704c57c54b9bc905c0447b9dbf4d4582a5eb7 Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Fri, 9 Oct 2020 12:04:43 -0400 Subject: [PATCH] discord: remove channel whitelist --- connectors/discord/discord.go | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/connectors/discord/discord.go b/connectors/discord/discord.go index 19e8d55..fc5d141 100644 --- a/connectors/discord/discord.go +++ b/connectors/discord/discord.go @@ -218,18 +218,5 @@ func (d *Discord) messageCreate(s *discordgo.Session, m *discordgo.MessageCreate log.Debug().Interface("m", m).Interface("msg", msg).Msg("message received") - authorizedChannels := d.config.GetArray("channels", []string{}) - - if in(ch.Name, authorizedChannels) { - d.event(d, bot.Message, msg) - } -} - -func in(s string, lst []string) bool { - for _, i := range lst { - if s == i { - return true - } - } - return false + d.event(d, bot.Message, msg) }