Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sir Robin Error Handling & Help Command updates #105

Merged
merged 5 commits into from
Nov 29, 2023

Conversation

janine9vn
Copy link
Collaborator

This PR updates and touches up the &help command output and some of the error handling. In addition, it also fixes how the channel whitelist works.

  • Help command cog is shamelessly stolen from Sir Lancebot
  • Error handling is updated to catch some of the new errors being thrown
  • This unifies how we do the channel whitelisting and simplifies it as well
  • Some general reorganization and cleanup of unused items

This moves these commands into the core folder for better organization.

This also shamelessly copies over the help command from Sir Lancebot for
better formatting and pagination.

This also updates some of the checks we handle for the error handling.
This overhauls how we check for whitelists. It uses the Python approach
rather than the Sir Lancebot approach.

It also cleans up some unused decorators to keep things tidy.
bot/exts/advent_of_code/_cog.py Outdated Show resolved Hide resolved
bot/exts/core/error_handler.py Show resolved Hide resolved
bot/utils/checks.py Show resolved Hide resolved
bot/utils/exceptions.py Show resolved Hide resolved
I managed to get poetry unfucked and can run precommit linting again!
This commit makes a compromise. The top level command group
can be run anywhere.
This allows the sub-group decorators to behave properly.
Now, if a `role_override` is provided to the
`in_whitelist` check, anyone with that role
does not have to obey channel restrictions.

This commits also adds a more explicit SilentFail error to catch.
If you want something to truly silently fail, we can now do that.
bot/exts/advent_of_code/_cog.py Show resolved Hide resolved
bot/exts/advent_of_code/_cog.py Outdated Show resolved Hide resolved
Less responsibility for me 🎉
@ChrisLovering ChrisLovering merged commit 17fb7fd into main Nov 29, 2023
3 of 4 checks passed
@ChrisLovering ChrisLovering deleted the sir-robin-touchups branch November 29, 2023 20:14
@janine9vn janine9vn restored the sir-robin-touchups branch November 29, 2023 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants