Fixing erros with buttons handlers and updating README

This commit is contained in:
Rafael Vargas
2022-07-29 00:41:03 -03:00
parent c5885f3093
commit 7f1ffb6b23
11 changed files with 72 additions and 91 deletions

View File

@@ -32,9 +32,12 @@ class PlayerView(View):
async def on_timeout(self) -> None:
# Disable all itens and, if has the message, edit it
self.disable_all_items()
if self.__message is not None and isinstance(self.__message, Message):
await self.__message.edit(view=self)
try:
self.disable_all_items()
if self.__message is not None and isinstance(self.__message, Message):
await self.__message.edit(view=self)
except Exception as e:
print(f'[ERROR EDITING MESSAGE] -> {e}')
def set_message(self, message: Message) -> None:
self.__message = message