mirror of
https://github.com/cjdenio/jia.git
synced 2024-11-24 00:23:40 +00:00
parent
33af99f6b6
commit
6f1223cd84
1 changed files with 4 additions and 4 deletions
|
@ -90,20 +90,20 @@ func onMessage(slackClient *slack.Client, event *slackevents.MessageEvent) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// kog + celeste detection
|
// kog detection
|
||||||
lastCountAtInt, err := redisClient.Get("last_count_at").Int64()
|
lastCountAtInt, err := redisClient.Get("last_count_at").Int64()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
}
|
}
|
||||||
lastCountAt := time.Unix(lastCountAtInt, 0)
|
lastCountAt := time.Unix(lastCountAtInt, 0)
|
||||||
|
|
||||||
if event.User == "UR6P49Q79" || event.User == "U02KYLBLKR9" {
|
if event.User == "UR6P49Q79" {
|
||||||
fmt.Println("kogcelestebot detected.")
|
fmt.Println("Kogbot detected.")
|
||||||
fmt.Printf("Time: %v\n", time.Since(lastCountAt).Seconds())
|
fmt.Printf("Time: %v\n", time.Since(lastCountAt).Seconds())
|
||||||
fmt.Printf("Contains 69: %v\n", strings.Contains(strconv.Itoa(matchedNumber), "69"))
|
fmt.Printf("Contains 69: %v\n", strings.Contains(strconv.Itoa(matchedNumber), "69"))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.User == "UR6P49Q79" || event.User == "U02KYLBLKR9") && time.Since(lastCountAt).Seconds() < 4 /* && strings.Contains(strconv.Itoa(matchedNumber), "69") */ {
|
if event.User == "UR6P49Q79" && time.Since(lastCountAt).Seconds() < 4 && strings.Contains(strconv.Itoa(matchedNumber), "69") {
|
||||||
slackClient.AddReaction("bangbang", slack.ItemRef{
|
slackClient.AddReaction("bangbang", slack.ItemRef{
|
||||||
Channel: event.Channel,
|
Channel: event.Channel,
|
||||||
Timestamp: event.TimeStamp,
|
Timestamp: event.TimeStamp,
|
||||||
|
|
Loading…
Reference in a new issue