Get new videos from YouTube channels and playlists on Discord
$ npm i
$ cp config.json.dist config.jsonEdit the newly created file:
{
"discord": {
"token": "Discord bot token",
"channelId": "Discord channel id"
},
"youtube": {
"key": "YouTube API key",
"subs": [
{
"channelId": "YouTube channel id",
"q": "keywords to filter videos by their title"
},
{
"playlistId": "YouTube playlist id"
},
// ...
]
},
"wikipedia": {
"language": "en" // cf. infra (default)
}
}You can use this online tool to find channel ids if needed. Playlist ids are directly accessible from client-facing URLs: https://www.youtube.com/playlist?list={playlistId}
$ npm startLatest videos from each channel (matching the q parameter, if there is one) will be stored locally in the latest.json file. Whenever this tool runs and a latest video changes, its link will be posted to the relevant Discord channel.
$ npm run resetRemoves the latest.json file to reset stored latest videos.
$ npm run mtg # retrieve Scryfall links for Magic: the Gathering cards using [[This syntax]] (case insensitive)
$ npm run wiki # @mention the bot with a person's name to have it check Wikipedia to confirm whether they are dead yet