Major Overhaul of roll handling, Dynamic channel whitelist, admin commands, and autotest rework#17
Open
mfriik wants to merge 22 commits into
Open
Major Overhaul of roll handling, Dynamic channel whitelist, admin commands, and autotest rework#17mfriik wants to merge 22 commits into
mfriik wants to merge 22 commits into
Conversation
updated readme to provide overview of bot deployment and use
* Refactor bot_config.py for improved readability and remove unused files * Update README.md with auto-restart instructions and enhance bot_config.py channel organization; remove roles.py * Moved Whitelist from bot config to separate file - channels_whitelist.py with main and test channel configurations * Add systemd service configuration for MinionBot - due to missing filementioned in readme --------- Co-authored-by: Michal Milobedzki <michal.milobedzki@pl.abb.com>
## Whitelist - Add ChannelWhitelistStore with persistent JSON storage (config/channel_whitelist.json) - Seed JSON from existing channels_whitelist.py on first run - Channel check now uses channel.id + channel.name (case-insensitive) - Auto git commit on branch after every successful Add_Channel ## Admin mention commands - Add @bot Add_Channel <name|#mention> — only ALLOWED_ADMIN_USER_IDS - Block DM usage, handle duplicates, unknown channels, missing args - Shared admin user ID list (ALLOWED_ADMIN_USER_IDS in bot_config.py) ## Autotest rework - New autotest.py: dynamic test runner covers all command types (regular, modifier, advantage/disadvantage, CoC bonus/penalty, Mork Borg k66, statystyki_dnd, help, edge cases) - @bot autotest / @bot autotest summary — runs tests locally, sends one pass/fail summary message to Discord channel - @bot autotest legacy — original chat-iteration mode preserved - @bot stop — stops legacy task; admin-only like all above - Removed static hardcoded auto_test() from bot_config.py ## Misc - Fix handle_name_response signature (author param now optional) - Guard against bot echoing its own messages in on_message - README updated with new commands and admin config instructions
bot_config: change default autotest mode to legacy
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.
Whitelist
Admin mention commands
Autotest rework
(regular, modifier, advantage/disadvantage, CoC bonus/penalty,
Mork Borg k66, statystyki_dnd, help, edge cases)
sends one pass/fail summary message to Discord channel
Misc