From f1d0444230557ee3e67e6f6a660d9818ccaf285f Mon Sep 17 00:00:00 2001 From: B1ue-Dev <60958064+B1ue-Dev@users.noreply.github.com> Date: Sat, 8 Jul 2023 01:47:05 +0700 Subject: [PATCH] feat: Add command cooldown --- exts/fun/trivia.py | 1 + exts/fun/urban.py | 1 + exts/fun/whos_that_pokemon.py | 1 + 3 files changed, 3 insertions(+) diff --git a/exts/fun/trivia.py b/exts/fun/trivia.py index 37d1726..7a512a6 100644 --- a/exts/fun/trivia.py +++ b/exts/fun/trivia.py @@ -137,6 +137,7 @@ async def get_question(self, category: str, difficulty: str) -> list: ), ], ) + @interactions.cooldown(interactions.Buckets.USER, 1, 10) async def trivia( self, ctx: HybridContext, diff --git a/exts/fun/urban.py b/exts/fun/urban.py index 361d574..fd3eeaa 100644 --- a/exts/fun/urban.py +++ b/exts/fun/urban.py @@ -32,6 +32,7 @@ def __init__(self, client: interactions.Client) -> None: ) ], ) + @interactions.cooldown(interactions.Buckets.USER, 1, 7) async def urban(self, ctx: HybridContext, *, term: str) -> None: """Define a word on Urban Dictionary.""" diff --git a/exts/fun/whos_that_pokemon.py b/exts/fun/whos_that_pokemon.py index 2d9ec3b..42598c4 100644 --- a/exts/fun/whos_that_pokemon.py +++ b/exts/fun/whos_that_pokemon.py @@ -132,6 +132,7 @@ def __init__(self, client: interactions.Client) -> None: ), ], ) + @interactions.cooldown(interactions.Buckets.USER, 3, 10) async def whos_that_pokemon( self, ctx: HybridContext,