mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Remove user and chat arguments, update the example
This commit is contained in:
parent
80b1168480
commit
8b028693b6
2 changed files with 9 additions and 27 deletions
|
|
@ -522,14 +522,10 @@ class IdFilter(Filter):
|
|||
@classmethod
|
||||
def validate(cls, full_config: typing.Dict[str, typing.Any]) -> typing.Optional[typing.Dict[str, typing.Any]]:
|
||||
result = {}
|
||||
if 'user' in full_config:
|
||||
result['user_id'] = full_config.pop('user')
|
||||
elif 'user_id' in full_config:
|
||||
if 'user_id' in full_config:
|
||||
result['user_id'] = full_config.pop('user_id')
|
||||
|
||||
if 'chat' in full_config:
|
||||
result['chat_id'] = full_config.pop('chat')
|
||||
elif 'chat_id' in full_config:
|
||||
if 'chat_id' in full_config:
|
||||
result['chat_id'] = full_config.pop('chat_id')
|
||||
|
||||
return result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue