Skip to content

metalabel/chorus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHORUS

Create a way for any member in your community to tweet without sharing Twitter passwords.

CHORUS allows a Discord community to automatically tweet messages from members. Messages sent within specified channels can be upvoted by other members with emoji reactions. Once a message has received enough reactions, it gets automatically tweeted from a connected account.

This software is provided as-is by Metalabel as part of a collaborative release with Trust.

Prerequisites

Note: Twitter v1 API access is used to support media uploads, which is not yet available in the v2 API. In order to gain access to the v1 API, you’ll need to apply for Elevated access via Twitter's Developer Portal. You can learn more here.

If you do not have access to the Twitter v1 APIs then you can install the Autocode app as an alternative.

Initial set-up and installation

You can use the Heroku one-click install by clicking the botton below and providing the following environment variables in the GUI.

Deploy on Heroku

DISCORD_BOT_TOKEN=
TWITTER_CONSUMER_KEY=
TWITTER_CONSUMER_SECRET=
TWITTER_ACCESS_TOKEN_KEY=
TWITTER_ACCESS_TOKEN_SECRET=
DISCORD_CHANNELS=
TWEET_REACTION_EMOJI='❤️'
TWEET_REACTION_THRESHOLD=5
TWEET_ERROR='❌'
TWEET_SUCCESS='✅'
RESPOND_WITH_LINK=true

Local development

In order to test and use the bot locally, you must have Node and npm installed on your machine and be comfortable using a command-line interface.

To test and use the bot locally, you can do the following commands:

  • Clone the project: git clone git@github.com:laurendorman/color-of-berlin.git
  • Change to the project directory: cd chorus
  • Install the project dependencies: npm install

Create an .env file

In the project root, make a copy of the .env.example file with the following command:

cp .env.example .env

Following that, you will need to fill in the required environment variable values.

Run the bot

In the project root, run node index.js from the command line to run the bot locally.