Skip to main content

Twitch Connector

The Twitch module & connector offers:

  • A notification service which can monitor Twitch streamers going live and offline, sending these notifications to one (or more) of the webhooks configured in your Discord server.

Note

A separate set of lookup commands (checking a user's info, checking their current stream, posting their channel link, or posting a random streamer for a game) has been retired with no replacement.

Twitch Notifications

See also

In order to better understand this module (and the rest of the connector modules), it's very important that you are familiar with Discord webhooks. For more details about this Discord feature, please take a look at this official guide.

By default, each notification will be posted to the webhook by using the Twitch account username as author, and Twitch avatar as Discord profile picture. These settings (and other details) can be customized for each stream.

Twitch profile URLs will be posted to Discord, while the Twitch stream preview will leverage the native parsing of Twitch content offered by Discord.

Note

Due to inconsistencies and limitations within the Twitch API, this module may have some extra delay between the actual event and the Discord notification, and/or miss a few notifications every once in a while, and/or send duplicate notifications. Additional checks are in place to minimize the amount occurrencies of duplicate notifications.

Managing Twitch notifications

Adding, editing, removing, and listing Twitch notification services is done entirely from your server's Twitch page on this dashboard - there is no Discord command for it any more.

When you add a notification service, you pick the Twitch account and the channel to post to; the dashboard creates the underlying Discord webhook for you automatically (this requires GiselleBot to have "Manage Webhooks" permissions in that channel). The same customization options described below are available as fields on the service's form.

Customization options

Game filtering

Adds a whitelist, inclusive filter for game names to the service. Notifications for the selected user will only be sent if the streamed game is equal to one of the filtered games. Actions related to other games will be skipped.

Enter a comma-separated list on the Twitch page's Game Filter field - a multi-word game name like league of legends is just its own comma-separated entry, no quoting needed. All filters are case-insensitive, but the game name has to be exact for the filter to work correctly.

Warning

This parameter will only work for games that are set at the beginning of a stream. Changing the game throughout a stream will not trigger the additional "Live" notification.

Default: No filter

Event type filtering

Adds a whitelist, inclusive filter for specific events to the service. Notifications will only be sent if the actual notification event is equal to one of the filtered events.

The only supported events for this feed are:

  • live, corresponding to Twitch users going live on a game;
  • offline, corresponding to Twitch users ending their stream.

Default: No filter

Custom header message

Sets a new message template for when notifications are posted. Custom headers can have a maximum of 1024 characters.

Custom headers can be formatted as embeds by following a very specific syntax. Do know that both GiselleBot and Discord are very sensitive to this specific syntax, which is easily "broken" by special characters: for this reason, using embeds as header is not suggested, nor directly supported. Use them at your own risk! If you are brave enough, I suggest the usage of this embed generator (click on the "Enable webhook mode" button at the bottom of the page).

Custom headers support a few dynamic tags that are replaced with their respective "real" value during run-time. These are:

  • %display_name%: This will be replaced with the display name of an account, including proper formatting of letter cases (e.g. Cycloptux)
  • %username%: This will be replaced with the "URL" username of a Twitch user (typically, lowercase). E.g. cycloptux
  • %game%: This will be replaced with the name of the streamed game (e.g. Fortnite)
  • %status%: This will be replaced with the description that is usually added below a game title during a stream.
  • %stream_status%: This will be replaced with one of the two values: Live upon a "going Live" notification, Offline upon a stream end.
  • %timestamp% or %timestamp_utc%: This will be replaced with the UTC time of the start of the event, with format YYYY-MM-DD HH:mm:ss (UTC).
  • %timestamp_iso%: This will be replaced with the UTC time of the start of the event, as ISO8601 string.
  • %timestamp_pst%: This will be replaced with the current PST time of the start of the event, with format YYYY-MM-DD HH:mm:ss (PST).
  • %url%: This will be replaced with the Twitch profile URL. See below for more info.

Timestamp tags also support custom time zones. You can replace the utc part with either:

  • A different valid IANA time zone identifier (e.g. America/New_York, Europe/London).

  • An UTC offset, in the form of [UTC/GMT](+/-)(hours)[:][minutes]. Here are some valid examples:

    • %timestamp_Europe/London%
    • %timestamp_America/Los_Angeles%
    • %timestamp_Japan%
    • %timestamp_PST8PDT%
    • %timestamp_+0800%
    • %timestamp_-10:30%
    • %timestamp_UTC+2%

By default, without an explicit use of %url%, all headers will be followed by the actual Twitch profile URL on a new line; rendering of that URL will be done by Discord.

If the %url% parameter is used, the default URL will not be appended to the custom header.

The default header has two different modes for online and offline. Setting a custom header will use the header on both messages: make use of the %stream_status% tag to differentiate between the two messages.

Default: :red_circle: Now Live on Twitch: %display_name% | :video_game: Playing %game%. and Stream Offline: %display_name% | :video_game: Playing %game%.

Custom webhook name

Adds a custom username to the webhook when notifications are sent. Custom usernames can have a maximum of 32 characters.

Default: New notifications will be sent by a webhook with the display name of the Twitch account

Keep the webhook's default username

Removes any custom name from the webhook. The real webhook name (the one that you assigned when creating the webhook in Discord) will be used.

Default: false (Custom or automated names will be applied)

Keep the webhook's default avatar

Removes any custom avatar from the webhook. The real webhook avatar (the one that you assigned when creating the webhook in Discord) will be used.

Default: false (Automated avatars will be applied)

Permissions needed on the dashboard: Manage Webhooks (server-side)

Editing a notification service

Editing a service on the Twitch page replaces all of its customization options with whatever you set in the edit form - it isn't a partial update, so review its current settings before changing them.

Removing a notification service

Removing a service on the Twitch page stops it and removes its link to the server webhook.

Listing notification services

The Twitch page lists every notification service currently linked to a webhook in the server.