fix: changed how the interaction responds

This commit is contained in:
Seaswimmer 2023-08-08 01:07:20 -04:00
parent 66a16eb08d
commit c3b99c48f0
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -98,7 +98,7 @@ class Shortmute(commands.Cog):
edit_embed.set_image(url=evidence) edit_embed.set_image(url=evidence)
old_message = await old_interaction.edit_original_response(embed=edit_embed, view=None) old_message = await old_interaction.edit_original_response(embed=edit_embed, view=None)
await target.timeout(until=timedelta, reason=f"User shortmuted for {readable_duration} by {old_interaction.user.name} ({old_interaction.user.id}) for: {reason}") await target.timeout(until=timedelta, reason=f"User shortmuted for {readable_duration} by {old_interaction.user.name} ({old_interaction.user.id}) for: {reason}")
await interaction.response.send_message(content=f"{target.mention} shortmuted for {readable_duration} by {old_interaction.user.mention} for: `{reason}`") await interaction.channel.send(content=f"{target.mention} shortmuted for {readable_duration} by {old_interaction.user.mention} for: `{reason}`")
if await self.config.guild(old_interaction.guild).dm() is True: if await self.config.guild(old_interaction.guild).dm() is True:
dm_embed = discord.Embed(title=f"You've been shortmuted in {old_interaction.guild.name}!", description=f"Moderator: {old_interaction.user.mention}\nTarget: {target.mention}\nDuration: `{readable_duration}`\nReason: `{reason}`", color=await self.bot.get_embed_color(None)) dm_embed = discord.Embed(title=f"You've been shortmuted in {old_interaction.guild.name}!", description=f"Moderator: {old_interaction.user.mention}\nTarget: {target.mention}\nDuration: `{readable_duration}`\nReason: `{reason}`", color=await self.bot.get_embed_color(None))
if evidence: if evidence: