This is an simple CLI app to transfer Slack backup messages to Discord.
- NodeJS >=16
- Exported Slack backup messages
- Configured Discord Server and Bot
- Export Slack backup messages.
- Create Discord Bot with proper permissions.
- Register Bot to the target Server.
- Install this project CLI
- Send your message to Discord!
Please follow the official Slack instructions to export and download your Workspace messages:
https://slack.com/intl/en-br/help/articles/201658943-Export-your-workspace-data
Unzip the file in some folder at your machine.
Access your Discord Account and go to the Developers Portal.
https://discord.com/developers/applications
Create a new Application.
And then create a new Bot for this Application.
IMPORTANT! Recent changes on Discord API invalidate Bots with "discord" (case insensitive) in their names! Make sure to create Bot with valid name.
Click on the new bot and setup Gateway Intents and enable Message Content Intent option
Access following URL to authorize your Bot into your server with administrator permissions (replace YOUR_BOT_APPLICATION_ID).
You are giving the following permissions to this Bot:
Select your target server and confirm.
Install slack2discord globally (you may need admin permissions)
npm install -g slack2discord
Go to your backup messages root folder and run the following command:
s2d run -t <ENTER YOUR BOT TOKEN> -sid <ENTER YOUR SERVER ID>
This script will read files from current directory and send to Discord.
Each succesful file migration are moved to .s2d/done
folder.
You can also create a config file to don't repeat yourself:
- Create a config.json file and fill it with your data:
{
"token": "YOUR_BOT_TOKEN",
"serverId": "999999999999999999",
"source": "./slack-backup-folder-path",
"parentChannel": "MY_PARENT_CHANNEL",
"include": [
"include-channel-name"
],
"exclude": [
"exclude-channel-name"
],
"mapChannels": {
"old-channel-name": "new-channel-name"
},
"onlyParse": true
}
- Run the following command:
s2d run -c <ENTER YOUR CONFIG FILE PATH>