diff --git a/Discord/cogs/24.py b/Discord/cogs/24.py index 3056902c13..03f6b0023e 100644 --- a/Discord/cogs/24.py +++ b/Discord/cogs/24.py @@ -28,8 +28,12 @@ async def twenty_four(self, ctx): f"{numbers[2]}{CEK}{numbers[3]}{CEK}", view = view ) - # Fetch Message, as InteractionMessage token expires after 15 min. - response = await response.fetch() + # InteractionMessage token expires after 15 min. + try: + response = await response.fetch() + except discord.Forbidden: + view.timeout = 600 + response = await response.edit(view = view) else: response = await ctx.embed_reply( f"{numbers[0]}{CEK}{numbers[1]}{CEK}\n" @@ -95,6 +99,9 @@ def __init__(self, bot, numbers): self.message = None + async def on_timeout(self): + await self.stop() + async def stop(self): self.children[0].disabled = True