Discord
Send notifications to Discord via webhooks or a full-featured bot. Perfect for go-live alerts, stream updates, and community engagement.
Overview
FaustBot offers two ways to integrate with Discord:
Webhooks
Simple, no-code way to send messages to Discord channels. Great for notifications.
Bot API
Full bot with channels, roles, reactions, slash commands, and real-time events.
Which Should I Use?
- Webhooks - For simple notifications (go-live, stream end, clips)
- Bot - For interactive features (commands, roles, moderation)
Webhooks
Webhooks are the easiest way to send messages to Discord. No bot setup required.
Creating a Webhook
Open Channel Settings
In Discord, right-click the channel → Edit Channel → Integrations → Webhooks.
Create Webhook
Click New Webhook. Give it a name and avatar, then copy the URL.
Add to FaustBot
In FaustBot's Discord settings, click Add Webhook and paste the URL. Give it a descriptive name like "Stream Announcements".
Message Templates
Create reusable message templates with variable substitution:
Go-Live Template Example
Available variables include:
%channelName% %streamTitle% %gameName% %streamUrl% %viewers% %thumbnailUrl% %avatarUrl%Go-Live Notifications
Automatically notify your Discord when you start streaming:
Delay
Wait 2-5 minutes before posting to filter out test streams. If the stream ends during the delay, the notification is cancelled.
Cooldown
Prevent spam if you go live multiple times. Set a minimum time between notifications.
Confirmation
Optionally show a confirmation dialog before posting. Useful if you want manual control.
Multiple Webhooks
Send to multiple Discord servers at once. Select which webhooks receive go-live alerts.
Bot Integration
For advanced features, connect a Discord bot. This enables:
- Slash commands and buttons
- Role management (add/remove roles)
- Channel management (create/modify channels)
- Message reactions
- Real-time event handling
- Member join/leave events
Setting Up a Bot
Create Application
Go to the Discord Developer Portal and create a new application.
Create Bot
Go to the Bot section and click Add Bot. Copy the bot token.
Invite to Server
Go to OAuth2 → URL Generator. Select "bot" and "applications.commands" scopes, then select the permissions you need. Use the generated URL to invite the bot.
Connect in FaustBot
In FaustBot's Discord settings, enter your bot token and click Connect.
Keep Your Token Secret
Never share your bot token. If it's compromised, regenerate it immediately in the Discord Developer Portal.
Effects
Webhook Effects
Send Webhook Message
Send a message via webhook.
Send Template
Send a pre-defined template.
Bot Effects
Send Message
Send to a specific channel.
Edit Message
Modify an existing message.
Delete Message
Remove a message.
Add Reaction
Add emoji reaction.
Add Role
Give a user a role.
Remove Role
Remove a role from a user.
Scripting API
Access Discord features from your scripts:
Webhook Messages
# Send a simple webhook message
CPH.DiscordPostWebhook("webhook_id", "Stream starting soon!")
# Send with embed
embed = {
"title": "Now Live!",
"description": "Click to watch",
"color": 0x9146FF,
"url": "https://twitch.tv/yourchannel"
}
CPH.DiscordPostWebhook("webhook_id", "", embed)Bot Messages
# Send a message to a channel
CPH.DiscordSendMessage("channel_id", "Hello from FaustBot!")
# Send with embed
CPH.DiscordSendMessage("channel_id", "", embeds=[embed])Role Management
# Add a role to a user
CPH.DiscordAddRole("guild_id", "user_id", "role_id")
# Remove a role
CPH.DiscordRemoveRole("guild_id", "user_id", "role_id")Reactions
# Add a reaction to a message
CPH.DiscordAddReaction("channel_id", "message_id", "thumbsup")See the full API reference for all Discord methods.