Fix unmute type for manually removed channel overwrites (#4540)

This commit is contained in:
jack1142 2020-10-27 01:16:11 +01:00 committed by GitHub
parent b6e96548d0
commit 0b0ace10dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -545,11 +545,15 @@ class Mutes(VoiceMutes, commands.Cog, metaclass=CompositeMetaClass):
log.debug(f"{user} - {type(user)}")
to_del.append(user_id)
log.debug("creating case")
if isinstance(after, discord.VoiceChannel):
unmute_type = "vunmute"
else:
unmute_type = "cunmute"
await modlog.create_case(
self.bot,
after.guild,
datetime.now(timezone.utc),
"cunmute",
unmute_type,
user,
None,
_("Manually removed channel overwrites"),