#
Setup Guide
Follow this comprehensive, step-by-step master guide to compile, configure, and launch your very own instance of Razor from the source code.
#
1. 📦 Prerequisites
Before you begin, verify that your environment meets these critical baseline requirements. Do not skip these.
- Node.js v20 LTS (or higher) — Required runtime environment.
- Git / Source Control — Highly recommended for code maintenance.
- Visual Studio Code — Industry standard code editor.
- MongoDB Atlas — Free cloud database cluster for storing bot data.
- Discord Developer Portal — To generate your
Bot TokenandClient ID.
#
2. 📥 Environment Preparation
#
Installing Node.js
- Download the LTS (Long Term Support) installer from nodejs.org.
- Run the executable. When prompted, ensure that "npm package manager" is selected for installation.
Once completed, verify your installation by opening your terminal (or command prompt) and executing:
node -v npm -vBoth commands should return version numbers.
#
Extracting the Razor Source
- Locate your downloaded Razor Source Code
.zipfile from your BuiltByBit purchase. - Extract the archive contents into a dedicated project directory (e.g.,
C:\RazorBot). - Open this folder within Visual Studio Code.
#
3. ⚙️ Dependency Compilation
To build the bot's architecture, you must install the required Node.js packages.
Open an integrated terminal right inside Visual Studio Code (Ctrl + ~ or Terminal -> New Terminal) and run:
npm install
Resolving Conflicts
If npm encounters peer dependency conflicts or permissions issues, forcefully resolve them by using:
npm install --force
#
4. 📝 Core Configuration
Razor requires two primary configuration files to boot successfully.
#
System Configuration (config.js)
Locate config.js in the root directory. This dictates global variables:
module.exports = {
prefix: '!', // Fallback prefix for legacy commands
ownerID: '123456789012345678', // Your personal Discord User ID
// Additional module settings follow...
};
#
Environment Variables (.env)
- In the root directory, locate the file named
.env.example. - Rename this file simply to
.env(ensure there is no file extension like .txt). - Populate it with your sensitive credentials strictly:
token=YOUR_SECURE_BOT_TOKEN
mongodbURL=mongodb+srv://user:pass@cluster.mongodb.net/?retryWrites=true&w=majority
clientId=YOUR_BOT_APPLICATION_ID
developerId=YOUR_DISCORD_USER_ID
licensekey=YOUR_RAZOR_LICENSE_KEY
#
5. 🚀 Launch Sequence
With dependencies installed and configurations saved, you are ready for ignition.
Run the launch command directly in your terminal:
npm start
Alternatively: node load.js
Watch the terminal. Once you see the successful initialization logs, Razor is online.