fix(moderation): awaited four coroutines
Some checks failed
Pylint / Pylint (push) Failing after 1m19s
Some checks failed
Pylint / Pylint (push) Failing after 1m19s
This commit is contained in:
parent
be2d97e19c
commit
32b2007c87
1 changed files with 4 additions and 4 deletions
|
@ -213,7 +213,7 @@ class Moderation(commands.Cog):
|
||||||
"""Warn a user."""
|
"""Warn a user."""
|
||||||
await interaction.response.send_message(content=f"{target.mention} has been warned!\n**Reason** - `{reason}`")
|
await interaction.response.send_message(content=f"{target.mention} has been warned!\n**Reason** - `{reason}`")
|
||||||
try:
|
try:
|
||||||
embed = self.embed_factory('message', interaction.guild, reason, 'warned', interaction.original_response())
|
embed = await self.embed_factory('message', interaction.guild, reason, 'warned', interaction.original_response())
|
||||||
await target.send(embed=embed)
|
await target.send(embed=embed)
|
||||||
except discord.errors.HTTPException:
|
except discord.errors.HTTPException:
|
||||||
pass
|
pass
|
||||||
|
@ -236,7 +236,7 @@ class Moderation(commands.Cog):
|
||||||
await target.timeout(parsed_time)
|
await target.timeout(parsed_time)
|
||||||
await interaction.response.send_message(content=f"{target.mention} has been muted for {humanize.precisedelta(parsed_time)}!\n**Reason** - `{reason}`")
|
await interaction.response.send_message(content=f"{target.mention} has been muted for {humanize.precisedelta(parsed_time)}!\n**Reason** - `{reason}`")
|
||||||
try:
|
try:
|
||||||
embed = self.embed_factory('message', interaction.guild, reason, 'muted', interaction.original_response(), parsed_time)
|
embed = await self.embed_factory('message', interaction.guild, reason, 'muted', interaction.original_response(), parsed_time)
|
||||||
await target.send(embed=embed)
|
await target.send(embed=embed)
|
||||||
except discord.errors.HTTPException:
|
except discord.errors.HTTPException:
|
||||||
pass
|
pass
|
||||||
|
@ -255,7 +255,7 @@ class Moderation(commands.Cog):
|
||||||
reason = "No reason given."
|
reason = "No reason given."
|
||||||
await interaction.response.send_message(content=f"{target.mention} has been unmuted!\n**Reason** - `{reason}`")
|
await interaction.response.send_message(content=f"{target.mention} has been unmuted!\n**Reason** - `{reason}`")
|
||||||
try:
|
try:
|
||||||
embed = self.embed_factory('message', interaction.guild, reason, 'unmuted', interaction.original_response())
|
embed = await self.embed_factory('message', interaction.guild, reason, 'unmuted', interaction.original_response())
|
||||||
await target.send(embed=embed)
|
await target.send(embed=embed)
|
||||||
except discord.errors.HTTPException:
|
except discord.errors.HTTPException:
|
||||||
pass
|
pass
|
||||||
|
@ -266,7 +266,7 @@ class Moderation(commands.Cog):
|
||||||
"""Kick a user."""
|
"""Kick a user."""
|
||||||
await interaction.response.send_message(content=f"{target.mention} has been kicked!\n**Reason** - `{reason}`")
|
await interaction.response.send_message(content=f"{target.mention} has been kicked!\n**Reason** - `{reason}`")
|
||||||
try:
|
try:
|
||||||
embed = self.embed_factory('message', interaction.guild, reason, 'kicked', interaction.original_response())
|
embed = await self.embed_factory('message', interaction.guild, reason, 'kicked', interaction.original_response())
|
||||||
await target.send(embed=embed)
|
await target.send(embed=embed)
|
||||||
except discord.errors.HTTPException:
|
except discord.errors.HTTPException:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue