From 659be304087fefde603cb87be8868ddb35ece102 Mon Sep 17 00:00:00 2001 From: Caleb Denio Date: Fri, 15 Jul 2022 15:30:20 -0400 Subject: [PATCH] debug --- pkg/jia/handlers.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/jia/handlers.go b/pkg/jia/handlers.go index 67ac1fd..03d1469 100644 --- a/pkg/jia/handlers.go +++ b/pkg/jia/handlers.go @@ -97,6 +97,12 @@ func onMessage(slackClient *slack.Client, event *slackevents.MessageEvent) { } lastCountAt := time.Unix(lastCountAtInt, 0) + if event.User == "UR6P49Q79" { + fmt.Println("Kogbot detected.") + fmt.Printf("Time: %v\n", time.Since(lastCountAt).Seconds()) + fmt.Printf("Contains 69: %v\n", strings.Contains(strconv.Itoa(matchedNumber), "69")) + } + if event.User == "UR6P49Q79" && time.Since(lastCountAt).Seconds() < 2 && strings.Contains(strconv.Itoa(matchedNumber), "69") { slackClient.AddReaction("bangbang", slack.ItemRef{ Channel: event.Channel,