misc: reduced redundant code

This commit is contained in:
Seaswimmer 2023-08-08 10:10:14 -04:00
parent 3e7b6a5b12
commit 41e3c3f278
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -69,14 +69,11 @@ class Shortmute(commands.Cog):
return return
if duration == 1 or duration == -1: if duration == 1 or duration == -1:
readable_duration = f"{duration} minute" readable_duration = f"{duration} minute"
passed_info.update({
"readable_duration": readable_duration
})
else: else:
readable_duration = f"{duration} minutes" readable_duration = f"{duration} minutes"
passed_info.update({ passed_info.update({
"readable_duration": readable_duration "readable_duration": readable_duration
}) })
if duration > 30: 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) 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 return