UltrosBot / Ultros

Connecting communities, one squid at a time! Ultros is a multi-protocol chat bot written in Python, designed with both the user and developer in mind
http://ultros.io
Artistic License 2.0
23 stars 7 forks source link

Command manager generic exceptions #86

Open rakiru opened 9 years ago

rakiru commented 9 years ago

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:

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 commented 9 years ago

I believe it already catches the rate limit one

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

rakiru commented 9 years ago

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 commented 9 years ago

Blocked by #82

gdude2002 commented 8 years ago

No longer blocked by #82