From f7495dd0c3ed3a698caf5238b3f9397697e82fac Mon Sep 17 00:00:00 2001 From: Wim Date: Mon, 14 Nov 2016 16:30:43 +0100 Subject: Add bot tag to api if not specified (discord) --- bridge/discord/discord.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bridge') 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) -- cgit v1.2.3