diff --git a/cogs/streams.py b/cogs/streams.py index fdb143040..1717f5776 100644 --- a/cogs/streams.py +++ b/cogs/streams.py @@ -18,7 +18,6 @@ class Streams: self.bot = bot self.twitch_streams = fileIO("data/streams/twitch.json", "load") self.hitbox_streams = fileIO("data/streams/hitbox.json", "load") - self.pattern = {"CHANNELS" : [], "NAME" : "", "ALREADY_ONLINE" : False} @commands.command() async def hitbox(self, stream : str): @@ -191,7 +190,7 @@ class Streams: return False async def stream_checker(self): - CHECK_DELAY = 10 + CHECK_DELAY = 60 while "Streams" in self.bot.cogs: old = (deepcopy(self.twitch_streams), deepcopy(self.hitbox_streams)) @@ -205,7 +204,7 @@ class Streams: await self.bot.send_message(self.bot.get_channel(channel), "http://www.twitch.tv/{} is online!".format(stream["NAME"])) else: if stream["ALREADY_ONLINE"] and not online: stream["ALREADY_ONLINE"] = False - await asyncio.sleep(1) + await asyncio.sleep(0.5) for stream in self.hitbox_streams: online = await self.hitbox_online(stream["NAME"]) @@ -216,7 +215,7 @@ class Streams: await self.bot.send_message(self.bot.get_channel(channel), "http://www.hitbox.tv/{} is online!".format(stream["NAME"])) else: if stream["ALREADY_ONLINE"] and not online: stream["ALREADY_ONLINE"] = False - await asyncio.sleep(1) + await asyncio.sleep(0.5) if old != (self.twitch_streams, self.hitbox_streams): fileIO("data/streams/twitch.json", "save", self.twitch_streams)