update examples to use bitwise filters

This commit is contained in:
Jannes Höke 2016-10-25 19:51:56 +02:00
parent 79fc3be9cd
commit 3f30f74024
3 changed files with 6 additions and 6 deletions

View file

@ -127,13 +127,13 @@ def main():
states={
GENDER: [RegexHandler('^(Boy|Girl|Other)$', gender)],
PHOTO: [MessageHandler([Filters.photo], photo),
PHOTO: [MessageHandler(Filters.photo, photo),
CommandHandler('skip', skip_photo)],
LOCATION: [MessageHandler([Filters.location], location),
LOCATION: [MessageHandler(Filters.location, location),
CommandHandler('skip', skip_location)],
BIO: [MessageHandler([Filters.text], bio)]
BIO: [MessageHandler(Filters.text, bio)]
},
fallbacks=[CommandHandler('cancel', cancel)]

View file

@ -120,12 +120,12 @@ def main():
custom_choice),
],
TYPING_CHOICE: [MessageHandler([Filters.text],
TYPING_CHOICE: [MessageHandler(Filters.text,
regular_choice,
pass_user_data=True),
],
TYPING_REPLY: [MessageHandler([Filters.text],
TYPING_REPLY: [MessageHandler(Filters.text,
received_information,
pass_user_data=True),
],

View file

@ -56,7 +56,7 @@ def main():
dp.add_handler(CommandHandler("help", help))
# on noncommand i.e message - echo the message on Telegram
dp.add_handler(MessageHandler([Filters.text], echo))
dp.add_handler(MessageHandler(Filters.text, echo))
# log all errors
dp.add_error_handler(error)