YouTube Connector
The YouTube module & connector offers:
- A notification service which can monitor YouTube channels/users uploading new videos (or updating their titles and descriptions), sending these notifications to one (or more) of the webhooks configured in your Discord server.
Note
A separate set of lookup commands (searching for a channel, a video, or videos matching a search string, or posting a search result's link) has been retired with no replacement.
Throughout the documentation, the YouTube channel identifier refers to:
- The ID of the channel, which is usually the
XXXXXXpart of the YouTube URLhttps://www.youtube.com/channel/XXXXXXXXXXXXXXXXXXXXXXXX. - The name (or handle) of the channel, which is usually the
YYYYYYpart of the YouTube URLhttps://www.youtube.com/YYYYYYYYYY(sometimes prepended with a@). - The display name of the channel, which is usually the name you can see above the username of the YouTube user on the home page of a channel.
YouTube 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 YouTube channel name as author, and YouTube channel thumbnail as Discord profile picture. These settings (and other details) can be customized for each stream.
YouTube video URLs will be posted to Discord, while the YouTube video preview will leverage the native parsing of YouTube content offered by Discord.
Managing YouTube notifications
Adding, editing, removing, and listing YouTube notification services is done entirely from your server's YouTube page on this dashboard - there is no Discord command for it any more.
When you add a notification service, you pick the YouTube channel 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
NSFW handling
YouTube videos may be flagged as "age-restricted content". When this setting is applied on the uploaded video, the video will be flagged as "NSFW" within the notifications stream.
Depending on the selected parameter, these are the NSFW behaviors:
- censor will post a NSFW URL surrounded by
< >angle brackets, disabling the default Discord URL auto-embed preview. - skip will completely ignore NSFW-flagged items, "cleaning" the stream from NSFW items.
- only will only post NSFW-flagged items and skip the rest. The items will not be censored. You can use this mode to create a complementary NSFW stream of the previous "clean" stream.
Default: false (both SFW and NSFW -uncensored- items will be posted), or censor if the NSFW option is enabled without picking a specific mode.
Keyword filtering
Adds a whitelist filter to the stream. In this example, if the YouTube video title contains first word and/or (see below) second word, the notification will be sent to the webhook, otherwise it will be ignored. Enter a comma-separated list on the YouTube page's Filter Words field, case-insensitive - a multi-word phrase is just its own comma-separated entry, no quoting needed.
The filter works on partial words (e.g. "announce" will work on both "announcement" and "announced").
Default: No filter
Filter match mode
Sets the filter behavior when more than 1 word is added to the whitelist filter.
ANDwill only allow YouTube videos that contain all of the filtered words in their title.ORwill allow YouTube videos that cointain at least one of the filtered words in their title.
Default: OR
Include vs. exclude filtering
Sets the filter behavior one or more words are added to the whitelist filter.
- Include will only allow YouTube videos that contain the filtered word(s) in their title.
- Exclude will only allow YouTube videos that do not contain the filtered word(s) in their title.
These options work together with the filter match mode setting, allowing the YouTube connector to filter based on INCLUDING the filter items (e.g., at least one filter item (OR) or all filter items (AND) are included in the video title) or EXCLUDING filter items (e.g., post if all filter items are absent from the video title (AND) or at least one filter item is absent from the video title (OR)).
Default: Include
Note
Selecting both would give Include the strict priority and ignore Exclude - the form only lets you pick one.
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:
- %title%: This will be replaced with the YouTube video title.
- %channel%: This will be replaced with the YouTube channel name.
- %duration%: This will be replaced with the YouTube video duration.
- %timestamp% or %timestamp_utc%: This will be replaced with the video upload timestamp in UTC time, with format
YYYY-MM-DD HH:mm:ss (UTC). - %timestamp_iso%: This will be replaced with the video upload timestamp in UTC time, as ISO8601 string.
- %timestamp_pst%: This will be replaced with the video upload timestamp in PST time, with format
YYYY-MM-DD HH:mm:ss (PST). - %url%: This will be replaced with the YouTube video 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 YouTube video 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 YouTube module also supports a few extra, dynamic placeholders. These dynamic placeholders will be replaced with the corresponding value if the runtime value is present/applicable, or deleted if they are not applicable:
- %description%: This will be replaced with the description of the video, if present and not empty (the description length is truncated at 1024 characters).
- %short_description%: This will be replaced with a shorter version of the description of the video, if present and not empty (the description length is truncated at 256 characters).
- %tags%: This will be replaced with a space-delimited list of tags applied to the video, if at least one tag is applied. The tags will be surrounded by
``characters. - %thumbnail%: This will be replaced with the direct URL of the video thumbnail, unless the thumbnail is absent (this is not supposed to happen, but might happen for unknown reasons).
Default: %channel% just %video_status% a video! followed by the video Title, Description, Duration and Tags
Custom webhook name
Adds a custom username to the webhook when notifications are posted. Custom usernames can have a maximum of 32 characters.
Default: Notifications will be posted by a webhook named after the YouTube channel name
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 YouTube 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 YouTube page stops it and removes its link to the server webhook.
Listing notification services
The YouTube page lists every notification service currently linked to a webhook in the server.