An independent Discord Bot based on Java and Quarkus. tubefy is a lightweight Discord Bot that monitors YouTube channels for new uploads and automatically announces them to Discord via webhooks. The idea was doing a favor for my son. (Forgive me: I couldn't prevent him from YT)
- Multi-Channel Support: Monitor multiple YouTube channels simultaneously.
- Discord Integration: Send notifications to multiple Discord webhooks.
- Rich Notifications: Includes video titles, links, and high-quality thumbnails using Discord Embeds.
- Resilience: Built-in retry mechanism for API calls and network stability.
- Duplicate Protection: Ensures each video is announced only once and ignores videos older than 3x the check interval.
- Docker Ready: Easy deployment using Docker and Docker Compose.
- Searching via YouTubePlayList-: much cheaper than searching via standard YouTube search
- Java 25 (if building locally)
- Docker
- A YouTube Data API v3 Key
- Discord Webhook URL(s) to send notifications to
- fancy YT channels to monitor
The application is configured using environment variables. Create a .env file in the project root:
# Your YouTube Data API Key
YOUTUBE_API_KEY=BIzcSy...
# The interval for checking new videos (e.g., 10m, 1h, 30s)
YOUTUBE_CHECK_INTERVAL=10m #(default 20m)
# The configuration for all subscriptions
# create your json array as you can see in the example below
# validate this json vs. infrastructure/config/subscription-config.schema.json
# add the json array to the .env file as shown below
SUBSCRIPTION_CONFIG=[
{
"discord_webhook_url": "<DISCORD WEBHOOK URL>",
"yt_subscriptions": [
{
"yt_channel_id": "<YouTub Channel ID>",
"greetingText": "<greeting text here>"
}
]
},
{
"discord_webhook_url": "<DISCORD WEBHOOK URL>",
"yt_subscriptions": [
{
"yt_channel_id": "<YouTub Channel ID>",
"greetingText": "<greeting text here>"
},
{
"yt_channel_id": "<YouTub Channel ID>",
"greetingText": ""
},
{
"yt_channel_id": "<YouTub Channel ID>",
"greetingText": "<greeting text here"
}
]
}
]
# IMPORTANT for running in a Docker container:
# put all in exactly one line! as shown below
SUBSCRIPTION_CONFIG=[{"discord_webhook_url":"<DISCORD WEBHOOK URL>","yt_subscriptions":[{"yt_channel_id":"<YouTub Channel ID>","greetingText":"<greeting text here>"}]},{"discord_webhook_url":"<DISCORD WEBHOOK URL>","yt_subscriptions":[{"yt_channel_id":"<YouTub Channel ID>","greetingText":"<greeting text here>"},{"yt_channel_id":"<YouTub Channel ID>","greetingText":""},{"yt_channel_id":"<YouTub Channel ID>","greetingText":"<greeting text here"}]}]
# save your .env file now
First, build the project to generate the required Quarkus artifacts:
./gradlew buildDeploy the service using the provided Docker Compose configuration:
docker compose up -d --buildThe service will be available externally on port 49952 (mapped to internal port 8080).
- Scheduling: The application polls the YouTube API at a configurable interval.
- Detection: It checks the latest video for each configured channel.
- Validation: It verifies if the video is new and not older than the safety threshold.
- Announcement: If a new video is found, it sends a formatted embed message to all configured Discord webhooks.
- Memory: The application keeps track of the last processed video ID per channel in memory (initialized on startup).
It's already in a good state and can be used for personal use. But lemme do some clean up and TODOs for a first release.
- rate limiter
- mapping channels -> Discord webhooks (not all -> all) ✔
- native executable
- MDC ✔
- persist last video ID instead of algo to avoid duplicate announcements)
- a fucking gui
- Validator for videos instead of tooOld etc.
This project is licensed under the MIT License - see the LICENSE file for details.
I won't pay for exeeding your YouTube API limit and anything else might happen.

