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.
- Discord App and Bot
- Twitter account, Twitter Developer Account, and a Twitter Application
- Twitter v1 API and User Access tokens with Read and Write permissions
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.
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
To test and use the bot locally, you can do the following commands:
- Clone the project:
git clone [email protected]:laurendorman/color-of-berlin.git
- Change to the project directory:
- Install the project dependencies:
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.