Amethyst93 / Discord-YouTube-Notifier

A small, easy to use Discord bot that displays live video updates of a YouTube channel on Discord.
MIT License
47 stars 28 forks source link

Discord YouTube Notifier

A selfhosted YouTube feed bot for Discord. Basically, this bot keeps you and your friends up-to-date with everything that's happening on YouTube. Or, if you are a YouTuber or YouTube livestreamer yourself, and like to forget to promote yourself like I do, this bot takes care of that too.

Features

Requirements

Preparation

Configuration

Configuration is done by editing the config.yaml file. I would suggest using an editor like Notepad++ to edit the file.

Will look like something like this:

        Google API key: 4P9nlidzQdMCxCzDymrUDpNwapMQ5jqC # YouTube v3 API Key

Becomes something like this:

        Discord bot token: 7PGNyakySQu8ZH0T3Y7EDldSnHKlOGbL.SFTM7Zq38J-aDR2pflmUS # Discord bot token

You can expand those further by copying it and incrementing the number correspondingly. In this example 4:

        0:
            channelID: # Discord channel ID
        1:
            channelID: # Discord channel ID
        2:
            channelID: # Discord channel ID
        3:
            channelID: # Discord channel ID

Then you need to provide your discord channel ID(s) you have obtained in Step #5 in Preparation. Again, just copy and paste it:

        0:
            channelID: 3C2DCFC6DCA9761B # Discord channel ID
        1:
            channelID: 69387236D19A2C12 # Discord channel ID

IMPORTANT: if you only use 1 channel, you need to delete all other entries:

        0:
            channelID: 3C2DCFC6DCA9761B # Discord channel ID

Again, you can expand them by copying and incrementing accordingly. In this example 4:

        0:
            name: # Name that will be displayed in discord, mentions can be used with <@DiscordUserID>
            channelID: # YouTube Channel ID
        1:
            name: # Name that will be displayed in discord, mentions can be used with <@DiscordUserID>
            channelID: # YouTube Channel ID
        2:
            name: # Name that will be displayed in discord, mentions can be used with <@DiscordUserID>
            channelID: # YouTube Channel ID
        3:
            name: # Name that will be displayed in discord, mentions can be used with <@DiscordUserID>
            channelID: # YouTube Channel ID

Then you need to provide your channel ID(s) you have obtained in Step #7 in Preparation. Again, just copy and paste it:

        0:
            name: # Name that will be displayed in discord, mentions can be used with <@DiscordUserID>
            channelID: UCXuqSBlHAE6Xw-yeJA0Tunw # YouTube Channel ID
        1:
            name: # Name that will be displayed in discord, mentions can be used with <@DiscordUserID>
            channelID: UC-lHJZR3Gqxm24_Vd_AJ5Yw # YouTube Channel ID

And then provide a name for them. Note, this name is displayed on discord:

        0:
            name: LinusTechTips # Name that will be displayed in discord, mentions can be used with <@DiscordUserID>
            channelID: UCXuqSBlHAE6Xw-yeJA0Tunw # YouTube Channel ID
        1:
            name: PewDiePie # Name that will be displayed in discord, mentions can be used with <@DiscordUserID>
            channelID: UC-lHJZR3Gqxm24_Vd_AJ5Yw # YouTube Channel ID

Useful if you are a YouTuber yourself and want to automaticaly promote yourself: You can @mention yourself instead of giving a static name by typing <@DiscordUserID> (Replace DiscordUserID with your actual discord user ID you obtained in Step #6 of Preparation):

        0:
            name: <@32C6E424B5212> # Name that will be displayed in discord, mentions can be used with <@DiscordUserID>
            channelID: UCXuqSBlHAE6Xw-yeJA0Tunw # YouTube Channel ID
        1:
            name: <@7E169455DF2EC> # Name that will be displayed in discord, mentions can be used with <@DiscordUserID>
            channelID: UC-lHJZR3Gqxm24_Vd_AJ5Yw # YouTube Channel ID

AGAIN, IMPORTANT: if you only use 1 channel, you need to delete all other entries:

        0:
            name: LinusTechTips # Name that will be displayed in discord, mentions can be used with <@DiscordUserID>
            channelID: UCXuqSBlHAE6Xw-yeJA0Tunw # YouTube Channel ID

Installation

Make sure you have Python 3.5 installed. Then run the file update_deps.bat by double clicking. This should automaticaly install all the python requirements you will need for this bot to function. Aaaand.. that's all, you are ready to run the bot now.

Running

Run the bot by opening the runbot.bat file.