summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-11-28 23:50:40 +0100
committerWim <wim@42.be>2018-11-29 00:04:55 +0100
commit8432330cb23b8ca1192584b274d710b246ffa50e (patch)
tree504b70d1d8c03cae2f8856c9e2d49918df974e4a
parent02577a2b5c1766f1fbc43700caf30b5b88be5ea7 (diff)
downloadmatterbridge-msglm-8432330cb23b8ca1192584b274d710b246ffa50e.tar.gz
matterbridge-msglm-8432330cb23b8ca1192584b274d710b246ffa50e.tar.bz2
matterbridge-msglm-8432330cb23b8ca1192584b274d710b246ffa50e.zip
Fix regression on using server ID (discord). #619 #617
-rw-r--r--bridge/discord/discord.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go
index 00dd32b9..3a11a504 100644
--- a/bridge/discord/discord.go
+++ b/bridge/discord/discord.go
@@ -76,9 +76,10 @@ func (b *Bdiscord) Connect() error {
if err != nil {
return err
}
+ serverName := strings.Replace(b.GetString("Server"), "ID:", "", -1)
b.Nick = userinfo.Username
for _, guild := range guilds {
- if guild.Name == b.GetString("Server") {
+ if guild.Name == serverName || guild.ID == serverName {
b.Channels, err = b.c.GuildChannels(guild.ID)
b.guildID = guild.ID
if err != nil {