mirror of
https://github.com/LuisMayo/ace-attorney-discord-bot.git
synced 2025-06-18 14:25:36 -04:00
19 lines
549 B
Python
19 lines
549 B
Python
from discord.message import Message
|
|
|
|
class Deletion:
|
|
def __init__(self, message: Message, remainingTime: int):
|
|
self.message = message
|
|
self.remainingTime = remainingTime
|
|
|
|
async def update(self):
|
|
self.remainingTime = self.remainingTime - 1
|
|
if (self.remainingTime <= 0):
|
|
try:
|
|
await self.message.delete()
|
|
except Exception as exception:
|
|
print(f"Error: {exception}")
|
|
finally:
|
|
return True
|
|
else:
|
|
return False
|