Coder Social home page Coder Social logo

chaarlottte / discord-authnet Goto Github PK

View Code? Open in Web Editor NEW
21.0 3.0 4.0 32 KB

Connect thousands of Discord accounts to your own network, and force them to join servers.

JavaScript 100.00%
discord discord-auth discord-authentication discord-bot discord-malware discord-verification discord-verify discordauth authnet disocrd-authentication-network

discord-authnet's Introduction

Discord AuthNet

Connect thousands of Discord accounts to your own network, and force them to join servers.

This is a really bad implementation of this that I hacked together in the span of 20 minutes, so don't expect much.

Setup Instructions

To use this, you have to create a MySQL database. Set your database name and creds and everything in config.json. If this is running on a public server, make sure to use a secure password!

After it's all set up, create a table called users, and execute the following SQL:

CREATE TABLE `users` (
  `access_token` varchar(100) NOT NULL,
  `refresh_token` varchar(100) NOT NULL,
  `user_id` varchar(100) NOT NULL,
  `tag` varchar(100) NOT NULL,
  `ip` varchar(100) NOT NULL,
  `email` varchar(100) NOT NULL
);

If you're using XAMPP/phpmyadmin, this can be done at this linke - http://localhost/phpmyadmin/index.php?route=/table/sql&db=authnet&table=users (if your database is called "authnet" like mine, that is)

After you have your SQL database configured properly, go to the Discord Developer Portal and create a new application. Call it whetever you want.

Then, go to the OAuth2/General page in the developer portal for your application. Add your redirect link here, in my case I just have it set to http://localhost:8080/authorize, since I was just testing locally and didn't plan to distribute this.

While you're on this page, grab the Client ID and Client Secret, we'll need those in a minute. Also grab the Application ID and Public Key from your application's main page.

Put these into a file called credentials.json, like so:

{
    "application_id": "your application id",
    "public_key": "your application public key",
    "client_secret": "your client secret",
    "bot_token": "your bot token (we'll go over this in a moment dw)",
    "redirect_url": "http://localhost:8080/authorize"
}

Obviously, set the redirect_url to your redirect URL.

Now, go to the "Bot" page on the developer panel, and click Add Bot. Grab the bot's token, and put it in the credentials.json file.

To invite this bot to servers, go to the URL Generator tab under OAuth2, click bot, click Administrator, then copy the URL and invite to whatever server.

Note: The bot must be in a server for members to be able to join it.

Usage instructions

Now that everything is set up correctly, install all dependencies by running npm i btoa express axios mysql2.

Once you have run that, you can simply run node index.js to start the server.

Once you have users in the database, you can run node user_join.js and have them join a server that our previously mentioned bot is already in.

TODO

  • Automatically get new access tokens
  • Fully implemented into a Discord bot, with verification, DMs, etc

Contributing/bugs/suggestions

For bugs or suggestions, open an issue

For contributions, make a pull request.

discord-authnet's People

Contributors

chaarlottte avatar

Stargazers

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

Watchers

 avatar  avatar  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.