Skip to content

Instantly share code, notes, and snippets.

@margulies
Created February 14, 2023 11:14
Show Gist options
  • Save margulies/f60a12e95be453bc389cde95fb1b5721 to your computer and use it in GitHub Desktop.
Save margulies/f60a12e95be453bc389cde95fb1b5721 to your computer and use it in GitHub Desktop.
Shell script for backing up discord server
#!/bin/bash
# Install DiscordChatExporter.Cli from:
# https://github.com/Tyrrrz/DiscordChatExporter
#
# .NET runtime also needs to be installed:
# https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Dotnet.md
#
# Find your token and server ID ('guild'):
# https://github.com/Tyrrrz/DiscordChatExporter/blob/master/.docs/Token-and-IDs.md
token=[TOKEN_ID]
guild=[DISCORD_SERVER_ID]
# The following command will back up all channels on a specified Discord server.
# It is also possible to specify channels
dotnet ./DiscordChatExporter.Cli/DiscordChatExporter.Cli.dll exportguild -t ${token} -g ${guild} \
-o ./backups --media True --reuse-media True --parallel 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment