Twitch Integration
Full Twitch integration including Chat, EventSub real-time events, and Helix API access.
Overview
FaustBot's Twitch integration provides complete access to your Twitch channel:
Chat (IRC/TMI)
Send and receive chat messages, whispers, and announcements.
EventSub
Real-time events for follows, subs, raids, channel points, and more.
Helix API
Full API access for moderation, stream info, and channel management.
Analytics
Track followers, subscribers, views, and top clips.
Connecting Your Account
Open Twitch Settings
Click Twitch in the sidebar to open the Twitch integration page.
Connect Broadcaster Account
Click Connect Account and log in with your Twitch streaming account. This is required for receiving events and accessing your channel.

Connect Bot Account (Optional)
If you want chat messages to come from a separate bot account, click Connect Bot Account and log in with your bot's Twitch account.
Auto-Connect
Enable Auto-Connect to automatically connect to Twitch when FaustBot starts.
Available Triggers
FaustBot can respond to all Twitch events in real-time via EventSub:
Chat Events
Chat Message Any message in chat (with user info, badges, emotes)First Message User's first message ever in your channelWhisper Private message receivedSubscription Events
Subscription New subscription (tier 1, 2, or 3)Resub Resubscription with streak infoGift Sub Gifted subscriptionGift Bomb Multiple gifted subs at onceChannel Events
Follow New followerRaid Incoming raid with viewer countBits / Cheer Bits cheered with amount and messageChannel Point Redemption Custom reward redeemedInteractive Events
Poll Started/Ended Polls with options and votesPrediction Started/Ended Predictions with outcomes and pointsHype Train Started, progressed, or endedStream Events
Stream Online Stream went liveStream Offline Stream endedTitle/Game Changed Stream info updatedEffects
Actions can use these Twitch-specific effects:
Send Message
Send a message to chat. Supports variables and emotes.
Send Announcement
Send a highlighted announcement with optional color.
Send Whisper
Send a private message to a user.
Timeout User
Timeout a user for a specified duration.
Ban User
Permanently ban a user from chat.
Unban User
Remove a ban or timeout from a user.
Delete Message
Delete a specific chat message.
Clear Chat
Clear all messages in chat.
Set Title
Update the stream title.
Set Game
Change the stream category/game.
Create Clip
Create a clip of the current stream.
Run Ad
Run a commercial break.
Variables
The following variables are available in Twitch triggers:
| Variable | Description |
|---|---|
%user% | Username (login name) |
%displayName% | Display name (may include unicode) |
%userId% | Twitch user ID |
%message% | Chat message or input text |
%isSubscriber% | Whether user is subscribed |
%isModerator% | Whether user is a moderator |
%isVip% | Whether user is a VIP |
%bits% | Number of bits cheered |
%tier% | Subscription tier (1, 2, or 3) |
%months% | Subscription months |
%viewers% | Raid viewer count |
%rewardId% | Channel point reward ID |
%rewardTitle% | Channel point reward name |
Scripting API
Access Twitch features from your scripts via the CPH API:
Chat & Messaging
# Send a chat message
CPH.SendMessage("Hello, chat!")
# Send as the bot account
CPH.SendMessage("Bot message", bot=True)
# Send an announcement
CPH.TwitchAnnounce("Big announcement!", "purple")
# Send a whisper
CPH.SendWhisper("username", "Private message")Moderation
# Timeout a user for 60 seconds
CPH.TwitchTimeoutUser("username", 60, "Reason")
# Ban a user
CPH.TwitchBanUser("username", "Reason")
# Unban a user
CPH.TwitchUnbanUser("username")
# Delete a message (requires messageId from args)
CPH.TwitchDeleteMessage(args["messageId"])Channel Management
# Set stream title
CPH.TwitchSetTitle("New Stream Title!")
# Set game/category
CPH.TwitchSetGame("Just Chatting")
# Create a clip
clip_url = CPH.TwitchCreateClip()
# Run a 30-second ad
CPH.TwitchRunAd(30)User Info
# Get user info
user = CPH.TwitchGetUserInfo("username")
print(f"User ID: {user.Id}")
print(f"Display Name: {user.DisplayName}")
print(f"Created: {user.CreatedAt}")See the full API reference for all available methods.