Skip to content

Open source Discord data recovery service Restorecord, new website VaultCord.com is better & more updated!

License

Notifications You must be signed in to change notification settings

wnelson03/RestoreCord-Source-Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RestoreCord Source Code

Note

New 2024 Source Code:
The updated Next.js source code (March 2024) is available for download here.
For self-hosting instructions (cheaper/safer!) by @million1156, see this guide.

For a better alternative with 10X the features, try VaultCord, owned by the trusted team at KeyAuth.cc (170K+ users).

This is the source code of my Discord data recovery project during the timeframe April 2020 - January 2022. Code still functions as expected.

Split in 2 languages, PHP & C# - if you prefer a unified code project written in Next.js (Javascript), see the 2024 source code above.

Copyright License

The source code can be used for commercial use if you would like. No attribution needed, though if you insist; it would be appreciated if you credited VaultCord.com ❤️

However, I do not permit use of the distinct name "RestoreCord" or the logo graphic. These aren't avaliable in this repository.

Features

  • Multi server
  • Restore members
  • IP logging
  • Discord webhook notifications
  • Handles rate limits and access token refreshing. Most bots don't and break when you try to pull members, not this.
  • VPN detection/block
  • IP blacklist

How to setup

PHP and MySQL. Should work on most PHP versions. I tested on PHP 7.4 and PHP 8.0, worked on both. You must have a VPS. Shared hosting such as NameCheap will not work, as you have to run c# application also

Please setup your MySQL database now and import the structure from here https://github.com/wnelson03/RestoreCord-Source-Code/blob/main/restorecord_db_schema.sql

Now for c# part

Written for Debian 11

wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update; \
  sudo apt-get install -y apt-transport-https && \
  sudo apt-get update && \
  sudo apt-get install -y dotnet-sdk-5.0 dotnet-runtime-5.0

For this next part make sure you are in the bot's root directory.

dotnet restore
dotnet build

You now have an executable!

Create a service using systemctl, make sure to replace the paths.

[Unit]
Description=Restorecord
After=multi-user.target
[Service]
WorkingDirectory=/path/to/working/directory
ExecStart=/path/to/bot/executable 
SyslogIdentifier=Restorecord
Type=idle
Restart=always
RestartSec=15
RestartPreventExitStatus=0
[Install]
WantedBy=multi-user.target

Once you set this up, the bot should come online and slash commands should work, do / and you'll see slash commands

Here's a YouTube video showing how to use the bot https://nelsoncybersecurity.com/restorecord-tutorial.mp4

How to give yourself lifetime premium (replace yourUsernameHere with your username):

UPDATE `users` SET `role` = 'premium',`expiry` = 2224663363 WHERE `username` = 'yourUsernameHere'