Emulate Reddit forums in Discord!
As seen on YouTube
npm i
- Rename
example.env
to.env
- Modify
.env
with your config. Everything withREPLACE_ME
must be replaced. SCROLL DOWN FOR INSTRUCTIONS. node .
, and that's it!
-
Create a Reddit account
- Change
"reddit_username"
to the account's username. - Change
"reddit_password"
to the account's password.
- Change
-
Create a Reddit app here
-
Create a Discord bot, tutorial here
- Change
"discord_token"
toBot <your_token>
, example:Bot O89gea98hgn
- Change
"custom_guild_id"
to the ID of the server you want to use the bot in.
- Change
Done!
corddit setup
to get started.corddit forcefetch
to quickly check if it works.- The bot will now post each week. (modify the duration inside the code in the "ready" event)
Because the library used for Reddit is quite old ("snoowrap", 2 years), ratelimits are not handled at all. You might experience the process crashing with 429 errors. To prevent this, lower the amount of posts fetched. The max should be 1000-900 posts in 10 minutes, if we are to trust the X-ratelimit headers.
The code is using puppeteer
, meaning you might have trouble running the bot on a lower-end machine.