add way to export Discord server
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
1a9e735031
commit
9f0aa6abaa
|
@ -0,0 +1,20 @@
|
||||||
|
# Description
|
||||||
|
|
||||||
|
This script is an example of how a Discord Server can be exported in its entirety.
|
||||||
|
|
||||||
|
This script is using the `tyrrrz/discordchatexporter` Docker image of [DiscordChatExporter](https://github.com/Tyrrrz/DiscordChatExporter).
|
||||||
|
|
||||||
|
# Usage
|
||||||
|
|
||||||
|
```sh
|
||||||
|
export API_TOKEN=abcd
|
||||||
|
export GUILD_ID=1234
|
||||||
|
./export.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
# Instructions
|
||||||
|
|
||||||
|
You can get instructions on getting the necessary values by running:
|
||||||
|
```sh
|
||||||
|
docker run --rm -it tyrrrz/discordchatexporter guide
|
||||||
|
```
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/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
|
Loading…
Reference in New Issue