Streams

This is the cog guide for the Streams cog. You will find detailed docs about usage and commands.

[p] is considered as your prefix.

Note

To use this cog, load it by typing this:

[p]load streams

Usage

This cog provides commands to check if a channel on a supported streaming service is live as well as to create and manage alerts for channels.

Supported streaming services are:

  • Twitch

  • Youtube

  • Picarto

Youtube and Twitch both require setting authentication details for commands for those services to work. See [p]streamset twitchtoken and [p]streamset youtubekey for more information.

Commands

streamset

Syntax

[p]streamset

Description

Manage stream alert settings.

streamset autodelete

Syntax

[p]streamset autodelete <on_off>

Description

Toggles automatic deletion of stream alerts when the stream goes offline.

Arguments

  • <on_off>: Whether to turn on or off

streamset ignorereruns

Syntax

[p]streamset ignorereruns

Description

Toggles excluding reruns from the alerts.

At this time, this functionality only applies to Twitch stream alerts.

streamset mention

Syntax

[p]streamset mention

Description

Toggle mentions for stream alerts.

streamset mention all

Syntax

[p]streamset mention all

Description

Toggle mentioning @everyone for stream alerts.

streamset mention online

Syntax

[p]streamset mention online

Description

Toggle mentioning @here for stream alerts.

streamset mention role

Syntax

[p]streamset mention role <role>

Description

Toggle mentioning a role for stream alerts.

Arguments

  • <role>: The role to toggle a mention for. Please give the exact role name or ID, or it won’t be detected.

streamset message

Syntax

[p]streamset message

Description

Manage custom messages for stream alerts.

streamset message mention

Syntax

[p]streamset message mention <message>

Description

Sets a stream alert message for when mentions are enabled.

Use {mention} in the message to insert the selected mentions.

Use {stream} in the message to insert the channel or user name.

Use {stream.display_name} in the message to insert the channel’s display name (on Twitch, this may be different from {stream}).

For example: [p]streamset message mention {mention}, {stream.display_name} is live!

Arguments

  • <message>: Your alert message

streamset message nomention

Syntax

[p]streamset message nomention <message>

Description

Sets a stream alert message for when mentions are disabled.

Use {stream} in the message to insert the channel or user name.

Use {stream.display_name} in the message to insert the channel’s display name (on Twitch, this may be different from {stream}).

For example: [p]streamset message nomention {stream.display_name} is live!

Arguments

  • <message>: Your alert message

streamset message clear

Syntax

[p]streamset message clear

Description

Resets the stream alert messages for the server.

streamset timer

Syntax

[p]streamset timer <refresh_timer>

Description

Sets the refresh time for stream alerts (how frequently they will be checked).

This cannot be set to anything less than 60 seconds.

Arguments

  • <refresh_timer>: The frequency with which streams should be checked, in seconds

streamset youtubekey

Syntax

[p]streamset youtubekey

Description

Explains how to set the YouTube token.

To get one, do the following:

1. Create a project (see https://support.google.com/googleapi/answer/6251787 for details)

2. Enable the YouTube Data API v3 (see https://support.google.com/googleapi/answer/6158841 for instructions)

3. Set up your API key (see https://support.google.com/googleapi/answer/6158862 for instructions)

  1. Copy your API key and run the command [p]set api youtube api_key <your_api_key_here>

Attention

These tokens are sensitive and should only be used in a private channel or in DM with the bot.

streamset twitchtoken

Syntax

[p]streamset twitchtoken

Description

Explains how to set the Twitch token.

To set the Twitch API tokens, follow these steps:

  1. Go to this page: https://dev.twitch.tv/dashboard/apps.

  2. Click Register Your Application.

  3. Enter a name, set the OAuth Redirect URI to http://localhost, and select an Application Category of your choosing.

  4. Click Register.

5. Copy your client ID and your client secret into: [p]set api twitch client_id <your_client_id_here> client_secret <your_client_secret_here>

Attention

These tokens are sensitive and should only be used in a private channel or in DM with the bot.

streamset usebuttons

Syntax

[p]streamset usebuttons

Description

Toggle whether to use buttons for stream alerts.

picarto

Syntax

[p]picarto <channel_name>

Description

Check if a Picarto channel is live.

Arguments

  • <channel_name>: The Picarto channel to check.

twitchstream

Syntax

[p]twitchstream <channel_name>

Description

Check if a Twitch channel is live.

Arguments

  • <channel_name>: The Twitch channel to check.

youtubestream

Syntax

[p]youtubestream <channel_id_or_name>

Description

Check if a YouTube channel is live.

Arguments

  • <channel_id_or_name>: The name or id of the YouTube channel to be checked.

streamalert

Syntax

[p]streamalert

Description

Manage automated stream alerts.

streamalert list

Syntax

[p]streamalert list

Description

Lists all active alerts in the current server.

streamalert picarto

Syntax

[p]streamalert picarto <channel_name>

Description

Toggle alerts in the current channel for the specified Picarto channel.

Arguments

  • <channel_name>: The Picarto channel to toggle the alert for.

streamalert twitch channel

Syntax

[p]streamalert twitch channel <channel_name>

Description

Toggle alerts in the current channel for the specified Twitch channel.

Arguments

  • <channel_name>: The Twitch channel to toggle the alert for.

streamalert youtube

Syntax

[p]streamalert youtube <channel_name>

Description

Toggle alerts in the current channel for the specified Picarto channel.

Arguments

  • <channel_id_or_name>: The name or id of the YouTube channel to be checked.

streamalert stop

Syntax

[p]streamalert stop [disable-all=No]

Description

Disable all stream alerts for this channel or server.

Arguments

  • [disable-all]: Defaults to no. If this is set to yes, all stream alerts in the current server will be disabled. If no or unspecified, all stream alerts in the current channel will be stopped.