mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 10:11:52 +00:00
Add payload generator
This commit is contained in:
parent
7ac1896e81
commit
bff535ddab
2 changed files with 11 additions and 19 deletions
5
aiogram/utils/payload.py
Normal file
5
aiogram/utils/payload.py
Normal 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}
|
||||
Loading…
Add table
Add a link
Reference in a new issue