Git Product home page Git Product logo

spinfal / cdn-slave Goto Github PK

View Code? Open in Web Editor NEW
18.0 1.0 4.0 660 KB

A simple website that allows you to upload files to Discord's CDN without having to do it in their app.

Home Page: https://cdn-slave.spin.rip/

License: GNU Affero General Public License v3.0

JavaScript 35.85% EJS 62.94% Nix 0.90% CSS 0.31%
discord discord-js discord-cdn cdn website simple idkwhattagtouse discord-bot nodejs

cdn-slave's Introduction

CDN Slave status CDN Slave uptime

Updates

https://blog.spin.rip/p/discord-cdn-changes

CDN Slave

A simple website that allows you to upload files to Discord's CDN without having to do it in their app.

Prerequisites

Node.js

Discord Bot

Git (optional)

Installation

Run this command:

git clone https://github.com/spinfal/cdn-slave.git

or download the ZIP file and extract it

cd cdn-slave

Follow these steps:

  • Rename Global.example.js to Global.js
  • Go to https://discord.com/developers/applications and create bot
  • Make sure this is enabled Message Content Intent
  • Invite the bot to your server using this link: https://discord.com/api/oauth2/authorize?client_id=INSERT YOUR APPLICATION ID&permissions=52224&scope=bot
  • Configure the Global.js file

Continue with running these commands:

npm i
npm run start

or

npm run dev

Usage

The website will be up @ http://localhost:443 (unless you've changed the config)

Files uploaded on the site will be available in the channel that you set in Global.js

Usage with ShareX

CDN Slave can also be used with ShareX! Follow these steps to get it working (don't want to follow steps? click here to download the config):

  1. Copy the upload endpoint. If using localhost it will be http://localhost:443/api/upload, or if you're using my instance it will be https://cdn-slave.spin.rip/api/upload
  2. Open ShareX and go to Destinations > Custom uploader settings > Click New
  3. Name it whatever you want & paste the upload endpoint in Request URL
  4. Under Destination type, select Image uploader, Text uploader, and File uploader
  5. Body should be Form data (multipart/form-data) and File form name should just be file.
  6. In the headers section, set the name to Upload-Source and the value to API
  7. Select your new ShareX config in the dropdowns at the bottom left of your screen
  8. Have fun with your new CDN slave. ShareX CDN Slave GIF tutorial

cdn-slave's People

Contributors

dependabot[bot] avatar snyk-bot avatar spinfal avatar t0stbrot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.