forked from jshiffer/matterbridge
Add bot tag to api if not specified (discord)
This commit is contained in:
parent
a11f77835d
commit
f7495dd0c3
@ -35,6 +35,9 @@ func New(cfg config.Protocol, account string, c chan config.Message) *bdiscord {
|
|||||||
func (b *bdiscord) Connect() error {
|
func (b *bdiscord) Connect() error {
|
||||||
var err error
|
var err error
|
||||||
flog.Info("Connecting")
|
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)
|
b.c, err = discordgo.New(b.Config.Token)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
flog.Debugf("%#v", err)
|
flog.Debugf("%#v", err)
|
||||||
|
@ -288,9 +288,8 @@ IgnoreNicks="mmbot spammer2"
|
|||||||
#Token to connect with Discord API
|
#Token to connect with Discord API
|
||||||
#You can get your token by following the instructions on
|
#You can get your token by following the instructions on
|
||||||
#https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token
|
#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
|
#REQUIRED
|
||||||
Token="Bot Yourtokenhere"
|
Token="Yourtokenhere"
|
||||||
|
|
||||||
#REQUIRED
|
#REQUIRED
|
||||||
Server="yourservername"
|
Server="yourservername"
|
||||||
|
Loading…
Reference in New Issue
Block a user