From 1b82d409053e30495d61f18c7989cf6b6e4c3836 Mon Sep 17 00:00:00 2001 From: kwzrd Date: Sun, 22 Mar 2020 14:26:18 +0100 Subject: Deseasonify: add property to check daemon status --- bot/branding.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bot/branding.py b/bot/branding.py index 39c3b52c..0b5c7b7e 100644 --- a/bot/branding.py +++ b/bot/branding.py @@ -108,6 +108,11 @@ class BrandingManager(commands.Cog): else: self.daemon = None + @property + def _daemon_running(self) -> bool: + """True if the daemon is currently active, False otherwise.""" + return self.daemon is not None and not self.daemon.done() + async def _daemon_func(self) -> None: """ Manage all automated behaviour of the BrandingManager cog. -- cgit v1.2.3