Skip to content

conkur/groupme-randomizer-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published