Revert 9db9d1e's count and fix typo

This commit is contained in:
Lonami Exo 2018-06-03 15:20:32 +02:00
parent ab9d10c569
commit 8c8a0153ef
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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: