Getting Started
Connect WastedLightBot to your Twitch channel, then choose which built-in features you want active from your dashboard.
1. Log inAuthorize the dashboard with your Twitch account.2. Connect botAuthorize the bot to join your channel and give it permission to read and send messages.3. Toggle featuresEverything is configurable from the dashboard, so turn off anything you don't want in your chat.Built-in Commands
These come free with every channel. Toggle any of them off from your dashboard if they're not for your chat.
Custom Command Variables
When you build a custom command from the dashboard, you can use these variables anywhere in the response text. The bot fills them in automatically when the command runs.
| Variable | What it does |
|---|---|
$user | The display name of whoever ran the command. |
$channel | Your channel's username. |
$target | The user tagged/mentioned in the command, if any. |
$args | Any text typed after the command name. |
$random(a, b, c) | Picks one option at random from a comma-separated list. |
$randomnumber(min, max) | Generates a random whole number between min and max, inclusive. |
$customapi(URL) | Fetches a URL and drops its text response into the message. Other variables inside the URL (like $user) get substituted before the request is made. 5 second timeout, response capped at 400 characters. Free on every plan. |
Building a Custom Command
From your dashboard, go to the Commands tab, scroll to Custom Commands, then fill in:
| Field | What to put |
|---|---|
| Trigger | The word chat types, e.g. !hype (must start with !) |
| Response | What the bot replies with, using any variables from above |
Custom commands are unlimited on every plan. If a custom command's trigger matches a built-in command, the built-in one always wins.
Build with WastedLightBot
The developer documentation is for streamers and developers who want to connect WastedLightBot to their own tools, extend the Stream Deck integration, or call the API directly.
Stream Deck
Trigger actions straight from a physical button -- pick a giveaway winner, skip a song, pull the next person from your queue -- without touching the dashboard mid-stream.
Generate an API key from your dashboard's Bot tab, download the plugin, and drag any of the built-in actions onto a button. The key is shared across every button, so you only enter it once.
Want more buttons than the default 3? Every action below works over a simple HTTP request, with your key sent as Authorization: Bearer wlb_yourkeyhere -- if you're comfortable editing a small JavaScript file, you can wire up your own button for anything here.
API endpoints
| Endpoint | Body | What it does |
|---|---|---|
POST /giveaway/start | {"keyword":"PIZZA"} | Starts a giveaway with the given keyword. |
POST /giveaway/pick-winner | - | Picks a random winner and ends the giveaway. |
POST /giveaway/reroll | - | Picks a new winner, excluding the last one. |
POST /giveaway/cancel | - | Ends the giveaway with no winner picked. |
POST /queue/open | - | Opens the viewer queue for new joins. |
POST /queue/close | - | Closes the viewer queue. |
POST /queue/next | - | Pulls the next person in line. |
POST /queue/clear | - | Empties the viewer queue. |
GET /queue/status | - | Returns { open, length }. |
POST /song/skip | - | Skips the current song request. |
GET /session-stats | - | This stream's live follower/sub/bits/message/viewer counts. |
method: 'POST',
headers: { 'Authorization': 'Bearer wlb_yourkeyhere' },
});
Building your own plugin from scratch
This is the actual, complete source for the official plugin -- copy it as a starting point, add your own buttons to it, and package it yourself. Requires Node.js installed.
1. Set up the project folder. Elgato plugins need a specific folder structure -- the outer folder holds your source, and a .sdPlugin folder inside it is what actually gets installed.
2. Create the manifest at com.yourname.streamdeck.sdPlugin/manifest.json -- this describes every button your plugin provides. Add a new entry to the Actions array for each button you want:
3. Create the plugin logic at src/plugin.js (this gets bundled into bin/plugin.js later, not edited directly there). Add a new entry to ACTION_ENDPOINTS for each new button -- the key is the action's UUID from your manifest, the value is whichever endpoint from the table above it should call:
4. Create the settings page at com.yourname.streamdeck.sdPlugin/ui/settings.html -- this is what shows up when someone configures a button, letting them paste their API key:
5. Bundle and package it. The plugin needs its dependency bundled into a single file before packaging -- Stream Deck has no way to run npm install on someone else's machine:
That last command produces a .streamDeckPlugin file -- double-click it to install your custom version into Stream Deck.