Discord provides unlimited space to upload your files, but you can upload files with a max 25 MB size. DisCloud is a Python-based application designed to facilitate the management of large files within a Discord server. This bot offers functionality to split a file into parts, upload them to a Discord channel, and later combine those parts to reconstruct the original file. Ultimately, you get UNLIMITED STORAGE SPACE. The use of encryption ensures the security of the file content during the split and combine operations.
-
File Splitting: Break down large files into manageable parts for sharing on Discord.
-
Encryption: Ensure the security of file content by encrypting each part using the Fernet encryption algorithm.
-
File Combining: Reassemble file parts on Discord to recreate the original file.
-
Deletion of File Parts: Manage server storage by providing the ability to delete previously uploaded file parts.
-
List Uploaded Files: Get a list of all uploaded files in the Discord channel.
-
File Details: Get details of a specific uploaded file.
The bot utilizes discord.py for interaction with Discord servers and the cryptography library for file encryption. Users can trigger commands in a Discord channel to split, combine, or delete file parts. Additionally, users can list all uploaded files and get details of a specific file. Each file part is encrypted before upload to maintain data privacy.
This application is particularly useful in scenarios where file size limitations on Discord may pose challenges, offering a seamless solution for sharing large files while ensuring data security.
-
Open Discord and log in to your account.
-
On the left sidebar, click the ’+’ button to create a new server.
-
Choose "Create My Own" and enter a name for your server.
-
Customize your server settings and click "Create."
-
Go to the Discord Developer Portal.
-
Click on "New Application" and give your application a name.
-
Navigate to the "Bot" tab and click "Reset Token."
-
Under the "Token" section, click "Copy" to copy your bot token.
-
Go back to the Discord Developer Portal.
-
In your application, go to the "OAuth2" tab.
-
Under the "OAuth2 URL Generator," select the "bot" scope.
-
Scroll down, select the "Administrator" bot permission, and copy the generated URL.
-
Paste the URL into your browser, choose your server, and authorize the bot.
-
In your Discord server.
-
Go to the "Text Channel" tab and click on the "+" button to create a new channel.
-
Give it a name.
-
Set the channel to "Private" and select the bot as a member.
-
Create the channel
Before using the bot, ensure that you have the following prerequisites:
-
Python installed on your machine.
-
Discord bot token obtained from the Discord Developer Portal.
-
Clone the repository containing the Discord bot code.
-
Install the required Python packages by running:
pip install discord.py cryptography
-
Set the
BOT_TOKEN
variable indiscloud.py
with your Discord bot token. -
Run
genkey.py
to generate the encryption keyenckey.key
if you need a new key.
Never, under any circumstances, misplace or lose the encryption key associated with your files. The encryption key used during the upload process is essential for decrypting downloaded parts and restoring them to their original form.
If the encryption key is lost, retrieval becomes impossible, rendering your files permanently inaccessible.
Take utmost care to securely store and manage your encryption keys to ensure continued access to your encrypted files.
- Finally run
discloud.py
to start the server.
To split a file and upload its parts to Discord, use the following command in a Discord channel where the bot is present:
!split <file_path>
Replace <file_path>
with the path to the file you want to split.
To combine file parts and download the original file, use the following command:
!combine <output\_file\_path>
Replace <output_file_path>
with the desired path for the combined
file. Suppose the file you want to download is fileName.ext
, and the
path where you want to download it is my/custom/path
. So, the
output_file_path
will be: my/custom/path/filename.ext
When downloading files, a temporary folder will be created to facilitate the decryption and combining process. It is crucial not to delete this temporary folder during the download process. Rest assured, the folder will be automatically removed once the decryption and combining procedures are successfully completed.
Deleting the temporary folder prematurely may result in incomplete or corrupted files. Please allow the download process to finish, and the temporary folder will be taken care of automatically.
To delete all uploaded file parts from the Discord channel, use the following command:
!delete <file\_name>
To get a list of all uploaded files in the Discord channel, use the following command:
!listfiles
To get details of a specific uploaded file, use the following command:
!filedetails <file\_name>
Replace <file_name>
with the name of the file you want details for.