diff --git a/shortmute/shortmute.py b/shortmute/shortmute.py index 42ad7bd..247683d 100644 --- a/shortmute/shortmute.py +++ b/shortmute/shortmute.py @@ -96,9 +96,9 @@ class Shortmute(commands.Cog): edit_embed.set_image(url=evidence) message = await interaction.response.send_message(embed=edit_embed, ephemeral=True) await target.timeout(timedelta, reason=f"User shortmuted for {readable_duration} by {interaction.user.name} ({interaction.user.id}) for: {reason}") - await interaction.channel.send(content=f"{target.mention} was shortmuted for {readable_duration} by {interaction.user.mention} for: `{reason}`") + shortmute_msg = await interaction.channel.send(content=f"{target.mention} was shortmuted for {readable_duration} by {interaction.user.mention} for: `{reason}`") if await self.config.guild(interaction.guild).dm() is True: - dm_embed = discord.Embed(title=f"You've been shortmuted in {interaction.guild.name}!", 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)) + dm_embed = discord.Embed(title=f"You've been shortmuted in {interaction.guild.name}!", description=f"**Moderator:** {interaction.user.mention}\n**Target:** {target.mention}\n**Message:** {shortmute_msg.jump_url}\n**Duration:** {readable_duration}\n**Reason:** `{reason}`", color=await self.bot.get_embed_color(None)) dm_embed.set_footer(text="/shortmute") if evidence: dm_embed.set_image(url=evidence) @@ -108,7 +108,7 @@ class Shortmute(commands.Cog): await message.edit(content="Could not message the target, user most likely has Direct Messages disabled.") logging_channels_list = await self.config.guild(interaction.guild).logging_channels() if logging_channels_list: - logging_embed = discord.Embed(title="User Shortmuted", description=f"**Moderator:** {interaction.user.mention} ({interaction.user.id})\n**Target:** {target.mention} ({target.id})\n**Duration:** {readable_duration}\n**Reason:** `{reason}`\n**Confirmation Skipped:** True", color=await self.bot.get_embed_color(None)) + logging_embed = discord.Embed(title="User Shortmuted", description=f"**Moderator:** {interaction.user.mention} ({interaction.user.id})\n**Target:** {target.mention} ({target.id})\n**Message:** {shortmute_msg.jump_url}\n**Duration:** {readable_duration}\n**Reason:** `{reason}`\n**Confirmation Skipped:** True", color=await self.bot.get_embed_color(None)) logging_embed.set_footer(text="/shortmute") if evidence: logging_embed.set_image(url=evidence)