5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-26 05:31:34 +00:00

Fix regression on using server ID (discord). #619 #617

This commit is contained in:
Wim 2018-11-28 23:50:40 +01:00
parent fc5e3a6728
commit df02f51c56

View File

@ -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 {