mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Fix issues with channel unmutes for mute data from 3.4.x (#6121)
This commit is contained in:
parent
c541425b57
commit
5f4b0e853e
@ -262,7 +262,6 @@ class Mutes(VoiceMutes, commands.Cog, metaclass=CompositeMetaClass):
|
||||
inside our tasks.
|
||||
"""
|
||||
log.debug("Cleaning unmute tasks")
|
||||
is_debug = log.getEffectiveLevel() <= logging.DEBUG
|
||||
for task_id in list(self._unmute_tasks.keys()):
|
||||
task = self._unmute_tasks[task_id]
|
||||
|
||||
@ -273,9 +272,8 @@ class Mutes(VoiceMutes, commands.Cog, metaclass=CompositeMetaClass):
|
||||
if task.done():
|
||||
try:
|
||||
r = task.result()
|
||||
except Exception:
|
||||
if is_debug:
|
||||
log.exception("Dead task when trying to unmute")
|
||||
except Exception as exc:
|
||||
log.error("An unexpected error occurred in the unmute task", exc_info=exc)
|
||||
self._unmute_tasks.pop(task_id, None)
|
||||
|
||||
async def _handle_server_unmutes(self):
|
||||
@ -1868,7 +1866,7 @@ class Mutes(VoiceMutes, commands.Cog, metaclass=CompositeMetaClass):
|
||||
"channel": channel,
|
||||
"reason": _(MUTE_UNMUTE_ISSUES["already_unmuted"]),
|
||||
}
|
||||
if not current_mute["voice_mute"] and voice_mute:
|
||||
if not current_mute.get("voice_mute", False) and voice_mute:
|
||||
return {
|
||||
"success": False,
|
||||
"channel": channel,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user