Compare commits

..

2 commits

Author SHA1 Message Date
41e3c3f278
misc: reduced redundant code 2023-08-08 10:10:14 -04:00
3e7b6a5b12
docs: updated docstring 2023-08-08 10:09:09 -04:00

View file

@ -34,7 +34,7 @@ class Shortmute(commands.Cog):
An image link to evidence for the shortmute, do not use with evidence_image
evidence_image: discord.Attachment = None
An image file used as evidence for the shortmute, do not use with evidence_link
skip_confirmation: bool = False
skip_confirmation: bool = True
This allows you skip the confirmation prompt and immediately shortmute the user.
"""
disable_dateutil()
@ -69,14 +69,11 @@ class Shortmute(commands.Cog):
return
if duration == 1 or duration == -1:
readable_duration = f"{duration} minute"
passed_info.update({
"readable_duration": readable_duration
})
else:
readable_duration = f"{duration} minutes"
passed_info.update({
"readable_duration": readable_duration
})
passed_info.update({
"readable_duration": readable_duration
})
if duration > 30:
await interaction.response.send_message(content=f"{readable_duration} is longer than the 30 minutes you are allowed to shortmute users for.", ephemeral=True)
return