From 8655019a4f77bfaf7e6fed2bfddd9ae7abaebead Mon Sep 17 00:00:00 2001 From: atridadl Date: Wed, 3 Jan 2024 12:38:07 -0700 Subject: [PATCH] pls --- lib/helpers.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/helpers.go b/lib/helpers.go index ef702b2..56bb022 100644 --- a/lib/helpers.go +++ b/lib/helpers.go @@ -64,7 +64,7 @@ func GetUserObject(event discord.InteractionEvent) Userish { } } -func CooldownHandler(event discord.InteractionEvent, command string, cooldownMinutes int64) bool { +func CooldownHandler(event discord.InteractionEvent, command string, cooldownMinutes int) bool { user := GetUserObject(event) allowList := strings.Split(os.Getenv("COOLDOWN_ALLOW_LIST"), ",") @@ -75,10 +75,10 @@ func CooldownHandler(event discord.InteractionEvent, command string, cooldownMin } } - cachedVal := GetCache(user.ID().String() + ":" + "hdpic") + cachedVal := GetCache(user.ID().String() + ":" + command) if cachedVal != "nil" { return false } - SetCache(user.ID().String()+":"+"hdpic", user.ID().String()+":"+"hdpic", 10) + SetCache(user.ID().String()+":"+"hdpic", user.ID().String()+":"+command, cooldownMinutes) return true }