infra-utils/discord/export.sh
Jakub Sokołowski 9f0aa6abaa
add way to export Discord server
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-07 14:00:39 +02:00

22 lines
430 B
Bash
Executable File

#!/usr/bin/env bash
set -e
if [[ -z "$API_TOKEN" ]]; then
echo "The API_TOKEN env variable is not set"
exit 1
fi
if [[ -z "$GUILD_ID" ]]; then
echo "The GUILD_ID env variable is not set"
exit 1
fi
docker run --rm -it -v "$PWD:/export" \
tyrrrz/discordchatexporter \
exportguild --bot \
--token "$API_TOKEN" \
--guild "$GUILD_ID" \
--output "/export" \
--format HtmlDark