Git Product home page Git Product logo

discordstorage's Introduction

Discord Storage

Utilize Discord servers as cloud storage! [This only works on python 3-3.6.x]

Tutorial

Setting up the bot/server

1) Creating the bot

In order for this program to work, you're going to need to create a discord bot so we can connect to the discord API. Go to this link to create a bot. Make sure to create a user bot and ensure the bot is private. Here's a picture to the configuration. Keep note of the token and the client ID.

2) Setting up the server

The bot will need a place to upload files. Create a new discord server, make sure no one else is on it unless you want them to access your files.

3) Adding your bot to the server

To add the bot to the server (assuming your bot isn't public), go to the following link: https://discordapp.com/oauth2/authorize?client_id={CLIENT_ID}&scope=bot&permissions=0 Replace {CLIENT_ID} with the client ID you copied earlier. Then, select the server you just made and authorize. Your server should now show your bot like this.

Setting up the program

1) Dependecies

Clone the repository and run pip install -r requirements.txt to install the dependencies for the program.

2) Configuration

Run python main.py -t {token} -r {room id} to configure the program, copy and paste your token from when you created your bot. For the room ID, copy the channel ID with right click on the channel (developer mode must be enabled under appearance on Discord settings to have the option for Copy ID). Your configuration should look like this

You can delete config.discord to reconfigure the program.

Commands

Usage: main.py [-h] [-t TOKEN] [-r ROOM_ID] [-c FILE] [-l] [-d CODE] [-u FILE]

Arguments:

-h, --help Show this help message and exit

-t TOKEN, --token TOKEN Bot token ID

-r ROOM_ID, --room-id ROOM_ID Channel ID to store files in

-c FILE, --config-file FILE Use configuration file

-l, --list List uploaded files

-d CODE, --download CODE Download file with given code

-u FILE, --upload FILE Upload file or directory

Disclaimer

You shouldn't be using this as your main source of file storage. Program was inspired by snapchat-fs.

discordstorage's People

Contributors

nigel avatar itsmeleeson avatar hugoarbones avatar nigelchen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.