From 408a5a3d403b2856e210933e51ee459a619170af Mon Sep 17 00:00:00 2001 From: Matthew Cohen Date: Sat, 13 Jul 2024 18:49:45 -0400 Subject: [PATCH] catch unbound --- cogs/modmail.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cogs/modmail.py b/cogs/modmail.py index 27dd7bd..515c5c5 100644 --- a/cogs/modmail.py +++ b/cogs/modmail.py @@ -44,7 +44,7 @@ def __init__(self, bot): @app_commands.describe(delay='The delay for the modmail to close, in 1w2d3h4m5s format') @app_commands.guilds(discord.Object(id=config.guild)) @app_commands.default_permissions(view_audit_log=True) - async def _close(self, interaction: discord.Interaction, delay: typing.Optional[str], auto: bool = False): + async def _close(self, interaction: discord.Interaction, delay: typing.Optional[str]): if not delay: await interaction.response.send_message( f'This thread has been closed by {interaction.user}. Use `/open` to send any followup messages to this user.' @@ -68,7 +68,7 @@ async def _close(self, interaction: discord.Interaction, delay: typing.Optional[ ephemeral=True, ) - if delay: + if delay and scheduledTime: await interaction.followup.send( f'Thread has been scheduled to be closed {scheduledTime} by {interaction.user}. Once closed, use `/open` to send any followup messages to this user.' )