This commit is contained in:
unintendedfraud
2024-04-05 23:30:53 +02:00
parent 0af67e659a
commit 7c2099262f
+2 -6
View File
@@ -13,7 +13,7 @@ import (
const MAX_HISTORY = 50 const MAX_HISTORY = 50
const SPAM_PERIOD = 1 * time.Minute const SPAM_PERIOD = 5 * time.Minute
var spams = []string{ var spams = []string{
":GroGroDebile:", ":GroGroDebile:",
@@ -66,10 +66,6 @@ func (h Handler) OnMessageCreated(s *discordgo.Session, m *discordgo.MessageCrea
return return
} }
for id, u := range usersHistoryCount {
fmt.Println(id, u.count, u.date, u.bannedUntilAt)
}
res, err := h.client.Chat(messagesHistory) res, err := h.client.Chat(messagesHistory)
if err != nil { if err != nil {
sendResponse( sendResponse(
@@ -162,7 +158,7 @@ func updateUserHistoryCount(userID string) bool {
} }
if u.count > 2 { if u.count > 2 {
u.bannedUntilAt = now.Add(2 * time.Minute) u.bannedUntilAt = now.Add(30 * time.Minute)
return true return true
} }