diff options
-rw-r--r-- | bot/constants.py | 1 | ||||
-rw-r--r-- | bot/exts/utilities/reddit.py | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/bot/constants.py b/bot/constants.py index 6b6d1a1d..bf53c4b4 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -301,6 +301,7 @@ class _Reddit(EnvConfig, env_prefix="reddit_"): client_id: SecretStr = "" secret: SecretStr = "" webhook: int = 635408384794951680 + send_top_daily_posts: bool = True Reddit = _Reddit() diff --git a/bot/exts/utilities/reddit.py b/bot/exts/utilities/reddit.py index 74927c92..bfb7337a 100644 --- a/bot/exts/utilities/reddit.py +++ b/bot/exts/utilities/reddit.py @@ -36,7 +36,8 @@ class Reddit(Cog): self.access_token = None self.client_auth = BasicAuth(RedditConfig.client_id.get_secret_value(), RedditConfig.secret.get_secret_value()) - self.auto_poster_loop.start() + if RedditConfig.send_top_daily_posts: + self.auto_poster_loop.start() async def cog_unload(self) -> None: """Stop the loop task and revoke the access token when the cog is unloaded.""" |