Skip to content

Discord bot fully written in linux shell that delivers YOUTUBE videos via CURL->WEBHOOK to any number of specified discord servers.

Notifications You must be signed in to change notification settings

STR4NG3RdotSH/Discord_Youtube_Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Summary

This bot is fully written in linux shell (.sh scripting) and will run natively on most systems. Developed and running on a RaspberryPI and has been feeding discord servers for over a year. The only dependency that is in place is using sqlite by preference, although you can tweak the code to simply store your servers/webhooks in a text file if you'd rather not install sqlite.

Can I see the bot in action?

Yea, the bot is currently feeding many servers, but you can see it in action on my discord server (DISCORD.D4NG3R.COM) in SOCIAL > #youtube

Usage

(Under the assumption you installed sqlite and have created a database structured like DiscordBotDB.png)

  • Ensure you add your discord webhook URL to your sqlite db (See DiscordBotDB.png)
  • Pull the SH script to your run location (I just run it from user folder /home/<user>/projects/discord_bots/youtube but you can run it from anywhere.)
  • Set the hooks var to specify DB/Table/Data selections
  • Set the bot_files var, this tells the bot where to cache used URLs
  • Set the bot to run however you like. I have it set to run every 5 minutes via CRON (Example below) -- Cron file: /etc/cron.d/run_all_discord_bots -- Cron file contents: */5 * * * * root /home/admin/projects/discord_bots/reddit/bot_youtube.sh

Also take note that it expects a channels unique identifier. For instance, my youtube channel's identifer would be UCZV7QVzq3zCyWuA20h7sn6w, since my YT link is https://www.youtube.com/channel/UCZV7QVzq3zCyWuA20h7sn6w. If using sqlite, just put the identifier in the subreddit column.

***NOTE: If using sqlite, see DiscordBotDB.png for table structure this bot expects

This bot is still WIP. You'll notice it posts in my discord channel twice for each video, that is because I have it feeding 2 different YT channels into 2 different discord channels. If you're just feeding a single YT channel into a single discord channel you won't have this problem. Its a bug I haven't been able to fix, so if you fix it please let me know and I'll update this.

History

I developed my discord bots after KITROBIT stopped providing their services and ran a small PATREON page to generate support. I recently disabled patreon income and decided to just generalize my code and upload to GITHUB. I may tweak them over time as they all run 24/7 for various discord servers right now. If you make any positive tweaks/changes/fixes please let me know to update these repositories.

Buy me a beer?

Feel free to paypal me a couple bucks for a beer! str4ng3r 4t d4ng3r d0t com

About

Discord bot fully written in linux shell that delivers YOUTUBE videos via CURL->WEBHOOK to any number of specified discord servers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages