itzmetechu

Kodari AI Prompt — Generate a Production-Ready Discord Verification & Whitelist Bot

You are an expert backend engineer specializing in Discord bots, Minecraft server integration, and TypeScript.

Generate a production-ready, enterprise-grade Discord bot named UW Verify for Underworld SMP using Node.js 22 LTS, TypeScript, and discord.js v14.

The bot must be modular, secure, scalable, and optimized for large Discord communities. Follow SOLID principles and modern best practices.

---

Overview

UW Verify is a complete Discord verification system that automatically verifies new members, links their Minecraft Java Edition account with Discord, asks verification questions, and automatically whitelists them on a Paper Minecraft server after successful verification.

The verification process must be fully automated and require no staff intervention.

---

Bot Information

Create the following command:

/info

The command should display a premium embed containing:

Bot Name UW Verify

Version 1.0.0

Developer ItzMeTechu

Purpose Premium Discord Verification & Minecraft Whitelist Bot

Built With Node.js 22 TypeScript discord.js v14

Minecraft Support Paper Purpur Spigot Velocity

License Private

Status Production Ready

Footer Developed by ItzMeTechu

---

Verification Flow

When a new user joins the Discord server:

Automatically send a welcome message.

Ask them to click a Verify button.

After clicking Verify, begin an interactive verification process.

---

Verification Questions

Ask the questions one by one using Discord buttons, modals, or select menus.

Example flow:

  1. What is your Minecraft Java username?

Validate that the username format is valid.

  1. What country are you from?
  1. How old are you?
  1. Have you read the server rules?

Buttons:

✅ Yes

❌ No

If No, provide the rules before continuing.

  1. What is your favorite Minecraft activity?

• Survival

• PvP

• Building

• Redstone

• Exploration

  1. Confirm all entered information.

Buttons:

Confirm

Cancel

---

Minecraft Account Linking

Link the Discord account with the Minecraft username.

Store:

Discord User ID

Discord Username

Minecraft Username

Verification Date

Verification Status

Whitelist Status

Unique Verification ID

Prevent duplicate Minecraft usernames.

Prevent one Discord account from linking multiple Minecraft accounts unless enabled in the configuration.

---

Automatic Whitelist

After successful verification:

Automatically whitelist the Minecraft account.

Support multiple methods:

• Paper whitelist.json

• Console command

• RCON

• REST API

• Plugin API

Example command:

whitelist add %player%

After completion:

Give the user the Verified role.

Remove the Unverified role.

Send a success embed.

---

Premium Success Embed

Display:

✅ Verification Complete

Minecraft Username

Whitelist Status

Verification Time

Discord Account Linked

Instructions on how to join the server

Server IP

Version

Footer:

Welcome to Underworld SMP

---

Failed Verification

If verification fails:

Explain why.

Allow retry after a configurable cooldown.

Log every failed attempt.

---

Premium Embeds

Every embed should feature:

Premium red and black theme

Professional field layout

Status icons

Footer

Timestamp

Optional server logo thumbnail

No plain text responses.

---

Slash Commands

/verify /info /link /unlink /profile /status /whitelist /rules /help /reload

Admin Commands:

/forceverify /forcewhitelist /resetuser /unverify /export /import

---

Logging

Log the following events to a Discord log channel:

User joined

Verification started

Verification completed

Verification failed

Whitelist added

Whitelist removed

Username changed

Role assigned

Errors

Staff actions

Logs must use premium embeds.

---

Database

Use PostgreSQL by default with optional SQLite support.

Create tables for:

Users

Minecraft Accounts

Verification History

Whitelist History

Audit Logs

Settings

---

Configuration

Generate clean configuration files:

config.yml

questions.yml

messages.yml

roles.yml

database.yml

minecraft.yml

logging.yml

embeds.yml

No source code edits should be required after installation.

---

Security

Implement:

Rate limiting

Permission checks

Secure environment variables

Input validation

Duplicate detection

Webhook protection

Audit logging

Exception handling

---

Performance

Fully asynchronous architecture

Connection pooling

Caching

Automatic retries

Optimized database queries

Low memory usage

Support thousands of users

---

Folder Structure

Generate a clean project structure with separate folders for:

Commands

Events

Buttons

Modals

Services

Database

Minecraft Integration

Logging

Utilities

Configuration

Embeds

Middleware

---

Deliverables

Generate the complete production-ready project including:

  • Full TypeScript source code
  • Complete folder structure
  • package.json
  • tsconfig.json
  • Docker support
  • Docker Compose
  • Environment example (.env.example)
  • Database schema and migrations
  • README.md
  • Installation guide
  • Configuration guide
  • Example configuration files
  • Unit tests
  • Deployment guide

The generated project must compile without errors, be immediately deployable, follow modern coding standards, and provide a polished, premium verification experience for Minecraft communities.

Kodari AI
KodariJul 26 at 3:08 pm 11
UWVerify
UW Verify is a production-ready Discord verification and Minecraft whitelist bot for Underworld SMP. It guides members through an interactive Minecraft account verification flow, validates usernames and profile details, stores verification history in PostgreSQL, prevents duplicate account links, automatically manages whitelist entries through Paper files, commands, RCON, or REST APIs, assigns verified roles, records premium audit logs, and provides administrative tools for user management, exports, imports, and moderation.
itzmetechu

How to link with discord bot

Kodari AI
KodariJul 26 at 3:10 pm 1

To connect UW Verify to your Discord server:

1. Create the Discord application

  1. Click New Application.

  2. Name it UW Verify.

  3. Open Bot → Add Bot.

  4. Copy the bot token.

Never publish or share this token.

2. Configure the environment

Copy the example environment file:

Shell
cp .env.example .env

Set your token:

Env
DISCORD_TOKEN=your_discord_bot_token
DISCORD_CLIENT_ID=your_application_id
DISCORD_GUILD_ID=your_server_id

For PostgreSQL, configure the database variables as well:

Env
DATABASE_URL=postgresql://uwverify:password@localhost:5432/uwverify

3. Enable required intents

In the Developer Portal, open Bot → Privileged Gateway Intents and enable:

  • Server Members Intent

  • Message Content Intent, if required by your implementation

The bot should use at least these Discord intents:

Typescript
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessages

4. Invite the bot

Open OAuth2 → URL Generator.

Select scopes:

  • bot

  • applications.commands

Recommended permissions:

  • View Channels

  • Send Messages

  • Embed Links

  • Use Application Commands

  • Manage Roles

  • Read Message History

Open the generated URL and select your Discord server.

The bot’s role must be placed above both the Verified and Unverified roles in:

Server Settings → Roles

5. Configure server IDs

Find the relevant IDs using Discord Developer Mode:

User Settings → Advanced → Developer Mode

Right-click and copy IDs for:

  • Verification channel

  • Log channel

  • Verified role

  • Unverified role

Add them to the configuration files, for example:

YAML
# config/roles.yml
verified: "YOUR_VERIFIED_ROLE_ID"
unverified: "YOUR_UNVERIFIED_ROLE_ID"
YAML
# config/logging.yml
channelId: "YOUR_LOG_CHANNEL_ID"

6. Start the bot

Install dependencies:

Shell
npm install

Run database migrations:

Shell
npm run db:migrate

Start the bot in development:

Shell
npm run dev

Or build and run it in production:

Shell
npm run build
npm start

When connected, the bot should appear online and register commands such as:

Plain Text
/info
/verify
/rules
/help

7. Minecraft account linking

Members can use:

Plain Text
/link

They then provide their Minecraft Java username and complete the verification questions. After successful verification, UW Verify can:

  1. Store the Discord–Minecraft link.

  2. Add the Minecraft username to the whitelist.

  3. Assign the Verified role.

  4. Remove the Unverified role.

  5. Send a success embed.

  6. Record the event in the Discord log channel.

For Minecraft connectivity, configure one of the supported methods in config/minecraft.yml:

YAML
method: "command"
command: "whitelist add %player%"
serverIp: "play.example.com"
serverVersion: "1.20.4"

For RCON, use environment variables instead of putting credentials directly in configuration files:

Env
RCON_HOST=127.0.0.1
RCON_PORT=25575
RCON_PASSWORD=your_secure_rcon_password

If you meant linking your Minecraft account to the Discord bot, use /link. If you meant inviting the bot to your Discord server, follow the OAuth2 invitation steps above.

itzmetechu

How export this bot

Kodari AI
KodariJul 26 at 3:38 pm 1

You can export UW Verify in two ways:

1. Export the bot source code

From the project directory:

Shell
npm install
npm run build

Create a ZIP archive without secrets or dependencies:

Linux/macOS

Shell
zip -r uw-verify.zip . \
  -x "node_modules/*" \
     "dist/*" \
     ".env" \
     "*.log"

Windows PowerShell

Powershell
Compress-Archive `
  -Path package.json,tsconfig.json,src,config,database,Dockerfile,docker-compose.yml,README.md,.env.example `
  -DestinationPath uw-verify.zip

Do not include:

Plain Text
.env
node_modules/
dist/

The .env file contains your Discord token and database credentials.

2. Export the PostgreSQL database

Export all verification data:

Shell
pg_dump "$DATABASE_URL" --format=custom --file=uw-verify-backup.dump

Restore it later with:

Shell
pg_restore \
  --clean \
  --if-exists \
  --dbname="$DATABASE_URL" \
  uw-verify-backup.dump

If PostgreSQL is running through Docker:

Shell
docker compose exec postgres \
  pg_dump -U uwverify -d uwverify > uw-verify-backup.sql

Restore:

Shell
cat uw-verify-backup.sql | \
  docker compose exec -T postgres \
  psql -U uwverify -d uwverify

3. Export through the Discord bot

Administrators can use:

Plain Text
/export

This should generate a JSON or CSV export of users, Minecraft links, verification history, whitelist history, and audit logs.

The command must be restricted to trusted administrators and should send the export as a private ephemeral response or protected file. Never export Discord tokens, database passwords, RCON passwords, or other secrets.

4. Move the bot to another server

On the new server:

Shell
unzip uw-verify.zip
cp .env.example .env
npm install
npm run db:migrate
npm run build
npm start

Then update .env with the new Discord application credentials and configure the new server’s channel and role IDs. The bot must also be invited to the new Discord server using the bot and applications.commands OAuth2 scopes.

itzmetechu

How to use this bot from here

Kodari AI
KodariJul 26 at 3:39 pm 1

To use UW Verify from this project, you must run it on your computer or a VPS. The chat workspace does not keep the bot online automatically.

1. Open the project folder

Download/export the project, extract it, and open a terminal inside the project directory:

Shell
cd UWVerify

2. Create the environment file

Shell
cp .env.example .env

On Windows PowerShell:

Powershell
Copy-Item .env.example .env

Edit .env:

Env
DISCORD_TOKEN=your_bot_token
DISCORD_CLIENT_ID=your_application_id
DISCORD_GUILD_ID=your_server_id
DATABASE_URL=postgresql://uwverify:strong_password@postgres:5432/uwverify

Never share .env or your bot token.

3. Configure Discord

In the Discord Developer Portal:

  1. Create or open the UW Verify application.

  2. Create the bot and copy its token.

  3. Enable Server Members Intent.

  4. Invite it with the scopes:

    • bot

    • applications.commands

  5. Grant these permissions:

    • View Channels

    • Send Messages

    • Embed Links

    • Use Application Commands

    • Manage Roles

    • Read Message History

Place the bot’s role above the Verified and Unverified roles.

4. Configure the server

Replace the placeholders in the configuration files:

YAML
# config/roles.yml
verified: "VERIFIED_ROLE_ID"
unverified: "UNVERIFIED_ROLE_ID"
YAML
# config/logging.yml
channelId: "LOG_CHANNEL_ID"

Also configure the verification channel, server IP, Minecraft version, and whitelist method in the appropriate files.

Enable Developer Mode in Discord to copy channel, role, and server IDs.

5. Start with Docker

If Docker is installed, the easiest option is:

Shell
docker compose up -d --build

Check the logs:

Shell
docker compose logs -f bot

Stop the bot:

Shell
docker compose down

6. Start without Docker

Install Node.js 22, then run:

Shell
npm install
npm run db:migrate
npm run build
npm start

For development:

Shell
npm run dev

When the bot is running, it should appear online in Discord and register commands.

7. Use the bot in Discord

Available commands include:

Plain Text
/info
/verify
/link
/profile
/status
/rules
/help

Administrators can use:

Plain Text
/whitelist
/forceverify
/forcewhitelist
/resetuser
/unverify
/export
/import
/reload

Normal verification works like this:

  1. A member joins the server.

  2. UW Verify sends the welcome message.

  3. The member clicks Verify.

  4. They enter their Minecraft Java username and answer the questions.

  5. The bot checks for duplicate accounts.

  6. The Minecraft username is whitelisted.

  7. The Verified role is assigned.

  8. The Unverified role is removed.

  9. A completion message is sent.

8. Keep it online permanently

For production, run it on a VPS using Docker, such as an Ubuntu server. After connecting through SSH:

Shell
git clone YOUR_PROJECT_URL
cd UWVerify
cp .env.example .env
nano .env
docker compose up -d --build

The bot must remain running on the VPS for automatic join messages, verification, logging, and whitelist updates to work.

itzmetechu

I am using via a hosting

Kodari AI
KodariJul 26 at 3:39 pm 1

If you are using a hosting provider, run the bot on a hosting plan that supports Node.js applications or Docker. Normal website hosting cannot keep a Discord bot online.

Using Node.js hosting

  1. Upload the bot project files to your hosting panel.

  2. Do not upload:

    • .env

    • node_modules

  3. Create the environment variables in the hosting panel:

Env
DISCORD_TOKEN=your_discord_bot_token
DISCORD_CLIENT_ID=your_application_id
DISCORD_GUILD_ID=your_discord_server_id
DATABASE_URL=your_database_connection_string
  1. Set the Node.js version to the version required by the project, preferably Node.js 20 or newer.

  2. Run the install command:

Shell
npm install
  1. Build the bot if the project has a build script:

Shell
npm run build
  1. Set the startup command to one of these, depending on package.json:

Shell
npm start

or:

Shell
node dist/bot.js

or:

Shell
node dist/index.js

For development-only projects:

Shell
npm run dev

Use npm start for production whenever possible.

If your hosting uses Pterodactyl

Create a Node.js server, upload the project files, then set:

Plain Text
Install command: npm install
Startup command: npm start

Add the .env values under the server’s Variables section, or upload a manually created .env file if your host supports it.

Then start the server and check the console. A successful connection normally shows a message similar to:

Plain Text
Logged in as YourBot#0000

Database requirement

If the bot uses PostgreSQL, your host must provide PostgreSQL or allow an external database. Add its connection URL:

Env
DATABASE_URL=postgresql://username:password@host:5432/database

Run migrations if the project includes them:

Shell
npm run db:migrate

Important

  • Keep the Discord token private.

  • The bot must remain running; do not close the hosting console if it is not managed by a process manager.

  • Invite the bot to your Discord server using the OAuth2 URL.

  • Enable Server Members Intent in the Discord Developer Portal.

  • Make sure the bot has permission to view channels, send messages, use commands, and manage roles.

  • Place the bot role above the Verified and Unverified roles.

If you provide the hosting provider name or a screenshot of its startup settings, I can give you the exact upload path, startup command, and environment-variable setup.

itzmetechu

Give me a tutorial to make this bot run in a hosting

Kodari AI
KodariJul 26 at 3:41 pm 2

Tutorial: Run Your Discord Bot on Hosting

This tutorial is for hosting panels that support Node.js, such as a game panel, VPS, Railway, Render, or similar services.

1. Prepare the bot files

On your computer, make sure the project contains files such as:

Plain Text
package.json
tsconfig.json
src/
.env.example

Do not upload these:

Plain Text
.env
node_modules/

Create a ZIP file of the project without those files.

If your bot has TypeScript source files, your package.json should contain scripts similar to:

JSON
{
  "scripts": {
    "build": "tsc",
    "start": "node dist/bot.js",
    "dev": "ts-node src/bot.ts"
  }
}

The actual output file might be dist/index.js instead of dist/bot.js. Check your project before setting the startup command.

2. Create the Discord bot

  1. Click New Application.

  2. Open Bot.

  3. Click Add Bot.

  4. Copy the bot token.

  5. Enable Server Members Intent if your bot manages roles or members.

  6. Enable Message Content Intent if your bot reads normal messages.

Never post the bot token publicly.

3. Invite the bot to your server

In the Developer Portal:

  1. Open OAuth2 → URL Generator.

  2. Select:

Plain Text
bot
applications.commands
  1. Give the bot the permissions it needs:

Plain Text
View Channels
Send Messages
Embed Links
Read Message History
Use Application Commands
Manage Roles
  1. Open the generated URL.

  2. Select your Discord server.

  3. Authorize the bot.

Make sure the bot’s role is above any roles it needs to assign.

4. Upload the bot to your hosting

In your hosting panel:

  1. Create a new Node.js server or application.

  2. Upload the ZIP file.

  3. Extract the ZIP into the main server directory.

  4. Make sure package.json is in the main directory, not inside an extra folder.

Correct:

Plain Text
/home/container/package.json
/home/container/src/

Incorrect:

Plain Text
/home/container/my-bot/package.json

If the files are inside an extra folder, move them into the main server directory.

5. Select the Node.js version

Use Node.js 20 or newer if the project supports it.

Recommended:

Plain Text
Node.js 20

or:

Plain Text
Node.js 22

Avoid using an old Node.js version because modern discord.js versions require a recent version of Node.js.

6. Install dependencies

Open the hosting console and run:

Shell
npm install

If the project uses TypeScript, build it:

Shell
npm run build

This should create a dist folder.

7. Add environment variables

Create environment variables in the hosting panel, or create a .env file if your host supports it.

Example:

Env
DISCORD_TOKEN=YOUR_DISCORD_BOT_TOKEN
DISCORD_CLIENT_ID=YOUR_APPLICATION_ID
DISCORD_GUILD_ID=YOUR_DISCORD_SERVER_ID

If the bot uses a database, also add its database URL:

Env
DATABASE_URL=YOUR_DATABASE_CONNECTION_STRING

If the bot connects to Minecraft through RCON, add:

Env
RCON_HOST=your-minecraft-server-ip
RCON_PORT=25575
RCON_PASSWORD=your-rcon-password

Do not add quotation marks unless your hosting provider requires them.

8. Set the startup command

Use the command that matches the project.

For a compiled TypeScript bot:

Shell
npm start

If there is no start script, use the actual compiled file:

Shell
node dist/bot.js

or:

Shell
node dist/index.js

For a JavaScript bot:

Shell
node bot.js

For development only:

Shell
npm run dev

The recommended production setup is:

Shell
npm install
npm run build
npm start

9. Configure the hosting panel

Typical settings should be:

Plain Text
Install command: npm install
Build command: npm run build
Start command: npm start
Node version: 20 or newer

Some hosting panels only have a startup command. In that case, use:

Shell
npm install && npm run build && npm start

Do not use npm run dev permanently if the host supports a production build.

10. Start the bot

Click Start in the hosting panel.

A successful console should show something similar to:

Plain Text
Logged in as YourBot
Bot is ready

The bot should now appear online in Discord.

11. Register slash commands

If your project has a command deployment script, run it once:

Shell
npm run deploy

or:

Shell
npm run register

If neither command exists, slash commands may be registered automatically when the bot starts.

After registering commands, wait a few minutes or restart Discord. Guild-specific commands usually appear faster than global commands.

12. Configure roles and channels

Enable Developer Mode in Discord:

  1. Open User Settings.

  2. Select Advanced.

  3. Enable Developer Mode.

  4. Right-click the server, channel, or role.

  5. Select Copy ID.

Use those IDs in your bot configuration, for example:

Env
VERIFIED_ROLE_ID=your_verified_role_id
UNVERIFIED_ROLE_ID=your_unverified_role_id
VERIFICATION_CHANNEL_ID=your_channel_id
LOG_CHANNEL_ID=your_log_channel_id

The exact variable names depend on your project.

13. If the bot needs PostgreSQL

Your hosting must provide a PostgreSQL database or allow an external database.

Add the connection string:

Env
DATABASE_URL=postgresql://username:password@hostname:5432/database_name

Then run the project’s migration command if it has one:

Shell
npm run db:migrate

Possible alternatives are:

Shell
npm run migrate

or:

Shell
npx prisma migrate deploy

Only use the command that exists in your package.json.

14. Check logs if it does not start

Cannot find module

Run:

Shell
npm install

Then rebuild:

Shell
npm run build

Missing DISCORD_TOKEN

The environment variable is missing or incorrectly named. Add:

Env
DISCORD_TOKEN=your_token

Then restart the application.

Invalid token

Generate a new token in:

Plain Text
Discord Developer Portal → Your Application → Bot → Reset Token

Update the hosting variable and restart the bot.

Used disallowed intents

Enable the required intents in the Discord Developer Portal and restart the bot.

Cannot find dist/index.js

The bot was not built or the startup file is wrong. Run:

Shell
npm run build

Then check whether the output file is:

Plain Text
dist/index.js

or:

Plain Text
dist/bot.js

Update the startup command accordingly.

The bot is online but commands do not work

Check that:

  • The bot was invited with applications.commands.

  • The bot has permission to use commands.

  • DISCORD_CLIENT_ID is correct.

  • DISCORD_GUILD_ID is correct.

  • Slash commands were deployed.

  • The bot was restarted after changing configuration.

15. Keep the bot online

Use a hosting plan that runs continuously. Free website hosting may stop applications after inactivity.

For a panel or VPS, make sure:

  • The server is not manually stopped.

  • Auto-restart is enabled.

  • The bot process is configured as the main process.

  • Environment variables are saved permanently.

  • Database access is allowed from the hosting server.

The basic production process is:

Shell
npm install
npm run build
npm start

If you tell me the name of your hosting provider or send a screenshot of its startup/install settings, I can give you the exact commands for that hosting panel.

Kodari can make mistakes. Review important code before using.
Files
config
database
src
tests
.gitignore
docker-compose.yml
Dockerfile
package.json
README.md
tsconfig.json
Code
33 1,818
src/commands/public.ts
import {
  ActionRowBuilder,
  ButtonBuilder,
  ButtonStyle,
  EmbedBuilder,
  PermissionFlagsBits,
  SlashCommandBuilder
} from 'discord.js';
import { premiumEmbed } from '../embeds/embeds.js';
import type { BotCommand, CommandContext } from '../types.js';
import { verifyButtonRow } from '../buttons/verificationButtons.js';

export function publicCommands(): BotCommand[] {
  return [
    {
      data: new SlashCommandBuilder().setName('info').setDescription('Display information about UW Verify'),
      async execute(interaction, context) {
        const embed = premiumEmbed(context.config, 'UW Verify', 'Premium Discord Verification & Minecraft Whitelist Bot')
          .addFields(
            { name: 'Version', value: '1.0.0', inline: true },
            { name: 'Developer', value: 'ItzMeTechu', inline: true },
            { name: 'Built With', value: 'Node.js 22\nTypeScript\ndiscord.js v14', inline: true },
            { name: 'Minecraft Support', value: 'Paper\nPurpur\nSpigot\nVelocity', inline: true },
            { name: 'License', value: 'Private', inline: true },
            { name: 'Status', value: 'Production Ready', inline: true }
          )
          .setFooter({ text: 'Developed by ItzMeTechu' });
        await interaction.reply({ embeds: [embed] });
      }
    },
    {
      data: new SlashCommandBuilder().setName('verify').setDescription('Start Discord and Minecraft verification'),
      async execute(interaction, context) {
        await interaction.reply({
          embeds: [premiumEmbed(context.config, '✅ Begin Verification', 'Click the button below to link your Minecraft Java account.')],
          components: [verifyButtonRow()],
          ephemeral: true
        });
      }
    },
    {
      data: new SlashCommandBuilder().setName('link').setDescription('Open the Minecraft account linking flow'),
      async execute(interaction, context) {
        await interaction.reply({
          embeds: [premiumEmbed(context.config, '🔗 Link Minecraft Account', 'Use the button below to securely link your account.')],
          components: [verifyButtonRow()],
          ephemeral: true
        });
      }
    },
    {
      data: new SlashCommandBuilder().setName('profile').setDescription('View your linked Minecraft profile'),
      async execute(interaction, context) {
        const profile = await context.database.findByDiscordId(interaction.user.id);
        if (!profile) {
          await interaction.reply({ embeds: [premiumEmbed(context.config, '👤 Profile', 'No Minecraft account is linked to your Discord account.')], ephemeral: true });
          return;
        }
        await interaction.reply({
          embeds: [
            premiumEmbed(context.config, '👤 Your Profile')
              .addFields(
                { name: 'Minecraft Username', value: profile.minecraftUsername, inline: true },
                { name: 'Verification Status', value: profile.verificationStatus, inline: true },
                { name: 'Whitelist Status', value: profile.whitelistStatus, inline: true },
                { name: 'Verification ID', value: profile.verificationId, inline: false }
              )
          ],
          ephemeral: true
        });
      }
    },
    {
      data: new SlashCommandBuilder().setName('status').setDescription('Check your verification status'),
      async execute(interaction, context) {
        const profile = await context.database.findByDiscordId(interaction.user.id);
        await interaction.reply({
          embeds: [
            premiumEmbed(
              context.config,
              '📊 Verification Status',
              profile
                ? `✅ Linked to **${profile.minecraftUsername}**\nWhitelist: **${profile.whitelistStatus}**`
                : '❌ Your Discord account is not verified.'
            )
          ],
          ephemeral: true
        });
      }
    },
    {
      data: new SlashCommandBuilder()
        .setName('unlink')
        .setDescription('Unlink your Minecraft account')
        .setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild),
      async execute(interaction, context) {
        const profile = await context.database.findByDiscordId(interaction.user.id);
        if (!profile) {
          await interaction.reply({ embeds: [premiumEmbed(context.config, '🔗 Unlink Account', 'No linked account was found.')], ephemeral: true });
          return;
        }
        await context.whitelist.remove(profile.minecraftUsername);
        await context.database.unlink(interaction.user.id);
        await context.logger.log('Username Changed', 'A Minecraft account was unlinked.', {
          Minecraft: profile.minecraftUsername
        }, interaction.user.id, interaction.user.id);
        await interaction.reply({ embeds: [premiumEmbed(context.config, '✅ Account Unlinked', 'Your Minecraft account has been unlinked.')], ephemeral: true });
      }
    },
    {
      data: new SlashCommandBuilder().setName('rules').setDescription('Display the Underworld SMP rules'),
      async execute(interaction, context) {
        await interaction.reply({ embeds: [premiumEmbed(context.config, '📖 Underworld SMP Rules', context.config.messages.rulesText)] });
      }
    },
    {
      data: new SlashCommandBuilder().setName('help').setDescription('Display available commands'),
      async execute(interaction, context) {
        await interaction.reply({
          embeds: [
            premiumEmbed(context.config, '❓ UW Verify Help')
              .setDescription('Use the following commands to manage your verification.')
              .addFields(
                { name: 'Verification', value: '`/verify` · `/link` · `/profile` · `/status`', inline: false },
                { name: 'Information', value: '`/info` · `/rules` · `/help`', inline: false },
                { name: 'Staff', value: '`/whitelist` · `/reload` · `/resetuser` · `/unverify`', inline: false }
              )
          ]
        });
      }
    },
    {
      data: new SlashCommandBuilder()
        .setName('whitelist')
        .setDescription('Manage a Minecraft whitelist entry')
        .addStringOption((option) => option.setName('username').setDescription('Minecraft username').setRequired(true))
        .setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild),
      async execute(interaction, context) {
        const username = interaction.options.getString('username', true);
        const result = await context.whitelist.add(username);
        await context.logger.log('Whitelist Added', result.details, {
          Minecraft: username,
          Status: result.status
        }, interaction.user.id, interaction.user.id);
        await interaction.reply({
          embeds: [premiumEmbed(context.config, result.status === 'added' ? '✅ Whitelist Added' : '❌ Whitelist Failed', result.details)],
          ephemeral: true
        });
      }
    },
    {
      data: new SlashCommandBuilder()
        .setName('reload')
        .setDescription('Reload operational configuration')
        .setDefaultMemberPermissions(PermissionFlagsBits.ManageGuild),
      async execute(interaction, context) {
        await context.logger.log('Staff Action', 'Configuration reload requested.', {}, interaction.user.id, null);
        await interaction.reply({ embeds: [premiumEmbed(context.config, '🔄 Reload Requested', 'Restart the bot after editing configuration files to apply all settings.')], ephemeral: true });
      }
    }
  ];
}