fix(moderation): fixed slash commands implementation
Some checks failed
Pylint / Pylint (push) Failing after 1m16s
Some checks failed
Pylint / Pylint (push) Failing after 1m16s
This commit is contained in:
parent
3f042b1f96
commit
27070d3920
1 changed files with 2 additions and 2 deletions
|
@ -197,7 +197,7 @@ class Moderation(commands.Cog):
|
||||||
await response.edit(content=f"{response.content}\n*Failed to send DM, user likely has the bot blocked.*")
|
await response.edit(content=f"{response.content}\n*Failed to send DM, user likely has the bot blocked.*")
|
||||||
await self.mysql_log(interaction.guild.id, interaction.user.id, 'WARN', target.id, 'NULL', reason)
|
await self.mysql_log(interaction.guild.id, interaction.user.id, 'WARN', target.id, 'NULL', reason)
|
||||||
|
|
||||||
@app_commands.command(name="mute", aliases=['timeout', 'tm'])
|
@app_commands.command(name="mute")
|
||||||
async def mute(self, interaction: discord.Interaction, target: discord.Member, duration: str, reason: str):
|
async def mute(self, interaction: discord.Interaction, target: discord.Member, duration: str, reason: str):
|
||||||
"""Mute a user."""
|
"""Mute a user."""
|
||||||
if target.is_timed_out() is True:
|
if target.is_timed_out() is True:
|
||||||
|
@ -222,7 +222,7 @@ class Moderation(commands.Cog):
|
||||||
await response.edit(content=f"{response.content}\n*Failed to send DM, user likely has the bot blocked.*")
|
await response.edit(content=f"{response.content}\n*Failed to send DM, user likely has the bot blocked.*")
|
||||||
await self.mysql_log(interaction.guild.id, interaction.user.id, 'MUTE', target.id, parsed_time, reason)
|
await self.mysql_log(interaction.guild.id, interaction.user.id, 'MUTE', target.id, parsed_time, reason)
|
||||||
|
|
||||||
@app_commands.command(name="unmute", aliases=['untimeout', 'utm'])
|
@app_commands.command(name="unmute")
|
||||||
async def unmute(self, interaction: discord.Interaction, target: discord.Member, reason: str = None):
|
async def unmute(self, interaction: discord.Interaction, target: discord.Member, reason: str = None):
|
||||||
"""Unmute a user."""
|
"""Unmute a user."""
|
||||||
if target.is_timed_out() is False:
|
if target.is_timed_out() is False:
|
||||||
|
|
Loading…
Reference in a new issue