Stop using await with properties

This commit is contained in:
Lonami Exo
2018-06-25 11:38:56 +02:00
parent 0d09f9d8c1
commit 410518aa65
3 changed files with 9 additions and 6 deletions

View File

@@ -675,7 +675,7 @@ class Message:
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 await self.buttons:
if not await self.get_buttons():
return # Accessing the property sets self._buttons[_flat]
if text is not None: