diff options
author | 2025-01-02 19:15:11 +0000 | |
---|---|---|
committer | 2025-01-02 19:15:11 +0000 | |
commit | 6b12cbd18e6351b45dd75ec68807b546db88da70 (patch) | |
tree | 33050e9da4a76d8449af77238303caa2dd7b02f4 /bot/exts/utilities/reddit.py | |
parent | Add warning log if bot hits reddit ratelimit (diff) |
Add env var setting to determine whether to post daily top reddit posts
Diffstat (limited to 'bot/exts/utilities/reddit.py')
-rw-r--r-- | bot/exts/utilities/reddit.py | 3 |
1 files changed, 2 insertions, 1 deletions
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.""" |