Coder Social home page Coder Social logo

groupme-randomizer-bot's Introduction

groupme-randomizer-bot

README is still a WIP.

GroupMe bot, built with Nodejs.

Features

All commands are case-insensitive.

  1. Send a random post from a specified subreddit. (IMPORTANT: This is probably broken due to Reddit's recent changes to their API and their authentication process)
    • Example: memes plz getdownmrpresident
    • Write memes plz <subreddit_name> and the bot will send a random image/url/self post.
    • If <subreddit_name> is not specified, a random post from the specified default subreddit (determined by process.env.DEFAULT_SUBREDDIT) is sent.
  2. Mention everybody in the chat. (Currently broken!)
    • Write @all to the group, and the bot will send a message which pings everybody in the chat.

How to use in your GroupMe group

  1. Create your own GroupMe bot.
  2. Make a fork, etc. of this repo and host it somewhere.
  3. Edit your GroupMe bot's callback URL to point to the URL where your fork is hosted (step 2).
  4. If using the Reddit features, you must have an authorized app created .
  5. Make sure your process.env variables point to your bot ID, group ID, etc. (see 'Configurations' below for more detail)
  6. Enjoy this not perfect / possibly not functional bot.

API's used

Configurations

Environment variables (all are required, unless specified otherwise)

GroupMe

  1. BOT_ID: Bot ID, given by GroupMe.
  2. BOT_NAME: Name of the bot, which you gave to GroupMe when creating the bot.
  3. GROUP_ID: ID of the GroupMe group that this bot is added to.
  4. GROUPME_ACCESS_TOKEN: Access token, given by GroupMe.

Reddit

  1. REDDIT_ID: ID of your authorizied Reddit app.
  2. REDDIT_SECRET: Secret of your authorizied Reddit app.
  3. REDDIT_REFRESH_TOKEN: Reddit refresh token, which you must generate.
    • See here for an easy way to get a generated refresh token.

Enabling features

  1. (optional) SHOULD_MENTION_ALL: set to true to enable the @all functionality. (by default, the bot assumes you don't want this feature).
  2. (optional) SHOULD_SEND_MEMES: set to true to enable the memes plz functionality. (by default, the bot assumes you don't want this feature).
  3. (optional) SEND_ONLY_IMAGE: set to true if you want the memes plz functionality to just send the image, rather than a link to the reddit post.

groupme-randomizer-bot's People

Contributors

conkur 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.