Skip to content

A simple (unofficial) Discord bot for announcing when Tom Scott posts a new YouTube video

License

Notifications You must be signed in to change notification settings

Danyc0/tom-sbott

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tom SBott

A simple (unofficial) Discord bot for announcing when Tom Scott posts a new YouTube video

Dependencies

pip install -U Discord.py python-dotenv

Setup

You'll need to create a discord bot of your own in the Discord Developer Portal with View Channels and Read Messages permissions. It's also handy if you have an empty server (or "guild") for you to test in. This section of this guide may be helpful to set that up.

You'll need to set four environment variables:

  • DISCORD_TOKEN -> The Discord token for the bot you created (Available on your bot page in the developer portal)
  • API_KEY -> Your Google API key so the bot can query the YouTube API
  • CHANNEL_IDS -> A space-separated list of the channel IDs in which to post the latest video link
  • RESUBSCRIBE_DAYS -> The number of days between resubscriptions to the YouTube API Push Notifications (4 seems to be a good value for this)
  • CALLBACK_URL -> The URL that the YouTube API Push Notifications are sent to

You can put these in a .env file in the repo directory as it uses dotenv (See here for usage) so you don't have to keep them in your environment

Contributions

In short, patches welcome. If you raise a PR, I'll test it and (probably) merge it

About

A simple (unofficial) Discord bot for announcing when Tom Scott posts a new YouTube video

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages