Skip to content

Latest commit

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date

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

CREATEDATABASEDATABASE_NAME;
CREATEUSER '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

CREATETABLE `subreddit_posts` (
`id`INTNOT 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

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages