Git Product home page Git Product logo

discord-baker's Introduction

🤑Discord-backer🤑

A open-source Discord member backup and restore tool for your server. This bot gets users to Authorize themselves upon joining your server, and then later on, if your server is raided, or deleted, you can rejoin all the users who Authorized to a new server.

You will need is a discord application, and a bot within said application. You will also need a server, and a role to be given to users that verify. You will also need a way to host the API. We recommend a VPS from this seller.

🛑IMPORTANT NOTICE🛑

TO USE MULTIPLE SERVERS THE VERIFIED ROLE NEEDS TO HAVE ON BOTH SERVERS THE SAME ROLE NAME

INSTALL THIS FIRST:

pip install git+https://github.com/Pycord-Development/pycord
pip install flask[async]

AUTOMATED Setup

Run setup.py and enter your ACCOUNT TOKEN and the server relevent stuff, add your bot to the server and the setup is done. credits to @swishyw for the oauth.py file.

1. Setup

First, we are gonna need your discord bot token, Client ID, Client Secret. This we can do at the discord developers site Now we are gonna make a new application

opera_F9NGA2EeV9

Once we have our application set up, we are gonna click on OAuth2, here we will find our Client ID, Secret Token, and our redirect URL. These we will need for later so save them.

opera_vXfFJ1nWUU

Finally, we are going to need a bot token. Watch this video if you need help.

Redirect

Now, we need to allow a redirect to our domain/api. Add a new redirect for the following:

opera_f22iKehJjl We are done on the discord developers site for now.

PART 1 - Installation FLASK API

First install the requirements:

pip install -r requirements.txt

Then, open setup.py. It will ask you for the following: CLIENT_ID, CLIENT_SECRET, CLIENT_TOKEN (your bot's token), DOMAIN, Member-role (name of the role eg verified).

Say yes to running the API.

PART 2 - Installation DISCORD BOT

INFO❗: This whole process is routed via the API (application.py), thus you can code the bot yourself.

Change directories to the DISCORD BOT folder, then run bot.py

Starting the system

You will need the program running 24/7, again, we recommend a VPS from this seller.

First, run application.py Secondly, if you see no errors, move to the DISCORD BOT folder and run bot.py

If no errors are shown, you are good to go! make sure your bot is in your server, and has administrator permissions. (also make sure it's role is at the top of the role list)

Make sure to let @everyone only see a single channel where they cant type, and in said channel, write a message that goes along the lines of "Check your DMs with @(your bots name) to verify.".

To restore users who have verified:

  • restart the API (application.py) and the BOT
  • run !restore YOURRESTOREKEY

The bot will attempt to add back all users who have authorized and are in the database.

Endnote

Please Star this repo if you like it! This project has taken and continues to take lots of time! <3 Add me if you need more help: haze#2603

Roadmap

List of things i'm planning to add:

  • Web GUI for restoring/backuping the members
  • Telegram bot For restoring/backuping
  • Command less verify (give roles as soon as user authorizes)

Advanced

Feel free to modify this code, but remember to credit this repo.

discord-baker's People

Contributors

aspect2222 avatar mrgrupprr avatar mte0 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.