Sameer Somya

Rashtriya Rifles (31st) Discord Bot

A custom-built Discord bot designed for immersive, realistic military roleplay and simulation for the Rashtriya Rifles (31st) Roblox community. This bot focuses on military discipline, chain of command, and permanent data records.

Features

Setup Instructions

1. Discord Developer Portal

  1. Go to the Discord Developer Portal.
  2. Create a new Application and add a Bot.
  3. Under the Bot tab, enable the following Privileged Gateway Intents:
    • Server Members Intent
    • Message Content Intent
  4. Copy the Bot Token.

2. Environment Variables

Create a .env file in the root directory with the following configuration:

DISCORD_TOKEN=your_bot_token_here
PREFIX=!
GUILD_ID=your_discord_server_id_here
DB_CHANNEL_ID=your_database_channel_id_here
CLIENT_ID=your_bot_client_id_here

Note: Ensure the DB_CHANNEL_ID points to a private text channel where the bot has read, send, and attach files permissions. No regular members should have access to this channel.

3. Discord Roles

The bot automatically syncs rank and loadout assignments with Discord roles. For this feature to work, you must create roles in your server matching exactly the names configured in src/utils/military.js.

Ranks (Lowest to Highest):

Loadouts:

4. Running the Bot

Before running the bot for the first time, you must deploy the slash commands to your server:

npm install
node src/deploy-commands.js

Then start the bot:

node src/index.js

Commands