diff --git a/src/modules/pomodoro/cog.py b/src/modules/pomodoro/cog.py index d0e2b2b7..419d9765 100644 --- a/src/modules/pomodoro/cog.py +++ b/src/modules/pomodoro/cog.py @@ -4,6 +4,7 @@ import asyncio import discord from discord.ext import commands as cmds +from discord.ext.commands.errors import CheckFailure from discord import app_commands as appcmds from meta import LionCog, LionBot, LionContext @@ -74,6 +75,19 @@ class TimerCog(LionCog): ) self.timers.clear() + async def cog_check(self, ctx: LionContext): + if not self.ready: + raise CheckFailure( + self.bot.translator.t(_p( + 'cmd_check:ready|failed', + "I am currently restarting! " + "The Pomodoro timers will be unavailable until I have restarted. " + "Thank you for your patience!" + )) + ) + else: + return True + async def _load_timers(self, timer_data: list[TimerData.Timer]): """ Factored method to load a list of timers from data rows.