Skip to content

Mirror Subreddit posts to Discord, with multi-reddit, channel and server support

Notifications You must be signed in to change notification settings

TargetedEntropy/reddit_mirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reddit image to Discord Mirror

This is used to mirror your favorite subreddits to Discord channels. it supports multiple subreddits being sent to different channels, or servers. You only need to provide the API access to Reddit, Discord and specify the Discord Channel ID. The bot can be invited to multiple servers and will mirror i.redd.it images to imgur.

Requirements

Installation

  • Install MySQL
  • Create a MySQL Database & User
  • Create the MySQL table
  • Add python modules

Configuration

  • Create your .env file
    • cp env.sample .env
  • Configure .env to populate examples
  • Add your Discord/Reddit/Imgur Credentials
  • Setup the subreddits and channel destinations in main.py
        SUBREDDITS = [
            {"name": "pics", "channel_id": 1011474405368797184},
            {"name": "space", "channel_id": 1011788355237578285}
        ]

Create a SQL Database & User

CREATE DATABASE DATABASE_NAME;
CREATE USER 'USERNAME_STRING'@'localhost' IDENTIFIED BY 'PASSWORD_STRING';
SET PASSWORD FOR 'USERNAME_STRING'@'localhost' = PASSWORD('PASSWORD_STRING');
GRANT ALL PRIVILEGES ON DATABASE_NAME.*  TO 'USERNAME_STRING'@'localhost';

SQL Table structure

CREATE TABLE `subreddit_posts` (
	`id` INT NOT NULL AUTO_INCREMENT,
	`post_id` VARCHAR(24),
	`post_title` TEXT,
	`post_url` TEXT,
	`subreddit_name` VARCHAR(250),
	`post_datetime` DATETIME,
	PRIMARY KEY (`id`)
);

About

Mirror Subreddit posts to Discord, with multi-reddit, channel and server support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages