Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit a1d275812761bc6962285eccbf48bc773297baa5 Author: Wim <wim@42.be> Date: Mon Nov 14 16:30:43 2016 +0000 Add bot tag to api if not specified (discord) diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go index 4497ce3..e3c9009 100644 --- a/bridge/discord/discord.go +++ b/bridge/discord/discord.go @@ -356 +359 @@ func New(cfg config.Protocol, account string, c chan config.Message) *bdiscord {  func (b *bdiscord) Connect() error {   var err error   flog.Info("Connecting") + if !strings.HasPrefix(b.Config.Token, "Bot ") { + b.Config.Token = "Bot " + b.Config.Token + }   b.c, err = discordgo.New(b.Config.Token)   if err != nil {   flog.Debugf("%#v", err) diff --git a/matterbridge.toml.sample b/matterbridge.toml.sample index ed26ba9..86b79b2 100644 --- a/matterbridge.toml.sample +++ b/matterbridge.toml.sample @@ -2889 +2888 @@ IgnoreNicks="mmbot spammer2"  #Token to connect with Discord API  #You can get your token by following the instructions on  #https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token -#The "Bot" tag needs to be added before the token  #REQUIRED -Token="Bot Yourtokenhere" +Token="Yourtokenhere"    #REQUIRED  Server="yourservername"