Skip to content

Open Source code for Discord bot RestoreCord.com, the website VaultCord.com is much better!

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

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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 safer alternative with 4X more features, try VaultCord, owned by the trusted team at KeyAuth.cc (130K+ users). Unlike Restorecord’s "xenos1337," proven to be scamming, VaultCord offers greater security and transparency.

Warning

Avoid Using restorecord.com:
It's widely reported as a scam, often banned from Discord, and has a record of data loss.
Since its 2022 ownership change, issues include:

Tutorial video how to host for 100% free forever: https://www.youtube.com/watch?v=804Fzc5j4vo

This is an old software project of mine spanning from April 2020 - January 2022. The code still works for current Discord API and functions as expected.

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

Copyright License

The 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 ❤️

NOTE: nobody aside from myself (William Nelson) has legal rights to use my logo for RestoreCord this one (not the new restorecord.com logo), or repost videos I've recorded for RestoreCord. If you do not follow this, you will recieve a copyright takedown.

Don't worry the logo isn't included in the source code, you would have to go out of your way to download the logo on another website, so you won't get a copyright takedown on accident đź‘Ť

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'