pls
This commit is contained in:
parent
6a30ccc662
commit
8655019a4f
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue