Skip to main content

slack-to-discord

This tool takes a Slack export file and imports it into a Discord server

Demonstration

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.
  • Tracks the import state per-channel so failed imports can easily be retried. This also enables importing only new messages from an updated export file.

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 either use the state file (see the -sf/ --state-file option) to retry the import from where it failed, or you can delete all the created channels to quickly remove the history and retry from the beginnng. If the failure persists, you can either fix the issue yourself and retry the import (please contribute your fixes back to the project!), or open an issue on the project.

Instructions

  1. Export your data using one of the supported methods:
    • Directly from Slack via https://my.slack.com/services/export. This is the official method, but requires admin access and attachments are only included as URLs that reference files on Slack's servers.
    • Using the slackdump project. This is an unofficial project, but no admin access is required to use it, and it includes the actual attachment data in the export.
  2. 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]
  3. Install slack-to-discord using pip (pip install slack-to-discord)
  4. Run slack-to-discord --zipfile <slack export zip> --guild <server name> --token <bot token> (check slack-to-discord --help for other options).
  5. 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)
  6. Inspect the imported history.
  7. Invite your users.

Release files for slack-to-discord 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for slack-to-discord 1.3.0
File Size Uploaded
slack_to_discord-1.3.0.tar.gz 17.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for slack-to-discord 1.3.0
File Interpreter ABI Platform
slack_to_discord-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 35.7 kB

Release files / slack_to_discord-1.3.0.tar.gz

Download URL slack_to_discord-1.3.0.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4c52e43ccbdf4c849518ec6b460d792c07e4b14a95cb9ba1b5495d89e25c034f
BLAKE2b-256 checksum
How to use checksums
1c106cb2a32a6de9c5aef27770ee3717c046c1e55044887852bb165c1b97587b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / slack_to_discord-1.3.0-py3-none-any.whl

Download URL slack_to_discord-1.3.0-py3-none-any.whl
Size 18.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3d45764e7628777ed6050b14c5838b8246709082cfbe58c9fdd3f59f4c0bd4d
BLAKE2b-256 checksum
How to use checksums
3339158c59a602557d74741ef3d01a9eaa465c3cb3b25a2d10189c3152b79ecc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

1.2.0

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page