Skip to content

Discord bot that sends messages to a server about new Reddit posts that match specific search terms.

License

Notifications You must be signed in to change notification settings

kyleseven/DiscordRedditNotifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Reddit Notifier

A bot for Discord that sends messages to a channel about new Reddit posts that match specific search terms.

I created this quickly when the Pager app was down for 2 days, so it's not exactly the most sophisticated bot. Currently, the bot only supports running on a single server, but notifications can be sent to different channels depending on your configuration.

Dependencies

This bot runs on Python 3.11 and depends on discord.py and Async PRAW.

Running the Bot

Using Docker-Compose

  1. Configure your settings in ./config/config.toml (Read more)

  2. Run docker-compose

    • docker-compose up --build -d

Manual

  1. Move config.toml from config/ to notifier-bot/

    • mv ./config/config.toml ./notifier-bot
  2. Change directory to notifier-bot

    • cd notifier-bot
  3. Configure your settings in config.toml. (Read more)

  4. Install required dependencies with pip

    • pip install -r requirements.txt
  5. Run the bot

    • python3 bot.py

Usage Example

The following watcher is defined in config.toml

[[watchers]]
name = "K-Pop Updates"
subreddit = "kpop"
enabled = true
channel_id = 8888888888888888888
color = 0xC77497
match_mode = "OR"
search_terms = [
  "loona",
  "dreamcatcher",
  "red velvet",
  "itzy",
  "le sserafim",
  "aespa",
  "heize",
  "stayc"
]

This watcher will watch r/kpop for new posts that contain any of the strings in search_terms in the title. Read more about watchers here.

Once the watcher finds a post that matches, an embed will be sent to the channel defined by channel_id, as shown below.

notification

About

Discord bot that sends messages to a server about new Reddit posts that match specific search terms.

Topics

Resources

License

Stars

Watchers

Forks