Extract data from a Slack export and import it into Discord
Project description
slack-to-discord
This tool takes a Slack export file and imports it into a Discord server
Capabilities
- Imports complete message history (tested with an import of just over 10,000 messages).
- Handles private channels (if they're included in your Slack export).
- Handles images and other files (falls back to linking to the files hosted by Slack if they're too big to upload).
- Preserves the original names and avatars of the Slack users
- Preserves emojis and reactions to messages. Custom emojis will also work, but need to be manually
added to Discord before importing (any
-
s in the emoji names will need to changed to_
s) - Preserves threaded conversations.
- Preserves pinned messages.
- Day boundaries between messages are marked by a
--------YYYY-MM-DD--------
message and each message is prefixed by the time it was sent. - Messages that are too long for Discord (>2000 characters) are split up and sent as multiple smaller messages.
Limitations
- Messages will be timestamped by Discord as the time they were imported, not as the time they were originally sent. This is worked around by adding a timestamp to the text of each message.
- No private messages will be imported
- Reactions to messages will be shown in a custom embed, not as normal reactions
- No embeds from Slack (can contain images, buttons, etc) will be preserved.
- No canvases from Slack will be preserved.
- File uploads will be done in two messages. The first is the message content, the second is a message containing the title of the uploaded file and attaching it.
General recommendations
The program will read all messages from the Slack export and use a bot to post them in a Discord server. It's recommended to start with a completely clean server before importing history. As the script can only post messages, not rewrite history, any previous content will be buried by the imported data. It's also a good idea to make sure everything worked properly before inviting other users.
Private channels (if you can manage to export them from Slack) will be created such that only the bot and server administrators can access them. After the import completes and you invite your users, you will need to manually change the roles/permissions to give everyone access to the correct channels.
If something goes wrong with the import, you can delete all the created channels to quickly remove the history. At this point, you can either fix the issue yourself and re-run the export (please contribute your fixes back to the project!), or open an issue on the project.
Instructions
- Export your data from Slack via https://my.slack.com/services/export
- Create a Discord bot (see https://discordpy.readthedocs.io/en/latest/discord.html) with the
following permissions:
- Manage Channels - to create the imported channels and change the topics of them
- Manage Webhooks - to allow the bot to fake the usernames and avatars of Slack users
- Send Messages
- Create Public Threads
- Send Messages in Threads
- Embed Links - to add reactions to messages (see 'Limitations' section)
- Attach Files
- Manage Messages - to pin messages [optional]
- Install
slack-to-discord
usingpip
(pip install slack-to-discord
) - Run
slack-to-discord --zipfile <slack export zip> --guild <server name> --token <bot token>
(checkslack-to-discord --help
for other options). - Wait. The program will exit once the import is finished. Due to Discord rate limits, the import process will take a while (speed was roughly 50 messages/min for me)
- Inspect the imported history.
- Invite your users.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file slack-to-discord-1.1.7.tar.gz
.
File metadata
- Download URL: slack-to-discord-1.1.7.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a343a926e7581ec9a5cf6f82894a688b02c7bba8afdbe5425d3e7cbba220ca1 |
|
MD5 | 5cf960799e02c8d7a2e1f18fd295c8f1 |
|
BLAKE2b-256 | a0b27fa586dbe5e85e10bbd37eec38e1d3438cca9c58c67ccdd7f9a12454b54e |
File details
Details for the file slack_to_discord-1.1.7-py3-none-any.whl
.
File metadata
- Download URL: slack_to_discord-1.1.7-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d637cf8a882c109659db9fe1d4cfac43674e359914cfd375e745322ca0abf0dd |
|
MD5 | 46a760ff72605372cded7b541259bc13 |
|
BLAKE2b-256 | 9a25e438c48bfa2b9ba83771cf77e27850851d2ff6a9e0210203f72d7a1cba1c |