fix(moderation): awaited a coroutine
All checks were successful
Pylint / Pylint (push) Successful in 1m13s
All checks were successful
Pylint / Pylint (push) Successful in 1m13s
This commit is contained in:
parent
f792d9c149
commit
98f91b8ba3
1 changed files with 2 additions and 2 deletions
|
@ -184,12 +184,12 @@ class Moderation(commands.Cog):
|
|||
await target.timeout(parsed_time)
|
||||
response = await ctx.send(content=f"{target.mention} has been muted for {str(parsed_time)}!\n**Reason** - `{reason}`")
|
||||
try:
|
||||
embed = discord.Embed(title="Muted", description=f"You have been muted for `{str(parsed_time)}` in {ctx.guild.name}.", color=await self.bot.get_embed_color(None))
|
||||
embed = discord.Embed(title="Muted", description=f"You have been muted for `{str(parsed_time)}` in [{ctx.guild.name}]({response.jump_url}).", color=await self.bot.get_embed_color(None))
|
||||
embed.add_field(name='Reason', value=f"`{reason}`")
|
||||
await target.send(embed=embed)
|
||||
except discord.errors.HTTPException:
|
||||
await response.edit(content=f"{response.content}\n*Failed to send DM, user likely has the bot blocked.*")
|
||||
self.mysql_log(ctx.guild.id, ctx.author.id, 'MUTE', target.id, parsed_time, reason)
|
||||
await self.mysql_log(ctx.guild.id, ctx.author.id, 'MUTE', target.id, parsed_time, reason)
|
||||
|
||||
@commands.group(autohelp=True)
|
||||
@checks.admin()
|
||||
|
|
Loading…
Reference in a new issue