Razor supports optional addons to extend the botโ€™s core functionality. This guide walks you through installing addons and setting up the premium Advanced Anti-Nuke Addon and the Playlist Manager Addon.

๐Ÿ› ๏ธ Addon Installation Methods

There are two ways you can install addons to your Razor bot workspace. Choose the method that best fits your development preference.
1

Option 1: Drag & Drop the Whole Folder (Recommended)

This is the cleanest and easiest method. It keeps addon files modular and separated in a dedicated addons directory.
  1. Locate the downloaded addon folder (e.g., Anti-Nuke Addon).
  2. Drag and drop the entire folder into the Addons/ directory located in the root of your main Razor bot files.
๐Ÿ“ฆ Razor Bot
 โ”ฃ ๐Ÿ“‚ Addons
 โ”ƒ โ”— ๐Ÿ“‚ Anti-Nuke Addon  <-- Placed here!
 โ”ฃ ๐Ÿ“‚ Commands
 โ”ฃ ๐Ÿ“‚ Events
 โ”— ...
2

Option 2: Drag & Drop Folder Contents (Merge Directories)

This method integrates the addon files directly into the botโ€™s core directories.
  1. Open the downloaded addon folder.
  2. Drag and drop the individual subfolders (Commands, Dashboard, Events, Schemas, Systems) directly into the root directory of your main Razor bot (Razor v2.0.8).
  3. If prompted, select Merge or Replace files to integrate them cleanly into the matching system paths.

๐Ÿ›ก๏ธ Addon 1: Advanced Anti-Nuke

The Advanced Anti-Nuke Addon protects your Discord servers against rogue administrators, compromised accounts, and malicious nukers with 13 dedicated protection modules.

โš ๏ธ Critical Fix Required (index.js)

Version ConstraintThis manual patch is only required if you are running Razor v2.0.6 or below. For Razor v2.0.7 and Razor v2.0.8 Beta, this safeguard is already natively integrated into your core codebase, and you can skip this step.
Because the new antiNukeSystem.js loads extremely early in the application lifecycle, you must update your core index.js file to prevent the bot from crashing during initialization if you are using an older version:
1

Locate Systems Loading Block

Open your main index.js file and search (Ctrl + F) for the following loop loading the bot systems:
for (const file of systemFiles) {
  const system = require(path.join(systemsPath, file));
  system(client);
  loadedSystemsCount++;
}
2

Apply the Safeguard Patch

Replace the code block above with the updated version below. This adds a safeguard check to verify that the loaded file exports a function before executing it:
for (const file of systemFiles) {
  const system = require(path.join(systemsPath, file));
  if (typeof system === 'function') {
    system(client);
  }
  loadedSystemsCount++;
}
3

Restart the Bot

Save the changes and restart the bot process via your terminal:
node .

โš™๏ธ Anti-Nuke Configuration & Usage

Once the addon is loaded, server owners can fully manage the protection configurations directly from Discord using the /antinuke command suite.

๐ŸŽฎ Anti-Nuke Slash Commands

System Setup

Turn the system on and set your logging channel and action punishment (e.g., Ban, Kick, Quarantine, Timeout).
/antinuke setup log_channel:#security-logs punishment:Ban

Enable Protections

Toggle specific modules. There are 13 protection modules available (e.g., Anti Channel Delete).
/antinuke enable protection:Anti Channel Delete

Configure Thresholds

Set how many actions trigger a punishment.
/antinuke threshold protection:Anti Channel Delete count:3 time_window:10

Whitelist System

Whitelist trusted administrators, staff, or helper bots so they bypass limitations.
/antinuke whitelist add user_or_bot:@trusted_admin
Use /antinuke status to get a beautiful, interactive visual grid listing all active protections, current threshold configurations, and whitelist status on your server!

๐Ÿ“ฆ 13 Protection Modules Covered

  • Anti Channel Delete/Create โ€” Blocks rogue channel deletions and spawns.
  • Role Delete/Create โ€” Prevents mass deleting or creating roles to bypass hierarchy.
  • Emoji Delete โ€” Shields custom server emojis from deletion.
  • Bans & Kicks Tracking โ€” Halts rapid bans/kicks performed by compromised staff accounts.
  • Pruning Prevention โ€” Intercepts and stops member list pruning actions.
  • Unapproved Bot Adds โ€” Immediately bans/kicks any unverified bots added without approval.
  • Webhook Create/Delete โ€” Prevents rogue webhooks from being created to bypass channel security.
  • @Everyone/@Here Mention Spam โ€” Automatically silences and punishes users spamming global mentions.
  • Guild Updates โ€” Reverts unapproved server name, description, banner, or vanity URL changes.

๐ŸŽต Addon 2: Playlist Manager

The Playlist Addon allows users to create, delete, share, and manage custom music playlists stored directly in your MongoDB database, loading them dynamically into the voice queue.

๐Ÿ› ๏ธ Installation Instructions

Choose one of the two installation methods below:

โš™๏ธ Playlist Usage & Commands

Once the addon is loaded, users can manage their private playlists using the /playlist slash command suite.

๐ŸŽฎ Playlist Command Suite

Playlist Creation

Create a new custom playlist (maximum of 10 playlists per user, names capped at 10 characters).
/playlist create name:myfavs

Save Current Track

Save the song currently playing in the voice channel directly to your playlist.
/playlist addcurrent playlist_name:myfavs

Save Entire Queue

Append all songs currently in the voice channelโ€™s queue to your custom playlist.
/playlist addqueue playlist_name:myfavs

Search & Add Tracks

Search for a song title or URL and select one from the top 5 results to add.
/playlist addtrack playlist_name:myfavs track_name:Lofi Hip Hop

Load Playlist to Queue

Join a voice channel and load all tracks from your custom playlist directly into the active queue.
/playlist load playlist_name:myfavs

Manage Playlists

Rename, inspect list of tracks (with interactive buttons for paginated navigation), remove individual tracks, or delete.
/playlist list
/playlist info playlist_name:myfavs
/playlist rename old_name:myfavs new_name:gaming
/playlist removetrack playlist_name:gaming track_number:2
/playlist delete name:gaming