You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
We should have a few generic exceptions that the command handler catches to deal with specially. This will provide some consistency, rather than every plugin implementing their own slight variation on "You don't have permission to use this", and more control, allowing the user to enable/disable such a message. I believe it already catches the rate limit one. Proposed exceptions:
NoPermissionError
UsageError - Perhaps optionally pass in correct usage as arg? I'm hesitant, as really there should be some central help thing that it can be fetched from. Then again, if you have subcommands, it could be useful to have different usages for each anyway.
Anything else? I'm sure I had a third...
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/28131043-command-manager-generic-exceptions?utm_campaign=plugin&utm_content=tracker%2F269930&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F269930&utm_medium=issues&utm_source=github).
The text was updated successfully, but these errors were encountered:
Well, the rate limit decorator wasn't intended for commands. No reason the exception can't be handled though, and thrown by other things (although it may need to be moved to a more sensible place; it's probably sitting in decorators.ratelimit atm).
We should have a few generic exceptions that the command handler catches to deal with specially. This will provide some consistency, rather than every plugin implementing their own slight variation on "You don't have permission to use this", and more control, allowing the user to enable/disable such a message. I believe it already catches the rate limit one. Proposed exceptions:
NoPermissionError
UsageError
- Perhaps optionally pass in correct usage as arg? I'm hesitant, as really there should be some central help thing that it can be fetched from. Then again, if you have subcommands, it could be useful to have different usages for each anyway.Anything else? I'm sure I had a third...
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/28131043-command-manager-generic-exceptions?utm_campaign=plugin&utm_content=tracker%2F269930&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F269930&utm_medium=issues&utm_source=github).The text was updated successfully, but these errors were encountered: