Add support for a list of ids and update the example

This commit is contained in:
birdi 2019-07-22 04:33:55 +03:00
parent 6a3c13ed50
commit 6bbc808a3b
2 changed files with 23 additions and 16 deletions

View file

@ -42,5 +42,11 @@ async def handler5(msg: types.Message):
await bot.send_message(msg.chat.id,
"Hello from user= & chat_id=")
@dp.message_handler(user=[user_id_to_test, 123]) # todo: add second id here
async def handler6(msg: types.Message):
print("Checked with list!")
if __name__ == '__main__':
executor.start_polling(dp)