fix(moderation): I forgot about notes 💀
Some checks failed
Pylint / Pylint (3.10) (push) Failing after 52s

This commit is contained in:
Seaswimmer 2023-12-13 16:55:53 -05:00
parent a0b77d6fcf
commit 7d147bc027
Signed by: cswimr
GPG key ID: 1EBC234EEDA901AE

View file

@ -407,7 +407,7 @@ class Moderation(commands.Cog):
if interaction.user.top_role <= target_member.top_role: if interaction.user.top_role <= target_member.top_role:
await interaction.response.send_message(content="You cannot moderate members with a higher role than you!", ephemeral=True) await interaction.response.send_message(content="You cannot moderate members with a higher role than you!", ephemeral=True)
return return
await interaction.response.send_message(content=f"{target.mention} has recieved a note!\n**Reason** - `{reason}`") message: discord.Message = await interaction.response.send_message(content=f"{target.mention} has recieved a note!\n**Reason** - `{reason}`")
if silent is None: if silent is None:
silent = not await self.config.guild(interaction.guild).dm_users() silent = not await self.config.guild(interaction.guild).dm_users()
if silent is False: if silent is False:
@ -417,6 +417,7 @@ class Moderation(commands.Cog):
except discord.errors.HTTPException: except discord.errors.HTTPException:
pass pass
moderation_id = await self.mysql_log(interaction.guild.id, interaction.user.id, 'NOTE', target.id, 0, 'NULL', reason) moderation_id = await self.mysql_log(interaction.guild.id, interaction.user.id, 'NOTE', target.id, 0, 'NULL', reason)
await message.edit(content=f"{target.mention} has received a note! (Case `#{moderation_id}`)\n**Reason** - `{reason}`")
await self.log(interaction, moderation_id) await self.log(interaction, moderation_id)
@app_commands.command(name="warn") @app_commands.command(name="warn")