fix(moderation): fixed resolve not unmuting/unbanning people
All checks were successful
Pylint / Pylint (push) Successful in 1m13s
All checks were successful
Pylint / Pylint (push) Successful in 1m13s
This commit is contained in:
parent
9524bd753c
commit
fb2e99bbcd
1 changed files with 3 additions and 3 deletions
|
@ -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}")
|
||||
|
|
Loading…
Reference in a new issue