A personal Telegram bot that monitors your favorite subreddits and sends you instant notifications when new posts appear. If the post has a video, the bot can download and send it directly to your Telegram chat.
- π‘ Monitor multiple subreddits β add/remove subreddits at any time via Telegram commands
- π Instant notifications β get notified when new posts match your criteria
- π¬ Video download β tap a button to download and receive the video directly in Telegram (powered by yt-dlp)
- βοΈ Smart filters:
- Minimum upvotes / comments threshold
- Filter by post type (videos only, images only)
- Filter by flair or keyword in title
- NSFW toggle
- Sort by:
new,hot, orrising
- π Top posts β fetch the top posts of any subreddit by time range
- π° Digest β get a quick summary of hot posts across all your subreddits
- βΈοΈ Pause/Resume monitoring without stopping the bot
- β±οΈ Configurable interval β set how often the bot checks for new content
git clone https://github.com/yourusername/RedditToTelegram.git
cd RedditToTelegrampip install -r requirements.txtNote:
yt-dlprequiresffmpegto merge video and audio. Install it with:sudo apt install ffmpeg(Linux) orbrew install ffmpeg(macOS)
cp .env.example .envFill in your credentials:
| Variable | How to get it |
|---|---|
TELEGRAM_TOKEN |
Create a bot via @BotFather |
ALLOWED_USER_ID |
Get your ID from @userinfobot |
REDDIT_CLIENT_ID |
reddit.com/prefs/apps β create a "script" app |
REDDIT_CLIENT_SECRET |
Same page as above |
REDDIT_USER_AGENT |
Any string, e.g. RedditToTelegram/1.0 by u/yourusername |
python src/bot.py| Command | Description |
|---|---|
/add <subreddit> |
Start monitoring a subreddit |
/remove <subreddit> |
Stop monitoring a subreddit |
/list |
List all monitored subreddits |
| Command | Description |
|---|---|
/filters |
Show current filter settings |
/setfilter <key> <value> |
Set a filter (see keys below) |
/resetfilter |
Reset all filters to defaults |
Filter keys:
| Key | Type | Default | Description |
|---|---|---|---|
min_score |
int | 10 | Minimum upvotes |
min_comments |
int | 0 | Minimum comments |
only_videos |
bool | false | Only notify for video posts |
only_images |
bool | false | Only notify for image posts |
nsfw |
bool | false | Include NSFW posts |
flair |
string | null | Filter by flair text |
keyword |
string | null | Filter by title keyword |
sort |
string | new | Sort: new, hot, rising |
| Command | Description |
|---|---|
/status |
Show bot status and current settings |
/pause |
Pause monitoring |
/resume |
Resume monitoring |
/interval <minutes> |
Set check interval (default: 15 min) |
| Command | Description |
|---|---|
/top <subreddit> [day|week|month] |
Top posts from a subreddit |
/digest |
Hot posts summary from all subreddits |
The bot only responds to the ALLOWED_USER_ID specified in .env. All other users are ignored.
RedditToTelegram/
βββ src/
β βββ bot.py # Entry point, wires everything together
β βββ config.py # Loads settings from .env
β βββ handlers.py # Telegram command handlers
β βββ monitor.py # Background Reddit polling loop
β βββ storage.py # JSON state persistence
βββ data/ # Created at runtime (gitignored)
β βββ state.json # Subreddits, filters, seen posts
β βββ downloads/ # Temporary video downloads
βββ .env.example
βββ requirements.txt
βββ README.md
MIT β personal use project.