[Streams] Use new Twitch API and Bearer tokens #3487

Merged
PredaaA merged 5 commits from patch-7 into V3/develop 2020-02-15 06:14:35 +01:00
PredaaA commented 2020-02-01 21:26:35 +01:00 (Migrated from github.com)

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

  • Stop using Twitch API v5 and use the "new API" instead.
  • Use Bearer tokens for Twitch requests. Which gives 800 req/min instead of 30 when don't using them. They are stored in memory and re-generated when their expiry date come (~60 days).
  • Escape markdown and mass mention for "streamer_name is live!" messages.
  • Use humanize_number for every numbers.

Important note: That PR is based of #3237 and need that one merged before.
Fixes #3479.
Fixes #3489.

### Type - [ ] Bugfix - [x] Enhancement - [ ] New feature ### Description of the changes - Stop using Twitch API v5 and use the "new API" instead. - Use Bearer tokens for Twitch requests. Which gives 800 req/min instead of 30 when don't using them. They are stored in memory and re-generated when their expiry date come (~60 days). - Escape markdown and mass mention for "streamer_name is live!" messages. - Use humanize_number for every numbers. **Important note:** That PR is based of #3237 and need that one merged before. Fixes #3479. Fixes #3489.
palmtree5 (Migrated from github.com) reviewed 2020-02-01 21:26:35 +01:00
Twentysix26 (Migrated from github.com) reviewed 2020-02-01 21:26:35 +01:00
TrustyJAID (Migrated from github.com) requested changes 2020-02-15 04:31:03 +01:00
TrustyJAID (Migrated from github.com) commented 2020-02-15 04:00:29 +01:00

This should be changed to

                    "`{prefix}set api twitch client_id <your_client_id_here> "
This should be changed to ```suggestion "`{prefix}set api twitch client_id <your_client_id_here> " ```
PredaaA (Migrated from github.com) reviewed 2020-02-15 04:51:01 +01:00
PredaaA (Migrated from github.com) commented 2020-02-15 04:51:00 +01:00

Done.

Done.
TrustyJAID (Migrated from github.com) reviewed 2020-02-15 05:00:04 +01:00
TrustyJAID (Migrated from github.com) left a comment
No description provided.
This has been working well for martine for over a week now and looks like a solid addition considering Twitch will be requiring OAuth for all tokens on [April 30, 2020](https://discuss.dev.twitch.tv/t/requiring-oauth-for-helix-twitch-api-endpoints/23916). While we weren't using the helix API before, the kraken API is depracated and will be removed at some future date.
mikeshardmind (Migrated from github.com) approved these changes 2020-02-15 06:13:52 +01:00
mikeshardmind (Migrated from github.com) left a comment

Re-approving as this was just a merge for conflict resolution.

Re-approving as this was just a merge for conflict resolution.
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!3487
No description provided.