Platform

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

1

Open Twitch Settings

Click Twitch in the sidebar to open the Twitch integration page.

2

Connect Broadcaster Account

Click Connect Account and log in with your Twitch streaming account. This is required for receiving events and accessing your channel.

Twitch authentication settings
3

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 channel
Whisper Private message received

Subscription Events

Subscription New subscription (tier 1, 2, or 3)
Resub Resubscription with streak info
Gift Sub Gifted subscription
Gift Bomb Multiple gifted subs at once

Channel Events

Follow New follower
Raid Incoming raid with viewer count
Bits / Cheer Bits cheered with amount and message
Channel Point Redemption Custom reward redeemed

Interactive Events

Poll Started/Ended Polls with options and votes
Prediction Started/Ended Predictions with outcomes and points
Hype Train Started, progressed, or ended

Stream Events

Stream Online Stream went live
Stream Offline Stream ended
Title/Game Changed Stream info updated

Effects

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:

VariableDescription
%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

Chat and 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

Moderation commands
# 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

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 information
# 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.