Properly handle bot timeouts when clicking buttons

This commit is contained in:
Lonami Exo
2018-06-11 10:20:22 +02:00
parent f86f52d960
commit aa6d3430ae
4 changed files with 29 additions and 25 deletions

View File

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