diff options
Diffstat (limited to 'bridge/discord/discord.go')
-rw-r--r-- | bridge/discord/discord.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go index a4eb2bfd..e6f939e6 100644 --- a/bridge/discord/discord.go +++ b/bridge/discord/discord.go @@ -61,6 +61,11 @@ func (b *Bdiscord) Connect() error { if !strings.HasPrefix(b.GetString("Token"), "Bot ") { token = "Bot " + b.GetString("Token") } + // if we have a User token, remove the `Bot` prefix + if strings.HasPrefix(b.GetString("Token"),"User ") { + token = strings.Replace(token,"Bot ","",-1) + } + b.c, err = discordgo.New(token) if err != nil { return err |