1. π¦ Prerequisites
Before you begin, verify that your environment meets these critical baseline requirements. Do not skip these.
- Node.js v24 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:
Both commands should return version numbers.
Extracting the Razor Source
- Locate your downloaded Razor Source Code
.zipfile from your 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:
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:
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:
5. π Launch Sequence
With dependencies installed and configurations saved, you are ready for ignition. Run the launch command directly in your terminal:load.js), which initializes the Discord.js ShardingManager and boots the core code (index.js) safely within separate shards for maximum speed and stability.
Watch the terminal. Once you see the successful initialization logs, Razor is online.