discord2slack
Send messages to Slack using Discord and vice versa.
Tested with Node v9.9.0.
Install
git clone https://github.com/aubguillemette/discord2slack.git && cd discord2slack
npm install
# Configure your stuff (see Config section)
npm start
Config
You have to set the following values in discord2slack.js
const DISCORD_TOKEN = '';
const DISCORD_CHANNEL = '';
const DISCORD_CHANNELID = '';
const SLACK_TOKEN = '';
const SLACK_CHANNEL = '';
const SLACK_CHANNEL_PRIVATE = false;
...where
DISCORD_TOKEN
is your Discord bot tokenDISCORD_CHANNEL
is the name of your Discord channel (configure this or DISCORD_CHANNELID)DISCORD_CHANNELID
is the ID of your Discord channel (configure this or DISCORD_CHANNEL)SLACK_TOKEN
is your Slack bot tokenSLACK_CHANNEL
is the name of your Slack channelSLACK_CHANNEL_PRIVATE
represents whether or not your Slack channel is private
How does one create Discord and Slack bots?
I've included instructions in the source code, I'll put them here too.
How to configure a Discord bot
- Go here: https://discordapp.com/developers/applications/me
- Create an app
- When the app is created, click on "Create a Bot User"
- Name bot, copy the Token, paste it in the conf. section of the source code and save changes.
- Go here (but replace "YOUR_CLIENT_ID" in the URL) https://discordapp.com/oauth2/authorize?client_id=YOUR_CLIENT_ID_HERE&scope=bot&permissions=3072
- Choose the server you want to give your bot access to and click OK (or wtv the submit button is named)
- Go on Discord and configure your channel to give msg read and msg write permissions to your bot.
- Copy your Channel ID or your Channel Name and paste it in the conf. section of the source code.
How to configure a Slack bot
- Go to https://my.slack.com/services/new/bot
- Configure the name of the bot
- Copy-Paste the Token into the conf. section of the source code and save changes.
- Invite the bot to the desired channel (/invite @my-l33t-bot)
- Copy the channel name in the conf. section of the source code.
- If the channel is private, set SLACK_CHANNEL_PRIVATE to true.
TODO
- Add support for DMs
- Add support for multiple channels