Channel points are great. They allow you to add another interactive element to your stream. And you can do a lot more with them than modify a single emote or highlight a message. You can easily add custom rewards and thanks to Twitch’s API, anyone can build near real time integrations for channel point reward redemptions. So, let’s get creative: How about we let viewers directly interact with your game by redeeming channel point rewards? A reward that makes you pull the knife out in CS:GO? Sure. One that makes you get out of any vehicle in Battlefield 2042? Why not. If this sounds good to you, let’s jump ahead to the setup. If it sounds scary to have viewers trigger keypresses on your machine, read on.
How it works
To make this super simple to set up, I built 0xQWERTY. It consists of a server component which I host and a client tool you run on your machine. The client is responsible for virtually pressing keys in your games. The server receives details about redeemed rewards from Twitch and forwards them to the client.
For now, let’s assume you set up the rewards, you started the client and you are live on Twitch. If a viewer redeems one of the rewards set up through 0xQWERTY, here is what happens.
- Twitch sends details about the redemption to the server.
- The server forwards all relevant info the client on your machine.
- If a supported game is currently open in the foreground and you configured an action for that game, the client virtually presses the key you configured.
All this happens in a fraction of a second. The only relevant delay the stream delay itself.
Keeping you safe
Before we get to the setup, let me address a few safety concerns you may have. If you want to verify any of the following statements, feel free to take a look at the source code on GitHub (client, server).
- The configuration that defines which key to press for individual rewards and games only exists locally on your machine. It is a simple plain text
YAML
file. The client never sends the configuration file or it’s content to the server or to Twitch. - The assignment of keys to rewards and games cannot be changed remotely. Not my be, not by Twitch. If you change the title or cost of a reward on Twitch, the client will update those details in the configuration. That is all. Rewards can only be added by you changing the
YAML
file. Games can only be added by you changing theYAML
file. Which key to press for each game can only be configured by you changing theYAML
file. - You define reward actions on a per game basis. If none of the games configured for a reward is currently open, nothing happens.
- The client triggers reward actions only if the game is open in the foreground. In case it receives a redemption while you are not in game, it will not trigger a keypress.
- 0xQWERTY cannot modify any of your existing channel point rewards. The Twitch API only allows applications to manage rewards created through that same application.
Please don’t hesitate to reach out on Twitter or join the Discord if you have any further questions or concerns.
Let’s get going
With all that out of the way, we can finally get to setting up the client. Basically, all you need is a Twitch channel which has channel points enabled, a text editor and, well, the client. For this example, we will set up two rewards. One will switch to your melee weapon in CS:GO by pressing 3
. The other will hit e
in Battlefield 2042 to get you out of a vehicle. For a full list of supported games, head over to GitHub.
Step 1: Download and extract the latest release of the 0xQWERTY-client. Under assets, look for 0xqwerty-client-vX.X.X.zip
. Once downloaded, extract the .zip
file.
Step 2: Rename config.example.yaml
to config.yaml
.
Step 3: Open config.yaml
in a text editor. I highly recommend notepad++ or another editor with basic YAML
support, but even the default Windows editor will work. You can also use an online editor, like this one on codebeautify.org.
logLevel: info
autoFulfill: true
refund: false
rewards:
- id: '80d76c25-6dd4-412c-91f7-329121ae54d3' # An existing reward created by 0xQWERTY
title: Get out of the vehicle!
cost: 1000
actions:
Battlefield 2:
type: keypress
value: e
Call of Duty Modern Warfare:
type: keypress
value: f
- title: Reload my gun! # Rewards without an id will be created
cost: 500
actions:
Counter-Strike Global Offensive:
type: keypress
value: r
Valorant:
type: keypress
value: r
- title: Jump!
cost: 200
actions:
Rocket League:
type: keypress
value: space
Step 4: Configure global options. If you set autoFulfill
to true
, the client will automatically mark redemptions as fulfilled if it triggered a keypress. With refund
set to true
, all reward redemptions will be refunded (regardless of whether a key was pressed). The later is especially useful for testing with a buddy redeeming the reward.
Step 5: Configure the first reward. Under actions
, change “Battlefield 2” to “Battlefield 2042”. Unless you changed the default keybinding for entering and exiting a vehicle, you can leave value
as e
. Remove the three lines related to Call of Duty Modern Warfare. The configuration for the first reward should now be:
rewards:
- id: '80d76c25-6dd4-412c-91f7-329121ae54d3'
title: Get out of the vehicle!
cost: 1000
actions:
Battlefield 2042:
type: keypress
value: e
You can leave the id as is, the client will overwrite it once it created the reward on Twitch.
Step 6: Now for the CS:GO reward. Change the title
to your liking, maybe something like “Knife out!”. Again under actions
, change the value
attribute for CS:GO to '3'
. Be sure to add the quotes so the client does not misinterpreted it as a number. Remove the three lines related to Valorant. You can now also remove the third reward. At this point, you should have something like this:
logLevel: info
autoFulfill: true
refund: false
rewards:
- id: '80d76c25-6dd4-412c-91f7-329121ae54d3'
title: Get out of the vehicle!
cost: 1000
actions:
Battlefield 2042:
type: keypress
value: e
- title: Knife out!
cost: 500
actions:
Counter-Strike Global Offensive:
type: keypress
value: '3'
Step 7: Save the configuration.
Step 8: Finally, launch 0xQWERTY-client.exe
. The client will open new browser window in order to authenticate with Twitch. Log into your account and click “Authorize”. Once authentication is complete, you can close the browser window/tab. Back in the client window, you should find some log output similar to:
Connection to socket.io server established
Opening browser for Twitch authentication
All 2 configured rewards are (now) setup on Twitch
0xQWERTY API is (now) subscribed to redemptions of 6 managed rewards
Setup complete, listening for redemptions
With that, the setup is complete. You can now open either Battlefield 2042 or CS:GO and use your phone to redeem the reward. Alternatively, ask one of your moderators or regulars to help with testing. You can temporarily change refund
to true
and restart the client, so their points are automatically refunded. Just remember to set it back to false
before going live. Notably, you do not need to go live for the rewards to function.
Lock and load
That’s all! Your viewers can now make you switch to your melee weapon in CS:GO or make you get out of a vehicle in Battlefield 2042. Keep in mind that you have various ways of controlling how often viewers can redeem these rewards. You can, for example, configure a cooldown between redemptions. For details, check the official channel points guide.
To illustrate the result, here is a clip from Australian streamer, LifeBD. Note that at the time, LifeBD did not have any limits set up for the 0xQWERTY rewards.
Notice something in the clip? Unfortunately, it does not provide any context about why LifeBD keeps getting out of the helicopter. And that’s not just because Twitch deleted the chat history. Turns out Twitch does not store or show the messages about redeemed channel point rewards in clips or VODs.
Adding context
Luckily, there is an easy solution to add some context – at least until Twitch deletes your clip’s chat history. As mentioned earlier, 0xQWERTY also has a server component. It not only forwards redemption details to the client, it also acts as a chat bot. The sole purpose of the chat bot is to announce channel point redemptions in chat.
This may seem a bit redundant while you are live, since the bot announces any redemption in addition to Twitch’s built-in message. But it really helps viewers of your clips and VODs understand what they are looking at. Nevertheless, the bot is fully optional. If you want to me to add it to your stream, just ping me on Discord.
Something is not working?
The best place to get help in case of any issues is the 0xQWERTY Discord. If you have a GitHub account, you can alternatively open an issue on GitHub.