mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-29 12:53:44 +03:00
Revert 9db9d1e's count and fix typo
This commit is contained in:
parent
ab9d10c569
commit
8c8a0153ef
|
@ -82,7 +82,7 @@ Bug fixes
|
||||||
Enhancements
|
Enhancements
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
- You can now send multiply requests at once while preserving the order:
|
- You can now send multiple requests at once while preserving the order:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
|
|
|
@ -547,7 +547,7 @@ class Message:
|
||||||
returns ``True``. The callable should accept a single
|
returns ``True``. The callable should accept a single
|
||||||
`telethon.tl.custom.messagebutton.MessageButton` argument.
|
`telethon.tl.custom.messagebutton.MessageButton` argument.
|
||||||
"""
|
"""
|
||||||
if (i, text, filter).count(None) >= 2:
|
if sum(int(x is not None) for x in (i, text, filter)) >= 2:
|
||||||
raise ValueError('You can only set either of i, text or filter')
|
raise ValueError('You can only set either of i, text or filter')
|
||||||
|
|
||||||
if not self.buttons:
|
if not self.buttons:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user