fix(moderation): fixed slash commands implementation
Some checks failed
Pylint / Pylint (push) Failing after 1m16s

This commit is contained in:
Seaswimmer 2023-10-05 08:43:11 -04:00
parent 3f042b1f96
commit 27070d3920
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -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 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):
"""Mute a user."""
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 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):
"""Unmute a user."""
if target.is_timed_out() is False: