mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 19:28:54 -05:00
Better unloading of background tasks
This commit is contained in:
parent
cab5b23b0b
commit
4be9757404
@ -590,7 +590,7 @@ class Audio:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
async def queue_manager(self):
|
async def queue_manager(self):
|
||||||
while "Audio" in self.bot.cogs:
|
while self == self.bot.get_cog("Audio"):
|
||||||
if not self.music_player.paused:
|
if not self.music_player.paused:
|
||||||
if self.queue and not self.music_player.is_playing():
|
if self.queue and not self.music_player.is_playing():
|
||||||
new_link = self.queue[0]
|
new_link = self.queue[0]
|
||||||
|
|||||||
@ -280,7 +280,7 @@ class Streams:
|
|||||||
async def stream_checker(self):
|
async def stream_checker(self):
|
||||||
CHECK_DELAY = 60
|
CHECK_DELAY = 60
|
||||||
|
|
||||||
while "Streams" in self.bot.cogs:
|
while self == self.bot.get_cog("Streams"):
|
||||||
|
|
||||||
old = (deepcopy(self.twitch_streams), deepcopy(self.hitbox_streams), deepcopy(self.beam_streams))
|
old = (deepcopy(self.twitch_streams), deepcopy(self.hitbox_streams), deepcopy(self.beam_streams))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user