mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2026-09-04 16:10:39 +00:00
Revert 9db9d1e's count and fix typo
This commit is contained in:
@@ -547,7 +547,7 @@ class Message:
|
||||
returns ``True``. The callable should accept a single
|
||||
`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')
|
||||
|
||||
if not self.buttons:
|
||||
|
||||
Reference in New Issue
Block a user