-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Description
I have a ConversationHandler with an error function like this:
def error(update, context):
logger.print_log("got the error:" + str(context.error))My bot is like this:
updater = Updater(token,use_context=True)
dp = updater.dispatcher
conv_handler = ConversationHandler(
entry_points=[CommandHandler('start', start)],
states={
STATE1: [...],
STATE2: [...],
...
},
fallbacks=[CommandHandler('cancel', cancel)]
)
dp.add_handler(conv_handler)
dp.add_error_handler(error)
updater.start_polling()
updater.idle()I'm trying to treat error function like all the other states, but it seems not working. After the error the program remains in the same state where the error has occurred, but I want to go always to STATE2. How can I do?
Metadata
Metadata
Assignees
Labels
No labels