Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Command manager generic exceptions #86

Open
rakiru opened this issue Nov 10, 2015 · 4 comments
Open

Command manager generic exceptions #86

rakiru opened this issue Nov 10, 2015 · 4 comments

Comments

@rakiru
Copy link
Member

rakiru commented Nov 10, 2015

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).
@gdude2002
Copy link
Member

I believe it already catches the rate limit one

It does, though I think you wanted a proper one for commands?

@rakiru
Copy link
Member Author

rakiru commented Nov 10, 2015

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).

@gdude2002
Copy link
Member

Blocked by #82

@gdude2002
Copy link
Member

No longer blocked by #82

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants