professor-l / classic-tetris-project

A Discord and twitch bot for Classic Tetris Monthly
MIT License
23 stars 23 forks source link

Updates for Twitch v5 -> Helix w/ README updates #70

Closed Fireworks closed 2 years ago

Fireworks commented 2 years ago

Hello :)

Twitch v5 deprecation is coming in hot. Full sunsetting is set for February 28, 2022 and there are shutdown windows occurring until then as follows:

February 7, 2022 – 1-hour shutdown starting at 11:00am PDT
February 9, 2022 – 2-hour shutdown starting at 11:00am PDT
February 14, 2022 – 4-hour shutdown starting at 11:00am PDT
February 16, 2022 – 6-hour shutdown starting at 11:00am PDT
February 22, 2022 – 24-hour shutdown starting at 11:00am PDT
February 28, 2022 – v5 permanent shutdown

While setting up, I went ahead and updated the usages to Helix. The primary change for Helix is that we now need to pass an OAuth token along with all requests. More info here: https://dev.twitch.tv/docs/api/migration

My python isn't great and I did this late last night when the brain was in a questionable state, but I did smoke test a little bit and also took a stab at some README updates.

Important: I haven't yet run the website, so I need to double check usages of the Twitch API calls on that side of things in case there is a pathway that still needs adjustments. Let me know if anything comes to mind for you guys for me to specifically take a look at.

Also Important: We'll need to update the ENV variables as necessary on prod, namely dropping oauth prefix from TWITCH_TOKEN and making sure the token matches the client ID if it does not currently.