feat(shortmute): added jump urls to shortmute logging
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
Some checks reported warnings
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
This commit is contained in:
parent
ca82cb181b
commit
fa0ecaf30a
1 changed files with 3 additions and 3 deletions
|
@ -96,9 +96,9 @@ class Shortmute(commands.Cog):
|
||||||
edit_embed.set_image(url=evidence)
|
edit_embed.set_image(url=evidence)
|
||||||
message = await interaction.response.send_message(embed=edit_embed, ephemeral=True)
|
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 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:
|
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")
|
dm_embed.set_footer(text="/shortmute")
|
||||||
if evidence:
|
if evidence:
|
||||||
dm_embed.set_image(url=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.")
|
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()
|
logging_channels_list = await self.config.guild(interaction.guild).logging_channels()
|
||||||
if logging_channels_list:
|
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")
|
logging_embed.set_footer(text="/shortmute")
|
||||||
if evidence:
|
if evidence:
|
||||||
logging_embed.set_image(url=evidence)
|
logging_embed.set_image(url=evidence)
|
||||||
|
|
Loading…
Reference in a new issue