From da06dfd5c19f74d74a845d37d2470bbbd2f98f00 Mon Sep 17 00:00:00 2001 From: Leander Furumo Date: Fri, 23 Oct 2026 02:38:10 +0200 Subject: [PATCH] stop holding the register command open to expire the verification Expiry is enforced by the verification server and the cleanup loop. Co-Authored-By: Claude Opus 5.5 --- bot/src/cogs/galtinn.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/bot/src/cogs/galtinn.py b/bot/src/cogs/galtinn.py index bea5d21..f78d6fa 100644 --- a/bot/src/cogs/galtinn.py +++ b/bot/src/cogs/galtinn.py @@ -503,7 +503,7 @@ class Galtinn(commands.Cog): @tasks.loop(minutes=2) async def verification_cleanup(self): """ - Clean up any pending verifications that have expired. This is in case the register command fails to do so + Clean up any pending verifications that have expired """ await self.bot.db.execute( @@ -588,16 +588,6 @@ class Galtinn(commands.Cog): ) await interaction.followup.send(embed=embed, ephemeral=True) - # Remove verification after 2 minutes - await asyncio.sleep(120) - await self.bot.db.execute( - """ - DELETE FROM galtinn_verification - WHERE discord_id = $1; - """, - interaction.user.id, - ) - @app_commands.checks.bot_has_permissions(embed_links=True) @galtinn_group.command(name="slett", description="Fjern koblingen mellom Galtinnbrukeren din og Discord") async def delete(self, interaction: discord.Interaction):