zorael / kameloso

IRC bot with Twitch support
Boost Software License 1.0
9 stars 3 forks source link

Twitch broadcaster-level permission commands (`superkey`) #131

Closed zorael closed 2 years ago

zorael commented 2 years ago

This adds support for commands that require the Twitch OAuth access token of the broadcaster of a channel.

Generally it is recommended that a bot is run under a separate account with moderator privileges in a different channel than its own. This has the downsides of not being able to issue certain commands that require you to be the owner of the channel, such as changing the channel title or current game. For this you need the access key of the broadcaster account.

Since we're now storing secrets (in twitch-secrets.json) for use with Google/YouTube and Spotify APIs, it's easy enough to just add a broadcasterKey entry to it, and setting up a separate keygen routine to request one such from Twitch.

With this we can now do:

More is certainly possible but not yet implemented.