Table of contents
- Streams
- Usage
- Commands
- streamset
- streamset offlinemessage
- streamset autodelete
- streamset ignorereruns
- streamset mention
- streamset mention all
- streamset mention online
- streamset mention role
- streamset message
- streamset message offline
- streamset message mention
- streamset message nomention
- streamset message clear
- streamset timer
- streamset youtubekey
- streamset twitchtoken
- streamset usebuttons
- picarto
- twitchstream
- youtubestream
- streamalert
- streamalert list
- streamalert picarto
- streamalert twitch channel
- streamalert youtube
- streamalert stop
This page is generated from
docs/cog_guides/streams.rst- please edit the source file instead of this page.
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 offlinemessage
[p]streamset offlinemessage <on_off>
Description Toggle sending a message when a stream goes offline.
<on_off>: Whether to turn on or off.
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 offline
Syntax
[p]streamset message offline <message>
Description
Set a custom message to send when a stream goes offline.
Arguments:
{stream}: This will show the channel name or username of the stream that went offline.{stream.display_name}: This will show the display name of the stream that went offline (on Twitch, this may be different from{stream}).{duration}: This will show how long the stream ran for.
Example:
- [p]streamset message offline {stream.display_name} has gone offline after streaming for {duration}
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:
-
Create a project (see https://support.google.com/googleapi/answer/6251787 for details)
-
Enable the YouTube Data API v3 (see https://support.google.com/googleapi/answer/6158841 for instructions)
-
Set up your API key (see https://support.google.com/googleapi/answer/6158862 for instructions)
-
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:
-
Go to this page: https://dev.twitch.tv/console/apps.
-
Click Register Your Application.
-
Enter a name, set the OAuth Redirect URI to http://localhost, and select an Application Category of your choosing.
-
Click Register.
-
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 tono. If this is set toyes, all stream alerts in the current server will be disabled. Ifnoor unspecified, all stream alerts in the current channel will be stopped.
Installation Guides
- Installing Red
- Creating a bot account
- Updating Red
- Backing Up and Restoring Red
- About Virtual Environments
- Setting up auto-restart using batch on Windows
- Setting up auto-restart on Mac
- Setting up auto-restart using systemd on Linux
Cog Reference
User guides
- Getting started
- Running Red on Fluxer
- About Privileged Intents
- About public (big) bots
- Admin
- Alias
- Audio
- Cleanup
- Cog Manager UI
- Core
- CustomCommands
- Dev
- Downloader
- Economy
- Filter
- General
- Image
- Permissions
- Mod
- ModLog
- Mutes
- Reports
- Streams
- Trivia
- Warnings
- Red and End User Data
Cog Creation Guides
- Creating cogs for Red
- Slash Commands and Interactions
- Publishing cogs for Red
- Becoming an Approved Cog Creator
- Versioning
- End-user Guarantees
- Developer Guarantees
- Breaking Change Notices
Cog Development Framework Reference
- Shared API Keys
- Bank
- Bot
- Command Check Decorators
- App Command Check Decorators
- Commands Package
- App Commands Package
- Config
- Data Manager
- Custom Events
- Internationalization Framework
- Mod log
- RPC
- Tree
- Utility Functions
Others
Legacy (Red V2)