This commit is contained in:
2024-11-17 23:07:39 +01:00
parent ac77356c4c
commit fc3ce27c51

View File

@@ -55,12 +55,11 @@ class TwitchService:
raise ValueError("Unknown method") raise ValueError("Unknown method")
subs = await self.twitch.get_eventsub_subscriptions( subs = await self.twitch.get_eventsub_subscriptions(
status="enabled",
sub_type=sub_type,
user_id=str(streamer.twitch.id) user_id=str(streamer.twitch.id)
) )
for sub in subs.data: for sub in subs.data:
if sub.status == "enabled" and sub.type == sub_type:
await self.twitch.delete_eventsub_subscription(sub.id) await self.twitch.delete_eventsub_subscription(sub.id)
except Exception as e: except Exception as e:
if retry <= 0: if retry <= 0: