fix(moderation): added reason to target.timeout in mute method
Some checks failed
Pylint / Pylint (push) Failing after 1m12s

This commit is contained in:
Seaswimmer 2023-10-05 09:40:41 -04:00
parent ee5f9461aa
commit 4cbf552204
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -233,7 +233,7 @@ class Moderation(commands.Cog):
if parsed_time.total_seconds() / 1000 > 2419200000:
await interaction.response.send_message("Please provide a duration that is less than 28 days.")
return
await target.timeout(parsed_time)
await target.timeout(parsed_time, reason=f"Muted by {interaction.user.id} for: {reason}")
await interaction.response.send_message(content=f"{target.mention} has been muted for {humanize.precisedelta(parsed_time)}!\n**Reason** - `{reason}`")
try:
embed = await self.embed_factory('message', interaction.guild, reason, 'muted', await interaction.original_response(), parsed_time)