Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 6252cf9e0c5773e4e7f6296744bc4881a8d5fb6f Author: Wim <wim@42.be> Date: Tue Sep 20 00:15:30 2016 +0000 Cleanup discord bridge debug/info messages diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go index b144392..3547eda 100644 --- a/bridge/discord/discord.go +++ b/bridge/discord/discord.go @@ -347 +347 @@ func New(config config.Protocol, origin string, c chan config.Message) *bdiscord    func (b *bdiscord) Connect() error {   var err error - flog.Info("Trying " + b.protocol + " connection") + flog.Info("Connecting")   b.c, err = discordgo.New(b.Config.Token)   if err != nil {   flog.Debugf("%#v", err) @@ -916 +917 @@ func (b *bdiscord) Origin() string {  }    func (b *bdiscord) Send(msg config.Message) error { + flog.Debugf("Receiving %#v", msg)   channelID := b.getChannelID(msg.Channel)   if channelID == "" {   flog.Errorf("Could not find channelID for %v", msg.Channel) @@ -1056 +1067 @@ func (b *bdiscord) messageCreate(s *discordgo.Session, m *discordgo.MessageCreat   if m.Author.Username == b.Nick {   return   } + flog.Debugf("Sending message from %s on %s to gateway", m.Author.Username, b.FullOrigin())   b.Remote <- config.Message{Username: m.Author.Username, Text: m.Content, Channel: b.getChannelName(m.ChannelID),   Origin: b.origin, Protocol: b.protocol, FullOrigin: b.FullOrigin()}  }