First you have to download your messages in json format, this bookmarklet works like a charm: https://dht.chylex.com/ You will end up with file like this:
{
"meta": {
"users": {}
.....
},
"data": {
"377219647788941312": {
"416188803078815744": {
"u": 0,
"t": 1519297543068,
"m": "a first message of 0"
},
.....
Then convert the json file to a csv recognized by slack. It should looks like this:
"1519297543068","channel", "marcin","a first message of 0"
You can use the script below. It converts only first conversation / channel though:
infile="discord.json" # Change me to your discord file
outfile="discord-slack.csv"
import json
import os
with open(infile,"rt") as f;
l = json.load(f)
mess = list(list(l["data"].values())[0].values())
data = [(m["t"], "discord-archive", m["u"], m["m"] + " "+str(m.get("a",""))) for m in mess ]
with open(outfile,'wt') as out:
csv_out=csv.writer(out)
csv_out.writerows(data)
Then go to Slack https://< your org>.slack.com/services/import
select CSV/Text File, upload the file and start importing. Btw The import takes ages. In my case 5k messages took over an hour.