From 7d2e440c8311199dddb3f1e7c73c223325e51dff Mon Sep 17 00:00:00 2001 From: Wim Date: Mon, 15 Jul 2019 21:56:35 +0200 Subject: Add support for discord category channels (discord) (#863) This adds support for the discord category option that can be used to group channels in. This means we can have multiple channels with the same name. We add the option to specify a category in the channel option of a discord account under [[gateway]] Besides channel="channel" or channel="ID:channelID", now also channel="category/channel" can be specified. This change remains backwards compatible with people that haven't specified the category and incorporates the fix in #861 --- bridge/discord/discord.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'bridge/discord/discord.go') diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go index 66c8134c..1ae655bf 100644 --- a/bridge/discord/discord.go +++ b/bridge/discord/discord.go @@ -95,12 +95,10 @@ func (b *Bdiscord) Connect() error { b.channelsMutex.Lock() for _, guild := range guilds { if guild.Name == serverName || guild.ID == serverName { - var chans []*discordgo.Channel - chans, err = b.c.GuildChannels(guild.ID) + b.channels, err = b.c.GuildChannels(guild.ID) if err != nil { break } - b.channels = filterChannelsByType(chans, discordgo.ChannelTypeGuildText, false) b.guildID = guild.ID guildFound = true } -- cgit v1.2.3