Pokeitbot is designed so that it can be run on your channel by itself, as well as alongside other bots. If you're interested in integrating Pokeitbot with another chat service (such as Nightbot), you can set up custom commands that refer to URLs on https://api.pokeit.co/
. The commands below can then be added on to the end of that address to create a URL like this:
Set up API access
API access to your session's data is disabled by default. If you'd like to turn it on, go to your Pokeit Account page, select Live Streaming from the side menu, and then toggle on the switch for Enable Pokeit API.
Example Endpoints
Hover over the in each row below to see a sample response from that command. Items inside curly brackets such as {player}
, {stat}
, or {num}
are "dynamic inputs" that can be replaced with actual values. For example, @ChazDazzle/hand/{num}
becomes @ChazDazzle/hand/25
to access the 25th hand of the session. Only players, hands, stats, and other dynamic items that are present in the current live session will be accessible via this API.
URL | Ex. | Description |
---|
Usage With NightBot
There are two ways to add a Pokeitbot API command to NightBot. First, you can create a custom command by clicking the "Add Command" button on your commands page and then typing in "urlfetch" along with the Pokeit API endpoint. Examples can be found inside the $(..) portion of the commands below
Alternatively, if you already have NightBot active in your room, you can just paste one of the lines of code below right into chat and NightBot will take care of the rest. This will need to be done for each command you want to add.
Basic Commands
To add the "session" endpoint to NightBot, use the command:
You can then switch out @ChazDazzle/session
with one of the other endpoints above.
Commands with Dynamic Inputs
If one of the endpoints has a dynamic input like {player}
, {stat}
, or {num}
, replace that part of the NightBot command with a $(1)
. This will allow NightBot to pass along something like a player name or stat name without you needing to input each one separately. For example:
This will allow the text "!hand 25" to return the 25th hand in your session (or any other number). Commands with multiple dynamic inputs can use $(1)
, $(2)
, etc.