Cog-Creators / Red-DiscordBot

A multi-function Discord bot
https://docs.discord.red
GNU General Public License v3.0
4.81k stars 2.31k forks source link

[V3 Streams] add support for Twitch teams #2157

Open palmtree5 opened 6 years ago

palmtree5 commented 6 years ago

Feature request

Select the type of feature you are requesting:

Describe your requested feature

Original post in the discord: https://canary.discordapp.com/channels/133049272517001216/133049878837329920/494225748056473630

Basically adding support for Twitch's teams to the stream alerts. I'm going to work on this myself but wanted to go ahead and open an issue here for it

palmtree5 commented 1 year ago

Theoretically, the way this should look is something like this:

This will probably deviate from using redbot.cogs.streams.streamtypes.TwitchStream or at least certain functions of it, because in reality I want to try to minimize the amount of requests being made and using that class the way it is currently designed would mean making one request per streamer on the team, which for the example I've been using (a team with 73 members) would mean at least 147 requests but potentially up to 220 requests in what would be a short span of time, likely resulting in hitting rate limits (which it's not clear from Twitch's docs as to how many points are in a token's bucket without making a request and checking response headers to find out how many points are remaining)