mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18: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
|
||||
|
||||
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 self.queue and not self.music_player.is_playing():
|
||||
new_link = self.queue[0]
|
||||
|
||||
@ -280,7 +280,7 @@ class Streams:
|
||||
async def stream_checker(self):
|
||||
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))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user