Source |
Backup |
✅ Embeds
✅ Attachments
✅ Threads
❌ Forum (not implement yet)
Althought already has DiscordChatExporter, but the problem of DiscordChatExporter
is that you have to save all messages assets in your own disk or cloud drive, which need a lot of disk sapce. If you use DiscordChatExporter
but not chose download all messages assets, and then you delete the source channel, all of these assets cdn link will be lost.
So if we wanna keep all assets and aslo no need own disk sapce, the way is resend all messages history into another channel to backup on the discord server. and this is what this bot doing.
Bot will fetch target channel all history messages, and save all messages id array json temp files to local temp folder
Recursive all temp files, find each message by id, and then deal it message by each.
if message have attachments:
- save all attachments temp files to local temp folder
- send messages content with attachments
- delete attachments temp
if message not have attachments:
- send messages content
temp file will delete after each file messages done.
-
- Download this repo
- Clone this repo
https://github.com/Proladon/discord-channel-backup-bot.git
-
- rename
.env.example
file to.env
- give required values in
.env
file - [optional] you can adjustify backup interval times by
config.js
- rename
-
- First install the project dependencies
- excute terminal command
yarn
ornpm install
- Start the Bot
- excute terminal command
yarn bot
ornpm run bot
target
: target channel, which channel you wanna backupdst
: dstchannel ID
, which channel you wanna backup to (can cross server, but also required bot had in server there)
backup proccess will take very very ~ long times, cause of discord api rate limit, so we need to wait few seconds with deal with each message in purporse.