Skip to content

voraci0us/DsVault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

DsVault

Python "bot" with discordpy (https://github.com/Rapptz/discord.py) to generate a local backup of messages and files. This is not meant to be online and respond to commands like a bot, but rather be used as a CLI one-liner that can be scheduled out via cron or at, etc.

Channels are represented as HTML files, with image attachments embedded with <img> tags and other file types linked to with <a>. All file attachments are downloaded and stored in a /src directory under each channel's folder.

Backups are stored in a hierarchical structure, guild-id -> category-id -> channel-id. Under channel-id and category-id folders, an index.html file is generated with anchor links to the categories and channels, respectively, below.

Usage

usage: main.py [-h] [--show] [guild] [category] [channel]

positional arguments:
  guild
  category
  channel

options:
  -h, --help  show this help message and exit
  --show      output what would be backed up

Setup

Go to the Discord Developers Portal. Create a new application. Under Bot, click Add Bot. Click Reset Token and save the new token. You will need to put this in a key.txt file in the same directory as the script. Scroll down to Message Content Intent and enable it.

Under OAuth2 -> URL Generator, select the bot scope and Read Messages/View Channels bot permission. You can now click on the URL to invite the bot to a server you manage.

Examples

Using --show to view guilds, categories, and channels: image

Backing up an entire guild: image

Backing up a single channel: image

Example index.html for guild:

image

Example index.html for channel:

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages