mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Fix NoneType error and channelmute saying user is already muted (#6144)
Co-authored-by: Jakub Kuczys <me@jacken.men>
This commit is contained in:
parent
59216e2632
commit
5893d590a7
@ -401,8 +401,9 @@ class Mutes(VoiceMutes, commands.Cog, metaclass=CompositeMetaClass):
|
|||||||
log.debug(f"Creating task: {task_name}")
|
log.debug(f"Creating task: {task_name}")
|
||||||
if task_name in self._unmute_tasks:
|
if task_name in self._unmute_tasks:
|
||||||
continue
|
continue
|
||||||
|
if guild_channel := guild.get_channel(channel):
|
||||||
self._unmute_tasks[task_name] = asyncio.create_task(
|
self._unmute_tasks[task_name] = asyncio.create_task(
|
||||||
self._auto_channel_unmute_user(guild.get_channel(channel), mute_data)
|
self._auto_channel_unmute_user(guild_channel, mute_data)
|
||||||
)
|
)
|
||||||
|
|
||||||
del multiple_mutes
|
del multiple_mutes
|
||||||
@ -1726,7 +1727,7 @@ class Mutes(VoiceMutes, commands.Cog, metaclass=CompositeMetaClass):
|
|||||||
|
|
||||||
if channel.id not in self._channel_mutes:
|
if channel.id not in self._channel_mutes:
|
||||||
self._channel_mutes[channel.id] = {}
|
self._channel_mutes[channel.id] = {}
|
||||||
current_mute = self._channel_mutes.get(channel.id)
|
current_mute = self._channel_mutes[channel.id].get(user.id)
|
||||||
|
|
||||||
# Determine if this is voice mute -> channel mute upgrade
|
# Determine if this is voice mute -> channel mute upgrade
|
||||||
is_mute_upgrade = (
|
is_mute_upgrade = (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user