mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -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.
|
inside our tasks.
|
||||||
"""
|
"""
|
||||||
log.debug("Cleaning unmute tasks")
|
log.debug("Cleaning unmute tasks")
|
||||||
is_debug = log.getEffectiveLevel() <= logging.DEBUG
|
|
||||||
for task_id in list(self._unmute_tasks.keys()):
|
for task_id in list(self._unmute_tasks.keys()):
|
||||||
task = self._unmute_tasks[task_id]
|
task = self._unmute_tasks[task_id]
|
||||||
|
|
||||||
@ -273,9 +272,8 @@ class Mutes(VoiceMutes, commands.Cog, metaclass=CompositeMetaClass):
|
|||||||
if task.done():
|
if task.done():
|
||||||
try:
|
try:
|
||||||
r = task.result()
|
r = task.result()
|
||||||
except Exception:
|
except Exception as exc:
|
||||||
if is_debug:
|
log.error("An unexpected error occurred in the unmute task", exc_info=exc)
|
||||||
log.exception("Dead task when trying to unmute")
|
|
||||||
self._unmute_tasks.pop(task_id, None)
|
self._unmute_tasks.pop(task_id, None)
|
||||||
|
|
||||||
async def _handle_server_unmutes(self):
|
async def _handle_server_unmutes(self):
|
||||||
@ -1868,7 +1866,7 @@ class Mutes(VoiceMutes, commands.Cog, metaclass=CompositeMetaClass):
|
|||||||
"channel": channel,
|
"channel": channel,
|
||||||
"reason": _(MUTE_UNMUTE_ISSUES["already_unmuted"]),
|
"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 {
|
return {
|
||||||
"success": False,
|
"success": False,
|
||||||
"channel": channel,
|
"channel": channel,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user