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
100 downloads per month
95KB
1.5K
SLoC
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