mirror of
https://github.com/LuisMayo/ace-attorney-discord-bot.git
synced 2025-06-18 14:25:36 -04:00
Handling message being deleted
If the message no longer exists, just return True as if it was deleted.
This commit is contained in:
parent
1fc7d52575
commit
9c8ff82170
@ -8,7 +8,11 @@ class Deletion:
|
||||
async def update(self):
|
||||
self.remainingTime = self.remainingTime - 1
|
||||
if (self.remainingTime <= 0):
|
||||
await self.message.delete()
|
||||
return True
|
||||
try:
|
||||
await self.message.delete()
|
||||
except Exception as exception:
|
||||
print(f"Error: {exception}")
|
||||
finally:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user