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.
Configuration is done by editing the config.yaml file. I would suggest using an editor like Notepad++ to edit the file.
Google API key: # YouTube v3 API Key
Will look like something like this:
Google API key: 4P9nlidzQdMCxCzDymrUDpNwapMQ5jqC # YouTube v3 API Key
Discord bot token: # Discord bot token
Becomes something like this:
Discord bot token: 7PGNyakySQu8ZH0T3Y7EDldSnHKlOGbL.SFTM7Zq38J-aDR2pflmUS # Discord bot token
You can specify the time period in minutes the bot will check the YouTube channels for new content. I do not recommend going lower than 5 minutes though, because your daily use of queries is limited and can be used up very quickly that way. Just change the "5" to whatever you desire.
Ping Every x Minutes: 5 # at least 5 minutes should be ok, anything lower not recommended, because the API traffic will be used up very quickly otherwise.
I have included 2 Discord channelID placeholders as an example in the config:
0:
channelID: # Discord channel ID
1:
channelID: # Discord channel ID
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
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
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
New video: ":film_frames: **{0} HAS UPLOADED A NEW VIDEO!** :film_frames:" # Message that appears when a YouTuber has uploaded a new video, user placeholder: {0}
Livestream: ":red_circle: **{0} IS LIVESTREAMING NOW!** :red_circle:" # Message that appears when a YouTuber is livestreaming, user placeholder: {0}
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.
Run the bot by opening the runbot.bat file.