YouTube

Ever wanted to use YouTube in Discord with your own cool bot? Now you can!

Note: This module is only available to users with a Premium Subscription.

BotGhost provides a YouTube module for its users. This module will allow bot users to search for YouTube videos and channels, and see notifications of new uploads. You can use and configure the module by heading to your dashboard, scrolling to the "Social Integrations" category, and clicking on "YouTube".

Credentials Setup

In this area, you can set up the module with your API key.

The YouTube module requires you to create an application on the Google Cloud Console, to communicate with the YouTube API. Follow the steps below to retrieve your API key, and paste it into the settings of the module:

  1. Open the Google Cloud Console project creation page. If prompted, sign into or create a Google account, or click the name of the account you wish to use.

  2. Enter a name for your project, then click on 'Create'.

  1. Click on the search tab at the top of your screen and search for the YouTube Data API V3. Then click on the API listed under 'Marketplace'.

  1. Click on the blue 'Enable' button.

  1. In the top-right corner, click 'Create Credentials'.

  1. Select 'Public Data' and then click on the 'Next' button.

  1. Click the copy button on the right of the API key.

Do not share this API key with anyone. It is linked to your Google Account, and you are responsible for its use. If you or others misuse this key, it could lead to account restrictions. You can learn more about this at https://console.cloud.google.com/terms.

  1. Head back to the module on your bot's dashboard, and paste your API key. Press 'Save Changes'.

Upload Notifications

In this area, you can set up (a) new upload tracker(s) to receive notifications for newly uploaded videos.

Announcement Channel: Here you may choose which channel new uploads will be announced in.

Tracking Type: Here you may choose whether this tracker detects uploads from a specific channel, or for a new result from a specific search query.

YouTube Channel Name: Here you may choose the name or ID of the YouTube channel you are tracking uploads for. (Only shows if Tracking Type is Channel Tracking)

YouTube Search Query: Here you may choose the search query that you are tracking new results for. (Only shows if Tracking Type is Search Query Tracking)

Notification Roles: Here you may choose the roles that will be pinged in the announcement channel upon a new upload.

YouTube Upload Notification: Here you may choose the message or embed that will be sent alongside the ping to notify about a new upload. In your message, you can include {video_name} as the name of the uploaded video, {video_thumbnail} as the image URL for the cover image of the video, {video_description} as the description of the uploaded video, {video_channel} as the name of the channel that uploaded the video, and {video_url} as the link to watch the video.

Automatically Crosspost Message: Here you may toggle whether the message you created above will be posted to channels that "follow" your announcements channel automatically.

Note: To save the upload tracker's settings, you need to click "Add" in the bottom-right corner of the settings. This will create a custom event for those settings and reset the fields so you can set up another upload tracker.

Tracked Uploads

In this area, you can view, edit, and delete the settings for the upload tracker(s) you added above.

When adding a new upload tracker, it and its settings will appear in this section. All upload trackers will be ordered by the number in which they were created.

To view, edit, and delete the settings you selected above for that tracker, simply click the dropdown arrow next to the upload tracker you wish to do so for.

Note: To save the edits you made on the upload tracker's settings, you need to click "Edit" in the bottom-right corner of the settings.

Search Filters

In this area, you can customize the filters used in search results of the /youtube-search command and search query trackers.

YouTube Safesearch Type: Here you may choose how strictly you'd like to filter your searches. No Filter will allow all content to return from a search, Moderate will disallow most sensitive content, and Strict will disallow any slightly inappropriate results.

Definition Requirement: Here you may choose whether results will show Standard Definition videos (standard quality), High Definition videos (high quality), or both (any quality).

Duration Requirement: Here you may choose whether results will be shown by the length of the video.

Commands

Here you can find the commands for the YouTube system and modify them to your liking.

/youtube-channel: This command is what your users can run to search for a YouTube channel.

/youtube-search: This command is what your users can run to search for a YouTube search query.

Events

Here you can find the event for the YouTube system and modify it to your liking.

YouTube Handler: This event handles your upload trackers according to the settings for them you specified.

Warning: It's advised that you do not edit the event & commands unless you have a good understanding of BotGhost and the Custom Event Builder/Command Builder. You can always reset the module to default if you happen to make a mistake while editing the event or commands.

Last updated