fix(aurora): defer before sending the user a message

This commit is contained in:
Seaswimmer 2024-02-02 11:51:44 -05:00
parent 4d321006c8
commit 5b18b6612a
Signed by untrusted user: cswimr
GPG key ID: B8953EC01E5C4063

View file

@ -362,6 +362,7 @@ class Aurora(commands.Cog):
) )
return return
await interaction.response.defer()
if silent is None: if silent is None:
silent = not await config.guild(interaction.guild).dm_users() silent = not await config.guild(interaction.guild).dm_users()
if silent is False: if silent is False:
@ -379,7 +380,6 @@ class Aurora(commands.Cog):
except discord.errors.HTTPException: except discord.errors.HTTPException:
pass pass
await interaction.response.defer()
await target.add_roles( await target.add_roles(
role, role,
reason=f"Role added by {interaction.user.id}{(' for ' + {humanize.precisedelta(parsed_time)} if parsed_time != 'NULL' else '')} for: {reason}", reason=f"Role added by {interaction.user.id}{(' for ' + {humanize.precisedelta(parsed_time)} if parsed_time != 'NULL' else '')} for: {reason}",