misc: added some more things to the embeds
This commit is contained in:
parent
06878eebb2
commit
98bc2b7cc1
1 changed files with 6 additions and 2 deletions
|
@ -76,6 +76,7 @@ class Shortmute(commands.Cog):
|
||||||
return
|
return
|
||||||
if skip_confirmation is False:
|
if skip_confirmation is False:
|
||||||
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))
|
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))
|
||||||
|
embed.set_footer(text="/shortmute")
|
||||||
if evidence:
|
if evidence:
|
||||||
embed.set_image(url=evidence)
|
embed.set_image(url=evidence)
|
||||||
passed_info.update({
|
passed_info.update({
|
||||||
|
@ -84,6 +85,7 @@ class Shortmute(commands.Cog):
|
||||||
await interaction.response.send_message(embed=embed, view=self.ShortmuteButtons(timeout=180, passed_info=passed_info), ephemeral=True)
|
await interaction.response.send_message(embed=embed, view=self.ShortmuteButtons(timeout=180, passed_info=passed_info), ephemeral=True)
|
||||||
elif skip_confirmation is True:
|
elif skip_confirmation is True:
|
||||||
edit_embed = discord.Embed(title="Shortmute confirmed!", 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))
|
edit_embed = discord.Embed(title="Shortmute confirmed!", 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))
|
||||||
|
edit_embed.set_footer(text="/shortmute")
|
||||||
if evidence:
|
if evidence:
|
||||||
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)
|
||||||
|
@ -91,6 +93,7 @@ class Shortmute(commands.Cog):
|
||||||
await interaction.channel.send(content=f"{target.mention} was shortmuted for {readable_duration} by {interaction.user.mention} for: `{reason}`")
|
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**Duration:** {readable_duration}\n**Reason:** `{reason}`", color=await self.bot.get_embed_color(None))
|
||||||
|
dm_embed.set_footer(text="/shortmute")
|
||||||
if evidence:
|
if evidence:
|
||||||
dm_embed.set_image(url=evidence)
|
dm_embed.set_image(url=evidence)
|
||||||
try:
|
try:
|
||||||
|
@ -99,7 +102,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}`", 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**Duration:** {readable_duration}\n**Reason:** `{reason}`\n**Confirmation Skipped:** False", 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)
|
||||||
|
@ -133,6 +136,7 @@ class Shortmute(commands.Cog):
|
||||||
await old_interaction.channel.send(content=f"{target.mention} was shortmuted for {readable_duration} by {old_interaction.user.mention} for: `{reason}`")
|
await old_interaction.channel.send(content=f"{target.mention} was 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}\n**Target:** {target.mention}\n**Duration:** {readable_duration}\n**Reason:** `{reason}`", color=color)
|
dm_embed = discord.Embed(title=f"You've been shortmuted in {old_interaction.guild.name}!", description=f"**Moderator:** {old_interaction.user.mention}\n**Target:** {target.mention}\n**Duration:** {readable_duration}\n**Reason:** `{reason}`", color=color)
|
||||||
|
dm_embed.set_footer(text="/shortmute")
|
||||||
if evidence:
|
if evidence:
|
||||||
dm_embed.set_image(url=evidence)
|
dm_embed.set_image(url=evidence)
|
||||||
try:
|
try:
|
||||||
|
@ -141,7 +145,7 @@ class Shortmute(commands.Cog):
|
||||||
await old_message.edit(content="Could not message the target, user most likely has Direct Messages disabled.")
|
await old_message.edit(content="Could not message the target, user most likely has Direct Messages disabled.")
|
||||||
logging_channels_list = await self.config.guild(old_interaction.guild).logging_channels()
|
logging_channels_list = await self.config.guild(old_interaction.guild).logging_channels()
|
||||||
if logging_channels_list:
|
if logging_channels_list:
|
||||||
logging_embed = discord.Embed(title="User Shortmuted", description=f"**Moderator:** {old_interaction.user.mention} ({old_interaction.user.id})\n**Target:** {target.mention} ({target.id})\n**Duration:** {readable_duration}\n**Reason:** `{reason}`", color=color)
|
logging_embed = discord.Embed(title="User Shortmuted", description=f"**Moderator:** {old_interaction.user.mention} ({old_interaction.user.id})\n**Target:** {target.mention} ({target.id})\n**Duration:** {readable_duration}\n**Reason:** `{reason}`\n**Confirmation Skipped:** False", color=color)
|
||||||
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