better kog detection

This commit is contained in:
Caleb Denio 2022-07-15 15:18:36 -04:00
parent ce3d88f4a4
commit a635479dfc
No known key found for this signature in database
GPG key ID: D2E75BDDE8F717AD

View file

@ -97,7 +97,7 @@ func onMessage(slackClient *slack.Client, event *slackevents.MessageEvent) {
}
lastCountAt := time.Unix(lastCountAtInt, 0)
if event.User == "UR6P49Q79" && time.Since(lastCountAt).Seconds() < 2 && strings.Contains(lastValidNumberStr, "69") {
if event.User == "UR6P49Q79" && time.Since(lastCountAt).Seconds() < 2 && strings.Contains(strconv.Itoa(matchedNumber), "69") {
slackClient.AddReaction("bangbang", slack.ItemRef{
Channel: event.Channel,
Timestamp: event.TimeStamp,