From 6b12cbd18e6351b45dd75ec68807b546db88da70 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Thu, 2 Jan 2025 19:15:11 +0000 Subject: Add env var setting to determine whether to post daily top reddit posts --- bot/exts/utilities/reddit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bot/exts/utilities/reddit.py') 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.""" -- cgit v1.2.3