8 releases

new 0.3.0 Oct 19, 2024
0.2.1 Sep 7, 2024
0.1.4 Sep 6, 2024
0.1.0 Aug 31, 2024

#386 in Command line utilities

Download history 94/week @ 2024-08-25 473/week @ 2024-09-01 98/week @ 2024-09-08 48/week @ 2024-09-15 7/week @ 2024-09-22 3/week @ 2024-09-29 78/week @ 2024-10-13

100 downloads per month

GPL-3.0-or-later

95KB
1.5K SLoC

ci-badge crates.io version

Distore

Utility to use Discord as cloud storage.

Installation

First, make sure you have cargo installed.

cargo --version

You should be getting no errors. If not you can install cargo from https://www.rust-lang.org/tools/install

Then, you can simply install using cargo

cargo install distore

Make sure you have .cargo/bin in your PATH

For Linux:

export PATH=$HOME/.cargo/bin:$PATH

For Windows:

setx /M PATH "%PATH%;%HOMEPATH%/.cargo/bin"

Open a new shell and run the following command. If everything went right you shouldn't get any errors

distore --version

Usage

First of all, you need to create a Discord bot.

Go to the Discord Developer Portal

  • Click 'New Application', you can give it any name you want.
  • Click 'Bot' at the left 'Settings' section.
  • Reset the bot's token and copy it.
  • Save the token to the Distore configuration with the following command
distore config token <TOKEN> --global
  • Go back to the Developer Portal, and click 'OAuth2'
  • Check the 'Bot' box in the 'OAuth2 URL Generator'
  • Check 'Send Messages' and 'Attach Files' in 'Bot Permissions'
  • Copy the generated link and paste it to your browser
  • Add the bot to a server you own. You can create a new one if you prefer
  • Copy the ID of the channel you want your files to be stored in (You need to have 'Developer Mode' enabled. To enable it, go to your Discord setting, go to 'Advanced', and enable 'Developer Mode')
  • Save the channel ID to the Distore configuration
distore config channel <CHANNEL_ID> --global

Now, you're ready to use Distore.

Commands

You can upload a file with the following command:

distore upload <path/to/file>

List all the files you've uploaded:

distore list

And download a file:

distore download <MESSAGE_ID>

You can set a different token and channel for the directory you're in. Just don't set the --global flag in the config command

distore config token <TOKEN>
distore config channel <CHANNEL_ID>

For all the commands:

distore --help

Dependencies

~33–51MB
~893K SLoC