Open rakiru opened 9 years ago
I believe it already catches the rate limit one
It does, though I think you wanted a proper one for commands?
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).
Blocked by #82
No longer blocked by #82
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...