Pally.gg is a donation platform for your stream that allows you to split your revenue with your mods (or anyone you like) and lets your viewers leave an optional message with their donation.
This extension adds a trigger into Streamer.bot to hook into their Websocket API so you can read the incoming donations and messages into your actions.
Installation
API Setup
You will need to create an API key on their dashboard - API Key Dashboard
More information can be found on their Developers Documentation
Streamer.Bot Setup
Drag and drop the Import File
into Streamer.bot
PallyGG.sb (4.7 KB)
This should add 4 actions and a Websocket Client to your bot;
Action | Description |
---|---|
Pally Connect | Enables the Heartbeat Timed Action that sends a keep-alive ping every 50 seconds |
Pally Disconnected | Reconnects the Websocket Client automatically if it fails |
Pally Heartbeat | Keeps the Websocket Client open |
Pally Donation | Ingests the incoming donation message and deserializes it into usable arguments |
Websocket Client
Open up the Websocket Clients tab under Servers/Clients
Double-Click on the pally.gg entry and replace YOUR_API_KEY
with the key you generated earlier
The setup assumes that the Websocket Client is the first one in the list. If this is not the case the C# code in each of the actions will need to be modified to point to the correct index
If they are not already set, ensure Auto Connect on Startup
and Reconnect on Disconnect
are both ticked. This will ensure the trigger is always running ready to receive donation messages.
Right click the Websocket Client and click Connect, if everything has been done correctly the Status will change to Open
Building your action
The system is now technically ready to receive messages, you need only build out your Streamer.bot action to do something with the data it is pulling in.
The C# code in the the Pally Donation
action decodes the websocket message into the following variables:
Argument | Description |
---|---|
pallyCreated | Date-Time of the donation |
pallyUpdated | Uhhh not sure - seems to be the same at the Created Time |
campaignID | serial number of the pool that received the donation |
displayName | The name entered by the donator (Not sure if this is goes through the bad words filter or not) |
grossAmountInCents | The full amount in cents that was donated |
netAmountInCents | The amount in cents the stream team will receive after processing fees |
processingFeeInCents | The amount in cents deducted for processing fees |
pallyMessage | The message sent with the donation |
All of these can be used just like any other variable by surrounding them in % symbols in sub-actions placed below the C# sub-action