From dcd3bc3f70988e819de6b0e0f70a600029e1ebfb Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Tue, 10 Aug 2021 14:13:31 +0100 Subject: Add February in_month check to love calculator command This ensure the valentines themed command can only be ran during the valentines season. --- bot/exts/valentines/lovecalculator.py | 3 +++ 1 file changed, 3 insertions(+) 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: -- cgit v1.2.3