StreamElements
Connect StreamElements for tips, loyalty points, store redemptions, and activity feed integration.
Overview
FaustBot integrates with StreamElements to provide access to tips, loyalty points, and store redemptions:
Tips
Receive and react to StreamElements tips.
Loyalty Points
Manage viewer loyalty points and rewards.
Store Redemptions
Handle store item redemptions.
Leaderboards
Access top donors and point leaders.
Overlays
Trigger overlay alerts and effects.
Activity Feed
Monitor real-time channel activity.
Setup
Connect StreamElements Account
Link your StreamElements account to enable tip and loyalty integration.
Get Your JWT Token
Log in to StreamElements, go to Account Settings, and copy your JWT Token from the Channels section.
Enter Token in FaustBot
In FaustBot, go to Integrations → StreamElements. Paste your JWT token and click Connect.
Verify Connection
The connection status should show Connected with your channel name. FaustBot will now receive StreamElements events.
Keep Your Token Secure
Your JWT token provides full access to your StreamElements account. Never share it publicly or include it in scripts you distribute.
Triggers
Respond to StreamElements events:
Tip Received A viewer sent a tip through StreamElementsStore Redemption A viewer redeemed a store itemMerch Purchase A viewer purchased merchandiseTip Trigger Variables
These variables are available in your actions when a tip is received:
%tipAmount% The tip amount%tipCurrency% Currency code (USD, EUR, etc.)%tipMessage% Message included with the tip%tipperName% Name of the tipperEffects
Loyalty Points
Add Points
Give loyalty points to a user.
Remove Points
Remove loyalty points from a user.
Set Points
Set a user's points to a specific value.
Get Points
Retrieve a user's current points.
Overlays
Play Alert
Trigger a StreamElements alert.
Skip Alert
Skip the current alert.
Pause Alerts
Pause the alert queue.
Resume Alerts
Resume alert playback.
Scripting API
Control StreamElements from your scripts using the CPH API:
Loyalty Points
# Get user's points
points = CPH.StreamElementsGetPoints("username")
# Add points
CPH.StreamElementsAddPoints("username", 100)
# Remove points
CPH.StreamElementsRemovePoints("username", 50)
# Set points
CPH.StreamElementsSetPoints("username", 500)Leaderboards
# Get top points holders
top_users = CPH.StreamElementsGetTopPoints(10)
for user in top_users:
CPH.LogInfo(f"{user['username']}: {user['points']}")
# Get user rank
rank = CPH.StreamElementsGetRank("username")Overlay Control
# Trigger a test alert
CPH.StreamElementsTestAlert("tip")
# Pause/resume alerts
CPH.StreamElementsPauseAlerts()
CPH.StreamElementsResumeAlerts()
# Skip current alert
CPH.StreamElementsSkipAlert()See the full API reference for all available StreamElements methods.