fix: error messages not sending because of not calling the method properly

This commit is contained in:
Seaswimmer 2023-08-08 01:37:45 -04:00
parent 17a5a952e2
commit fb2b3037bd
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -64,10 +64,10 @@ class Shortmute(commands.Cog):
"readable_duration": readable_duration
})
if duration > 30:
await interaction.response(content=f"{readable_duration} is longer than the 30 minutes you are allowed to shortmute users for.", ephemeral=True)
await interaction.response.send_message(content=f"{readable_duration} is longer than the 30 minutes you are allowed to shortmute users for.", ephemeral=True)
return
elif duration < 1:
await interaction.response(content=f"Please shortmute the user for longer than {readable_duration}! The maximum duration is 30 minutes.", ephemeral=True)
await interaction.response.send_message(content=f"Please shortmute the user for longer than {readable_duration}! The maximum duration is 30 minutes.", ephemeral=True)
return
embed = discord.Embed(title="Are you sure?", description=f"**Moderator:** {interaction.user.mention}\n**Target:** {target.mention}\n**Duration:** {readable_duration}\n**Reason:** `{reason}`", color=await self.bot.get_embed_color(None))
if evidence: