summaryrefslogtreecommitdiffstats
path: root/bridge/discord
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-06-24 19:36:10 +0200
committerWim <wim@42.be>2017-06-29 23:38:48 +0200
commit830361e48bab699d7a22af1eba3f3df85ac21bd3 (patch)
treea5b3c02f33efb5ed5c629f923e104ad287bc5842 /bridge/discord
parent1b1a9ce2503021c275a470c8da21d33bbdcf5681 (diff)
downloadmatterbridge-msglm-0.16.0-rc1.tar.gz
matterbridge-msglm-0.16.0-rc1.tar.bz2
matterbridge-msglm-0.16.0-rc1.zip
Deprecate URL,useAPI,BindAddress (slack,mattermost,rocketchat)v0.16.0-rc1
Diffstat (limited to 'bridge/discord')
-rw-r--r--bridge/discord/discord.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go
index 1acbb19b..e3ea9f9b 100644
--- a/bridge/discord/discord.go
+++ b/bridge/discord/discord.go
@@ -49,6 +49,11 @@ func New(cfg config.Protocol, account string, c chan config.Message) *bdiscord {
func (b *bdiscord) Connect() error {
var err error
flog.Info("Connecting")
+ if b.Config.WebhookURL == "" {
+ flog.Info("Connecting using token")
+ } else {
+ flog.Info("Connecting using webhookurl (for posting) and token")
+ }
if !strings.HasPrefix(b.Config.Token, "Bot ") {
b.Config.Token = "Bot " + b.Config.Token
}
@@ -110,7 +115,7 @@ func (b *bdiscord) Send(msg config.Message) error {
return nil
}
if b.Config.WebhookURL == "" {
- flog.Debugf("Broadcasting using API")
+ flog.Debugf("Broadcasting using token (API)")
b.c.ChannelMessageSend(channelID, msg.Username+msg.Text)
} else {
flog.Debugf("Broadcasting using Webhook")