diff options
author | 2020-03-22 14:26:18 +0100 | |
---|---|---|
committer | 2020-03-22 14:26:18 +0100 | |
commit | 1b82d409053e30495d61f18c7989cf6b6e4c3836 (patch) | |
tree | 791418102e070a5afebbfdba0dd51678efa9a471 /bot | |
parent | Deseasonify: respect autostart env var (diff) |
Deseasonify: add property to check daemon status
Diffstat (limited to 'bot')
-rw-r--r-- | bot/branding.py | 5 |
1 files changed, 5 insertions, 0 deletions
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. |