diff options
| author | 2021-08-10 14:13:31 +0100 | |
|---|---|---|
| committer | 2021-08-10 14:13:31 +0100 | |
| commit | dcd3bc3f70988e819de6b0e0f70a600029e1ebfb (patch) | |
| tree | bc2c9c902a80011b78c1c26d637a8e35c95e88a2 | |
| parent | Merge pull request #799 from python-discord/remove-gpl-deps (diff) | |
Add February in_month check to love calculator command
This ensure the valentines themed command can only be ran during the valentines season.
| -rw-r--r-- | bot/exts/valentines/lovecalculator.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/exts/valentines/lovecalculator.py b/bot/exts/valentines/lovecalculator.py index b10b7bca..41ba25ae 100644 --- a/bot/exts/valentines/lovecalculator.py +++ b/bot/exts/valentines/lovecalculator.py @@ -12,6 +12,8 @@ from discord.ext import commands from discord.ext.commands import BadArgument, Cog, clean_content from bot.bot import Bot +from bot.constants import Month +from bot.utils.decorators import in_month log = logging.getLogger(__name__) @@ -22,6 +24,7 @@ LOVE_DATA = sorted((int(key), value) for key, value in LOVE_DATA.items()) class LoveCalculator(Cog): """A cog for calculating the love between two people.""" + @in_month(Month.FEBRUARY) @commands.command(aliases=("love_calculator", "love_calc")) @commands.cooldown(rate=1, per=5, type=commands.BucketType.user) async def love(self, ctx: commands.Context, who: Union[Member, str], whom: Union[Member, str] = None) -> None: |