|
@@ -6,7 +6,6 @@ import (
|
|
|
"strings"
|
|
|
|
|
|
"git.mgmcomp.net/thisnthat/discordgo"
|
|
|
- "github.com/sirupsen/logrus"
|
|
|
)
|
|
|
|
|
|
// OnMessageCreate is a DiscordGo Event Handler function. This must be
|
|
@@ -14,7 +13,6 @@ import (
|
|
|
// will receive all Discord messages and parse them for matches to registered
|
|
|
// routes.
|
|
|
func (r *Router) OnMessageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|
|
- logrus.Info("Got message")
|
|
|
var err error
|
|
|
|
|
|
// Ignore all messages created by the Bot account itself
|
|
@@ -32,11 +30,9 @@ func (r *Router) OnMessageCreate(s *discordgo.Session, m *discordgo.MessageCreat
|
|
|
if err != nil {
|
|
|
channel, err = s.Channel(m.ChannelID)
|
|
|
if err != nil {
|
|
|
- logrus.Warnf("Failed to get the channel for message: %s", err)
|
|
|
} else {
|
|
|
err = s.State.ChannelAdd(channel)
|
|
|
if err != nil {
|
|
|
- logrus.Warnf("Failed to add the channel to the session state: %s", err)
|
|
|
}
|
|
|
}
|
|
|
}
|