Giter VIP home page Giter VIP logo

corddit-text's Introduction

Corddit

Emulate Reddit forums in Discord!

Features

  • multiple images
  • videos
  • no duplicates
  • lightweight

How to

Installation

  1. npm i
  2. Modify config.js with your config. Everything with REPLACE_ME must be replaced. SCROLL DOWN FOR INSTRUCTIONS.
  3. node ., and that's it!

Configuration

  • Create a Reddit account

    • Change "username" under reddit to the account's username.
    • Change "password" under reddit to the account's password.
  • Create a Reddit app here

    • Select the 3rd option: "script". Example
    • Set "name" and "redirect_uri" to whatever you wish.
    • Click create.
    • Change "clientID" and "clientSecret" under reddit according to the picture. Example
  • Create a Discord bot, tutorial here

    • Change "token" to Bot <your_token>, example: Bot O89gea98hgn
    • Change "guildID" under custom to the ID of the server you want to use the bot in.
  • Remove "[REPLACE_ME]" || in the config.js if you are going to be using env. e.g. token: "Bot [REPLACE_ME]" || process.env.discord_token, would be changed to token: process.env.discord_token, and in env you would put token=Bot <your_token>.

Done!

Usage

  1. --forcefetch to quickly check if it works.
  2. The bot will now post every 6 hours. (modify the duration inside the code in the "ready" event [line 37] )

Bugs

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.

Make sure to add a ⭐ if you are using the bot

corddit-text's People

Contributors

xharuke avatar

Stargazers

 avatar  avatar Ayensha avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.