# Setup Twitch Notifications on Discord

## Set up your notification channel

**1.** [Invite the Bot](https://invite.sxbot.io) if you haven't already.

**2.** Create a channel for stream announcements if you haven't already.

**3.** Configure the bot to send stream notifications to that channel.\
**Example:`/twitch add xqc #stream-notifications`**

**4.** All done! Sx Bot will automatically post announcements in your Discord whenever the streamer you added goes live on Twitch.

***

## Customize the notification

**1.** Edit the announcement message that is sent when a streamer goes live with the variables below\
**Example:`/twitch edit xqc {EVERYONE} {STREAMER} is just went live playing {GAME}!`**     &#x20;

<table><thead><tr><th width="164">Variable name</th><th width="307">Description</th></tr></thead><tbody><tr><td><code>{STREAMER}</code></td><td>The streamers Twitch name</td></tr><tr><td><code>{URL}</code></td><td>The <a href="http://twitch.tv/">twitch.tv</a> URL of the streamer.</td></tr><tr><td><code>{GAME}</code><br><code>{PLAYING}</code></td><td>The Twitch stream's game</td></tr><tr><td><code>{VIEWERS}</code></td><td>The Twitch stream's live viewers</td></tr><tr><td><code>{EVERYONE}</code></td><td>Mentions @everyone in your Discord</td></tr><tr><td><code>{HERE}</code></td><td>Mentions @here in your Discord</td></tr></tbody></table>

**2.** Test the live notification message.\
**Example:`/twitch test xqc`**

***

## Title Filter & Game Filters

&#x20;**1.** Restrict when Sx Bot sends a notification based on the game being played, category, or keyword in the stream's title.\
&#x20;**Example: `/twitch edit xqc title-filter No Pixel`**

{% hint style="info" %}
This is particularly useful for GTA RP/FiveM servers, similar to hasroot, where only streamers who have the keyword in their title will have the notifications displayed.&#x20;
{% endhint %}

***

## Stream Cleanup

&#x20;**1.** Choose whether to edit or delete the stream message when a stream ends.\
&#x20;**Example: `/twitch edit xqc clean-up edit`**

{% hint style="info" %}
When you choose the edit option, the announcement message will be edited to an offline message that shows total stream time, and links to the VOD.
{% endhint %}

***

## Remove a streamer

**1.** Remove a streamer from the streamers list.\
**Example:`/twitch remove xqc`**

***

## View the current streamers list

**1.** Show the current twitch streamers list.\
**Example:`/twitch list`**

***

## Notification Cooldowns

By default, there are no cooldowns on notifications. That means each time you go live, a notification will be sent to the channel. Some users may prefer to put a delay/cooldown in between notifications in case their stream restarts and rather not send another notification. To enable this, use **`/twitch edit`** and choose the **`cooldown`** option followed by the amount of time such as: **`5m`** for **5 minutes**, or **`1h`** for **1 hour.** You can also use the format **`5 minutes`** or **`1 hour`**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sxbot.io/twitch-notifications/setup-twitch-notifications-on-discord.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
