A discord bot to archive the messages in a discord text channel.
A discord bot to archive the messages in a discord text channel.
Server Members
privileged intent for your bot. Note that this means your bot cannot be in more than 100 servers without verification. For a bot of this type, where the output is saved to the disk of the computer running it, this should not be a problem.application.commands
scope if you want to use slash commands.nix run github:Sciencentistguy/discord-channel-archiver -- <token_filename> <application_id_filename> [output_directory]
cargo run -- <token_filename> <application_id_filename> [output_directory]
discord-channel-archiver <token_filename> <application_id_filename> [output_directory]
/archive
and /archive_emoji
should be available in your guilds.!archive <channel> [mode]
, where channel
is the channel you want to archive, and mode
is one of either json
or html
. If this is blank, or if is any other value, all output formats will be generated.!archive_emoji
The HTML generated is very messy, but it should be well-formed. This means that an html formatter such as prettier should be used to clean it up. I'd recommend doing this if the resultant HTML is to be stored for archival purposes. The JSON should be clean as it is generated by serde. If prettier fails to parse the output, this is likely a bug, please file an issue.
There is no stability guarantee for the generate files. Discord's API can change, and therefore this program must also allow the outputted data to change.
Inspired by DiscordChatExporter.
The HTML / CSS templates are derived from the ones from DiscordChatExporter, under the terms of the GNU GPL.
For licence information, see licence.md.