summaryrefslogtreecommitdiffstats
path: root/bridge/discord/discord.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2016-11-14 16:30:43 +0100
committerWim <wim@42.be>2016-11-14 16:30:43 +0100
commitf7495dd0c3ed3a698caf5238b3f9397697e82fac (patch)
tree168807255a17713fd420f3a3de49dc1bda230bc3 /bridge/discord/discord.go
parenta11f77835d0f2967ba05dbd5e82b715cb7254d23 (diff)
downloadmatterbridge-msglm-f7495dd0c3ed3a698caf5238b3f9397697e82fac.tar.gz
matterbridge-msglm-f7495dd0c3ed3a698caf5238b3f9397697e82fac.tar.bz2
matterbridge-msglm-f7495dd0c3ed3a698caf5238b3f9397697e82fac.zip
Add bot tag to api if not specified (discord)
Diffstat (limited to 'bridge/discord/discord.go')
-rw-r--r--bridge/discord/discord.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go
index 4497ce3a..e3c9009c 100644
--- a/bridge/discord/discord.go
+++ b/bridge/discord/discord.go
@@ -35,6 +35,9 @@ 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)