4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-27 08:49:24 +00:00

Add bot tag to api if not specified (discord)

This commit is contained in:
Wim
2016-11-14 16:30:43 +01:00
parent a11f77835d
commit f7495dd0c3
2 changed files with 4 additions and 2 deletions

View File

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