Repository navigation
feat!: replace LISTEN_ONLY with per-bot switches - #93
Merged
Merged
Conversation
Each bot account can be turned off on its own with AUTO_CROSSPOST_BOT_ENABLED, SUB_DOESNT_EXIST_BOT_ENABLED, SAME_SUBREDDIT_BOT_ENABLED and SAME_POST_BOT_ENABLED (default True). A disabled bot never comments, posts or deletes, and its inbox is left unread. With all four off, only the stream, filtering, DB inserts, Phase 2 and the known-subreddits buffer run. BREAKING CHANGE: LISTEN_ONLY is removed. LISTEN_ONLY=True now stops the bot at startup with a message pointing to AUTO_CROSSPOST_BOT_ENABLED=False. Co-Authored-By: Toldry <toldry@gmail.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bi2vprJUUCtGDcGHxadEba
Co-Authored-By: Toldry <toldry@gmail.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bi2vprJUUCtGDcGHxadEba
Co-Authored-By: Toldry <toldry@gmail.com> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bi2vprJUUCtGDcGHxadEba
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Querent · project thread
Before:
LISTEN_ONLY=Truestopped only Phase 3 crossposting. The three auxiliary bots still replied in public, and the cleanup job still deleted posts.After: each bot account has its own switch, all
Trueby default:AUTO_CROSSPOST_BOT_ENABLEDSUB_DOESNT_EXIST_BOT_ENABLEDSAME_SUBREDDIT_BOT_ENABLEDSAME_POST_BOT_ENABLEDA disabled bot never comments, posts or deletes, and its inbox stays unread. With all four off, only the r/all stream, filtering, DB inserts, Phase 2 and the known-subreddits buffer run.
Breaking:
LISTEN_ONLYis removed completely and ignored. An existing.envwithLISTEN_ONLY=Truemust switch toAUTO_CROSSPOST_BOT_ENABLED=False, or the bot starts crossposting.How:
config.is_bot_enabled(bot_name)reads the switches.build_jobs()skips Phase 3 and cleanup when AutoCrosspostBot is off, and skips the inbox job when every bot is off.inbox.process_unread_inboxesskips disabled bots.phase1.handle_incoming_comment, a branch whose bot is disabled logs at INFO and stops, with no reply and no DB insert.--process-oneexits with code 2 when AutoCrosspostBot is off..env.example, CHANGELOG and tests are updated, and the 1720 unit tests pass.Stacked on #91.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Bi2vprJUUCtGDcGHxadEba