ewimomc

Make me an application bot for staffs and medias just like APPY

Kodari AI
KodariJun 1 at 8:37 pm 17
AppyBot
A Discord staff & media application bot inspired by APPY. Features modal-based application forms for Staff and Media roles, a dedicated review channel where admins can accept or deny submissions with a single click, automatic DM notifications to applicants on decisions, application ID tracking, cooldown system to prevent spam, and persistent JSON storage. Includes slash commands for applying, reviewing, and managing applications.

Hereโ€™s the full application bot:

Plan:

  • index.js โ€” bot entry, loads handlers

  • deploy-commands.js โ€” registers slash commands

  • config.json โ€” channel IDs, role IDs, questions

  • commands/apply.js โ€” /apply with staff/media subcommands

  • commands/applications.js โ€” /applications list & view

  • commands/config.js โ€” /setconfig for admins

  • handlers/interactionHandler.js โ€” routes commands, modals, buttons

  • utils/database.js โ€” JSON persistence

  • utils/embeds.js โ€” shared embed builders

  • utils/cooldown.js โ€” per-user cooldown tracker

  • package.json + .env


Hereโ€™s a full breakdown of everything built:

๐Ÿ“ File Structure

Plain Text
AppyBot/
โ”œโ”€โ”€ index.js                  # Bot entry point
โ”œโ”€โ”€ deploy-commands.js        # Register slash commands
โ”œโ”€โ”€ config.json               # Channel/role IDs & questions
โ”œโ”€โ”€ .env                      # Bot token
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ commands/
โ”‚   โ”œโ”€โ”€ apply.js              # /apply staff | media
โ”‚   โ”œโ”€โ”€ applications.js       # /applications list | view
โ”‚   โ””โ”€โ”€ setconfig.js          # /setconfig (admin)
โ”œโ”€โ”€ handlers/
โ”‚   โ”œโ”€โ”€ interactionHandler.js # Routes all interactions
โ”‚   โ”œโ”€โ”€ commandHandler.js     # Slash command router
โ”‚   โ”œโ”€โ”€ modalHandler.js       # Processes submitted forms
โ”‚   โ””โ”€โ”€ buttonHandler.js      # Accept/Deny/Hold buttons
โ””โ”€โ”€ utils/
    โ”œโ”€โ”€ database.js           # JSON persistence layer
    โ”œโ”€โ”€ embeds.js             # All embed builders
    โ”œโ”€โ”€ cooldown.js           # Per-user cooldown logic
    โ””โ”€โ”€ commandLoader.js      # Auto-loads commands/

โš™๏ธ Setup Steps

  1. npm install

  2. Fill in .env with your bot token, client ID, and guild ID

  3. node deploy-commands.js to register slash commands

  4. node index.js to start the bot

  5. Use /setconfig staff_channel, media_channel, staff_role, media_role to configure

โœจ Features

Feature
Details
/apply staff
&
/apply media
Opens a 5-question modal form
Review channel
Applications post with
Accept / Deny / On Hold
buttons
DM notifications
Applicant is DMโ€™d the result automatically
Auto role assign
Grants the configured role on acceptance
Cooldown system
Prevents spam (configurable, default 24h)
/applications list
View all pending apps, filterable by type
/applications view <id>
Inspect any application by ID
/setconfig
Full admin config via slash commands
Data persistence
Stored in
data/applications.json
ewimomc

do you want the bot toekn and guild id to make it work?

Kodari AI
KodariJun 1 at 8:38 pm 2

Iโ€™m Kodari, powered by a mix of frontier models that evolves over time. I donโ€™t share which model is running โ€” but I do want to keep you safe! ๐Ÿ”’

Please do NOT share your bot token with me. Hereโ€™s why:

  • Your bot token is like a password โ€” anyone with it has full control of your bot

  • Tokens shared in chat can be logged, leaked, or compromised

  • Discord will automatically invalidate tokens it detects posted publicly

โœ… How to set it up yourself (takes 30 seconds):

  1. Open the .env file in your project

  2. Fill it in like this:

Env
DISCORD_TOKEN=your_token_here
CLIENT_ID=your_client_id_here
GUILD_ID=your_guild_id_here

Where to find these values:

Value
Where to find it
DISCORD_TOKEN
โ†’ Your App โ†’
Bot
โ†’
Reset Token
CLIENT_ID
Developer Portal โ†’ Your App โ†’
General Information
โ†’ Application ID
GUILD_ID
Right-click your server in Discord โ†’
Copy Server ID
(needs Developer Mode on)
  1. Then run:

Shell
node deploy-commands.js
node index.js

The bot will be live! If you run into any errors or the commands donโ€™t show up, paste the error message here and Iโ€™ll fix it. ๐Ÿš€

ewimomc

DISCORD_TOKEN=<redacted> CLIENT_ID=1511107124179243078 GUILD_ID=1511107443529220356

Kodari AI
KodariJun 1 at 8:42 pm 1

โš ๏ธ Heads up โ€” please reset your token immediately!

You just shared your bot token publicly in this chat. Treat it as compromised. Hereโ€™s what to do right now:

๐Ÿšจ Reset Your Token (Do This First)

  1. Select your application โ†’ click Bot in the sidebar

  2. Click Reset Token โ†’ confirm

  3. Copy the new token


โœ… Then fill in your .env like this:

Env
DISCORD_TOKEN=YOUR_NEW_TOKEN_HERE
CLIENT_ID=1511107124179243078
GUILD_ID=1511107443529220356

Your Client ID and Guild ID are fine โ€” those arenโ€™t sensitive. Only the token needs to be reset.


I do not store, use, or transmit your credentials โ€” but this chat could be visible to others, and Discordโ€™s own systems may have already detected and invalidated the token. Resetting it takes 10 seconds and keeps your bot safe. ๐Ÿ”’

Once youโ€™ve reset it and filled in .env, run:

Shell
node deploy-commands.js
node index.js

Let me know if you hit any errors! ๐Ÿš€

ewimomc

where to find .env

Kodari AI
KodariJun 1 at 8:43 pm 1

The .env file is in the root folder of your project โ€” the same folder as index.js and package.json.

๐Ÿ“ It should look like this:

Plain Text
AppyBot/
โ”œโ”€โ”€ .env           โ† right here
โ”œโ”€โ”€ index.js
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ config.json
โ””โ”€โ”€ ...

๐Ÿ” Canโ€™t see it?

.env files are hidden by default on most systems. Hereโ€™s how to find/open it:

Windows (VS Code) โ€” Recommended

  1. Open the project folder in VS Code

  2. Look in the file explorer on the left โ€” .env should be there

  3. Click it and edit directly

Windows (File Explorer)

  1. Open the folder

  2. Click View โ†’ check Hidden items

  3. Youโ€™ll see .env appear

If it doesnโ€™t exist at all

Create it manually:

  1. In VS Code โ†’ right-click the root folder โ†’ New File

  2. Name it exactly .env (dot included, no extension)

  3. Paste this in:

Env
DISCORD_TOKEN=YOUR_NEW_TOKEN_HERE
CLIENT_ID=1511107124179243078
GUILD_ID=1511107443529220356

Once thatโ€™s saved, run in your terminal:

Shell
node deploy-commands.js
node index.js

Let me know what happens! ๐Ÿš€

Kodari can make mistakes. Review important code before using.
Files
commands
handlers
utils
config.json
deploy-commands.js
index.js
package.json
Code
15 850
index.js
const { Client, GatewayIntentBits, Collection } = require('discord.js');
require('dotenv').config();

const { handleInteraction } = require('./handlers/interactionHandler');
const { loadCommands } = require('./utils/commandLoader');

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

client.commands = new Collection();
loadCommands(client);

client.once('ready', () => {
    console.log(`โœ… Logged in as ${client.user.tag}`);
    console.log(`๐Ÿ“‹ Serving ${client.guilds.cache.size} guild(s)`);
    client.user.setActivity('/apply | Applications Open', { type: 3 });
});

client.on('interactionCreate', async (interaction) => {
    try {
        await handleInteraction(client, interaction);
    } catch (error) {
        console.error('Unhandled interaction error:', error);
    }
});

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

client.login(process.env.DISCORD_TOKEN);