mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Exception if middleware is used but not enabled.
This commit is contained in:
@ -68,7 +68,7 @@ def process_sex_step(message):
|
||||
if (sex == u'Male') or (sex == u'Female'):
|
||||
user.sex = sex
|
||||
else:
|
||||
raise Exception()
|
||||
raise Exception("Unknown sex")
|
||||
bot.send_message(chat_id, 'Nice to meet you ' + user.name + '\n Age:' + str(user.age) + '\n Sex:' + user.sex)
|
||||
except Exception as e:
|
||||
bot.reply_to(message, 'oooops')
|
||||
|
Reference in New Issue
Block a user