on_error()¶
- Client.on_error()¶
Decorator for handling unexpected errors.
This does the same thing as
add_handler()using theErrorHandler.Usable by Users Bots- Parameters:
exceptions (
Exception| List ofException, optional) – An exception type or a sequence of exception types that this handler should handle. If None, the handler will catch any exception that is a subclass ofException.filters (
filters, optional) – Pass one or more filters to allow only a subset of messages to be passed in your function.group (
int, optional) – The group identifier, defaults to 0.