Add payload generator

This commit is contained in:
Alex Root Junior 2017-05-21 19:09:18 +03:00
parent 7ac1896e81
commit bff535ddab
2 changed files with 11 additions and 19 deletions

5
aiogram/utils/payload.py Normal file
View file

@ -0,0 +1,5 @@
DEFAULT_FILTER = ['self']
def generate_payload(skip_items=DEFAULT_FILTER, **kwargs):
return {key: value for key, value in kwargs.items() if key not in skip_items and value}