weridboy_47

Make me a bot to verify roblox accounts and a command to setup the verify panel,command to config the panel text with image adding.and the option to setup a verifed role

Kodari AI
KodariJul 5 at 11:21 pm 11
RobloxVerifyBot
A Discord bot that verifies members' Roblox accounts via a code-in-profile method. Includes a setup command to post a customizable verification panel (title, description, color, image/thumbnail) with a button, a config command to edit panel text and image, and a command to set the role granted upon successful verification. Verified users get their Discord nickname synced to their Roblox username and receive the configured role.

Bot structure:

  • /setuppanel posts the customizable verification embed + Verify button in a chosen channel

  • /configpanel edits title, description, color, image, and thumbnail — live-updates the posted panel

  • /setverifiedrole sets the role granted on success

  • Verify button opens a modal for Roblox username → generates a code the user must place in their Roblox “About” section, then /confirmverify checks it, syncs nickname, and grants the role

Setup: fill .env with DISCORD_TOKEN/CLIENT_ID, run npm install, node deploy-commands.js, then node index.js.

weridboy_47

Ok

Kodari AI
KodariJul 5 at 11:22 pm 1

Bot’s ready to go. Quick recap on getting it running:

  1. npm install

  2. Fill in .env:

    • DISCORD_TOKEN=your_bot_token

    • CLIENT_ID=your_application_id

  3. node deploy-commands.js — registers the slash commands

  4. node index.js — starts the bot

Then in your server:

  • /setuppanel #channel — posts the verify panel with the button

  • /configpanel — edit title/description/color/image/thumbnail (auto-updates the live panel)

  • /setverifiedrole @role — sets which role gets granted on success

Flow for members: click Verify → modal asks for Roblox username → bot gives a code to paste into their Roblox profile “About” section → they run /confirmverify → bot checks it, syncs nickname, assigns the verified role.

Want me to add anything else — like a re-verify cooldown, logging channel for verifications, or blocking already-verified users from re-running it?

weridboy_47

No commands synced

Kodari AI
KodariJul 5 at 11:35 pm 3

This registers commands globally, which can take up to 1 hour to propagate to Discord clients — that’s the most common cause of “no commands synced” even though the script ran successfully.

Let me check a couple things to pin down the actual cause.

Found it — your .env still has the placeholder values, not your real bot credentials:

Plain Text
DISCORD_TOKEN=your_discord_bot_token_here
CLIENT_ID=your_bot_client_id_here

That’s why deploy-commands.js fails (or silently registers to nothing) — it’s not authenticating as your real bot/app.

Fix:

  1. Go to the Discord Developer Portal → your application → Bot tab → copy the token → paste it into DISCORD_TOKEN.

  2. On the same app’s General Information page, copy the Application ID → paste it into CLIENT_ID.

  3. Save .env, then run:

    Plain Text
    node deploy-commands.js
    
  4. Since it registers globally, commands can take up to 1 hour to appear. If you want them instantly for testing, I can switch deploy-commands.js to register to a single guild (Routes.applicationGuildCommands) instead — instant sync, but only shows in that one server.

Want me to switch it to guild-based (instant) registration for testing?

weridboy_47

Make sure commands are in sync

Kodari AI
KodariJul 5 at 11:38 pm 3

Switching to guild-based registration when a GUILD_ID is set (instant sync for testing), falling back to global if not.

To sync instantly for testing:

  1. In .env, add GUILD_ID=your_server_id (enable Developer Mode in Discord → right-click your server → Copy Server ID)

  2. Make sure DISCORD_TOKEN and CLIENT_ID are your real values (not placeholders)

  3. Run node deploy-commands.js — commands appear in that server immediately

For production (all servers): remove/omit GUILD_ID from .env and re-run — it’ll register globally, which takes up to 1 hour to propagate but works everywhere the bot is added.

Kodari can make mistakes. Review important code before using.
Files
commands
interactions
config.json
database.js
deploy-commands.js
index.js
package.json
panelBuilder.js
roblox.js
Code
13 529
index.js
const { Client, GatewayIntentBits, Collection } = require('discord.js');
const fs = require('fs');
const path = require('path');
require('dotenv').config();

const { handleVerifyButton } = require('./interactions/verifyButton');
const { handleVerifyModal } = require('./interactions/verifyModal');

const client = new Client({
    intents: [
        GatewayIntentBits.Guilds,
        GatewayIntentBits.GuildMembers
    ]
});

client.commands = new Collection();

const commandsPath = path.join(__dirname, 'commands');
const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js'));

for (const file of commandFiles) {
    const command = require(path.join(commandsPath, file));
    client.commands.set(command.data.name, command);
}

client.once('ready', () => {
    console.log(`Bot is ready! Logged in as ${client.user.tag}`);
});

client.on('interactionCreate', async interaction => {
    try {
        if (interaction.isChatInputCommand()) {
            const command = client.commands.get(interaction.commandName);
            if (!command) return;
            await command.execute(interaction);
            return;
        }

        if (interaction.isButton()) {
            if (interaction.customId === 'roblox_verify_start') {
                await handleVerifyButton(interaction);
            }
            return;
        }

        if (interaction.isModalSubmit()) {
            if (interaction.customId === 'roblox_verify_modal') {
                await handleVerifyModal(interaction);
            }
            return;
        }
    } catch (error) {
        console.error('Error handling interaction:', error);
        if (interaction.isRepliable()) {
            const errorMessage = { content: 'An error occurred while processing your request.', ephemeral: true };
            if (interaction.deferred || interaction.replied) {
                await interaction.editReply(errorMessage);
            } else {
                await interaction.reply(errorMessage);
            }
        }
    }
});

client.on('error', error => {
    console.error('Client error:', error);
});

client.login(process.env.DISCORD_TOKEN);