fix: fixed broken set_image urls
This commit is contained in:
parent
52d005178e
commit
66a16eb08d
1 changed files with 4 additions and 4 deletions
|
@ -70,7 +70,7 @@ class Shortmute(commands.Cog):
|
|||
return
|
||||
embed = discord.Embed(title="Are you sure?", description=f"Moderator: {interaction.user.mention}\nTarget: {target.mention}\nDuration: `{readable_duration}`\nReason: `{reason}`", color=await self.bot.get_embed_color(None))
|
||||
if evidence:
|
||||
embed.set_image(evidence)
|
||||
embed.set_image(url=evidence)
|
||||
passed_info.update({
|
||||
"evidence": evidence
|
||||
})
|
||||
|
@ -95,14 +95,14 @@ class Shortmute(commands.Cog):
|
|||
edit_embed = discord.Embed(title="Shortmute confirmed!", description=f"Moderator: {old_interaction.user.mention}\nTarget: {target.mention}\nDuration: `{readable_duration}`\nReason: `{reason}`", color=await self.bot.get_embed_color(None))
|
||||
if self.passed_info.get('evidence'):
|
||||
evidence = self.passed_info['evidence']
|
||||
edit_embed.set_image(evidence)
|
||||
edit_embed.set_image(url=evidence)
|
||||
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 interaction.response.send_message(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:
|
||||
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:
|
||||
dm_embed.set_image(evidence)
|
||||
dm_embed.set_image(url=evidence)
|
||||
try:
|
||||
await target.send(embed=dm_embed)
|
||||
except discord.HTTPException as error:
|
||||
|
@ -111,7 +111,7 @@ class Shortmute(commands.Cog):
|
|||
if logging_channels_list:
|
||||
logging_embed = discord.Embed(title="Shortmute", description=f"Moderator: {old_interaction.user.mention} ({old_interaction.user.id})\nTarget: {target.mention} ({target.id})\nDuration: `{readable_duration}`\nReason: `{reason}`", color=await self.bot.get_embed_color(None))
|
||||
if evidence:
|
||||
logging_embed.set_image(evidence)
|
||||
logging_embed.set_image(url=evidence)
|
||||
for channel_id in logging_channels_list:
|
||||
channel_obj = old_interaction.guild.get_channel(channel_id)
|
||||
await channel_obj.send(embed=logging_embed)
|
||||
|
|
Loading…
Reference in a new issue