Twitch Announcements

Setup and configure twitch stream announcements

Follow these steps to register a Twitch application and update the Drako Bot configuration.

Step 1: Register a Twitch Application

  1. Navigate to the Twitch Developer Console and log in with your Twitch account.

  2. Register a new application:

    • Name: Enter a name for your application.

    • OAuth Redirect URL: It can be any valid URL.

    • Category: Select "Application Integration".

    • Client Type: Select "Confidential".

  3. Copy down the Client ID and generate a Client Secret. Save both for later use.

Important: Keep your Client Secret secure and do not share it publicly.

Step 2: Update Drako Bot Configuration

  1. Open your config.yml file

  2. Update the Twitch section with your Client ID, Client Secret, Announcement Channel ID, and Role IDs.

Example Configuration

Twitch:
  Enabled: true
  ClientID: "CLIENT_ID" # Your Twitch Client ID
  ClientSecret: "CLIENT_SECRET" # Your Twitch Client Secret
  AnnouncementChannelID: "CHANNEL_ID" # Discord channel ID for stream announcements
  roleRequired: "ROLE_ID" # Role required to use Twitch-related commands
  AssignRole: "ROLE_ID" # Role that will be assigned when the user goes live

Configuration Details

OptionDescriptionExample

Enabled

Set this to true to enable Twitch integration.

false

ClientID

The Client ID obtained from the Twitch Developer Console.

"CLIENT_ID"

ClientSecret

The Client Secret generated in the Twitch Developer Console.

"CLIENT_SECRET"

AnnouncementChannelID

The ID of the Discord channel where stream announcements will be posted.

"CHANNEL_ID"

roleRequired

Role required to use Twitch-related commands.

"ROLE_ID"

AssignRole

Role that will be assigned when the user goes live.

"ROLE_ID"

Hint: Ensure that the AnnouncementChannelID and RoleIDs are correctly set up in your Discord server to match the configuration.

Streamers Configuration

Define the message and embed settings for stream announcements.

Example Streamer Configuration

Streamers:
  Default:
    Message:
      Content: "{streamer} is now live with something awesome!"
    Embed:
      AuthorName: "{streamer}"
      AuthorIcon: "{streamerIcon}"
      AuthorURL: "{streamURL}"
      Title: "{streamer} is live!"
      Description: 
        - "**{markdownTitle}**"
        - " " 
        - "**Viewers**" 
        - "{viewerCount}"
      Image: "{streamThumbnail}"
      Footer: "Twitch Alerts | Drako Bot"
      FooterIcon: "https://images.rawpixel.com/image_png_800/cHJpdmF0ZS9sci9pbWFnZXMvd2Vic2l0ZS8yMDIyLTA1L3JtNTMzLW5lb24tMDE3LnBuZw.png"
      Color: "#FF4500"
      Thumbnail: "{streamGameIcon}"
      Components:
        - Type: "Button"
          Style: "Link"
          Link: "{streamURL}"
          Label: "Join the fun!"
          Emoji: "🖥️"
OptionDescriptionExample

Content

The message content announcing the stream.

"{streamer} is now live with something awesome!"

AuthorName

Name of the streamer.

"{streamer}"

AuthorIcon

URL to the streamer's icon.

"{streamerIcon}"

AuthorURL

URL to the streamer's Twitch page.

"{streamURL}"

Title

Title of the embed.

"{streamer} is live!"

Description

Description of the stream, supports markdown.

See example above

Image

URL to the stream thumbnail.

"{streamThumbnail}"

Footer

Footer text for the embed.

`"Twitch Alerts

FooterIcon

URL to the footer icon.

"https://myimage.png"

Color

Color of the embed.

"#FF4500"

Thumbnail

URL to the game icon thumbnail.

"{streamGameIcon}"

Components

Interactive components like buttons.

See example above

Last updated