fix(moderation): fixed resolve not unmuting/unbanning people
All checks were successful
Pylint / Pylint (push) Successful in 1m13s

This commit is contained in:
SeaswimmerTheFsh 2023-10-06 10:46:06 -04:00
parent 9524bd753c
commit fb2e99bbcd
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -469,14 +469,14 @@ class Moderation(commands.Cog):
case = self.generate_dict(result_2)
if reason is None:
reason = "No reason given."
if case['moderation_type'] in ['mute', 'tempban']:
if case['moderation_type'] == 'mute':
if case['moderation_type'] in ['MUTE', 'TEMPBAN']:
if case['moderation_type'] == 'MUTE':
try:
member = await interaction.guild.fetch_member(case['target_id'])
await member.timeout(None, reason=f"Case #{case_number} resolved by {interaction.user.id}")
except discord.NotFound:
pass
if case['moderation_type'] == 'tempban':
if case['moderation_type'] == 'TEMPBAN':
try:
user = await interaction.client.fetch_user(case['target_id'])
await interaction.guild.unban(user, reason=f"Case #{case_number} resolved by {interaction.user.id}")