discord: remove channel whitelist

This commit is contained in:
Chris Sexton 2020-10-09 12:04:43 -04:00
parent 969cbb37a1
commit 3c0704c57c
1 changed files with 1 additions and 14 deletions

View File

@ -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") 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) d.event(d, bot.Message, msg)
} }
}
func in(s string, lst []string) bool {
for _, i := range lst {
if s == i {
return true
}
}
return false
}