mirror of
https://github.com/kurbezz/discord-bot.git
synced 2025-12-06 07:05:36 +01:00
Refactor stream_notifications
This commit is contained in:
@@ -104,14 +104,9 @@ class TwitchService:
|
|||||||
)
|
)
|
||||||
logger.info("Twitch service started")
|
logger.info("Twitch service started")
|
||||||
|
|
||||||
while True:
|
await eventsub._keep_loop_alive()
|
||||||
await sleep(0.1)
|
|
||||||
finally:
|
finally:
|
||||||
await eventsub.unsubscribe_all()
|
|
||||||
await eventsub.stop()
|
await eventsub.stop()
|
||||||
|
|
||||||
await sleep(10)
|
|
||||||
|
|
||||||
await self.twitch.close()
|
await self.twitch.close()
|
||||||
|
|
||||||
raise RuntimeError("Twitch service stopped")
|
raise RuntimeError("Twitch service stopped")
|
||||||
|
|||||||
Reference in New Issue
Block a user