From cb1bdab0afbc0f52031f19209a2bef2f14c168cd Mon Sep 17 00:00:00 2001 From: sneak Date: Tue, 8 Sep 2020 21:00:37 -0700 Subject: [PATCH] add prettyprinting to figure out what's in the structur --- bot/bot.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/bot.go b/bot/bot.go index 447529c..f08c894 100644 --- a/bot/bot.go +++ b/bot/bot.go @@ -1,6 +1,6 @@ package bot -//import "github.com/kr/pretty" +import "github.com/kr/pretty" import ( "fmt" "github.com/mattermost/mattermost-server/v5/model" @@ -247,7 +247,6 @@ func (b *Bot) HandleMsgFromChannel(event *model.WebSocketEvent) { return } - //pretty.Print(post) if matched, _ := regexp.MatchString(`(?:^|\W)metar(?:$|\W)`, post.Message); matched { b.HandleWeatherRequest(post.ChannelId, post.Id, post.Message) return @@ -288,6 +287,7 @@ func (b *Bot) HandleMsgFromDebuggingChannel(event *model.WebSocketEvent) { // FIXME check and see if the message from mm is a bot message, if so, // ignore it + pretty.Print(post) if matched, _ := regexp.MatchString(`(?:^|\W)shutdown(?:$|\W)`, post.Message); matched { b.Shutdown()