ApplicationHandlerStop¶
- class telegram.ext.ApplicationHandlerStop(state=None)[source]¶
Bases:
ExceptionRaise this in a handler or an error handler to prevent execution of any other handler (even in different groups).
In order to use this exception in a
telegram.ext.ConversationHandler, pass the optionalstateparameter instead of returning the next state:async def conversation_callback(update, context): ... raise ApplicationHandlerStop(next_state)
Note
Has no effect, if the handler or error handler is run in a non-blocking way.