What a Discord.js process system actually does
An process system in Discord.js V14 is a bot feature that lets server members submit forms, and the bot collects those responses into a channel or database. The most common version uses modal interactions — when someone clicks a button, a popup form appears, they fill it out, and the bot records what they entered. This is how Discord servers handle job applications, support tickets, event signups, or ban appeals without requiring members to leave Discord.
Discord.js V14 changed how these systems work compared to earlier versions. The library now uses slash commands and interaction handlers instead of older message-based methods. If you have seen a bot ask you to fill out a form inside Discord itself, that is built on the same foundation you are about to learn.
Key Takeaways
- Discord.js V14 uses modals and slash commands to build process systems, which means the form appears as a popup inside Discord rather than as a separate webpage.
- You need to set up a slash command that triggers a button, the button opens a modal, and the modal submission sends the data to a channel or database.
- Modal fields have character limits (short text fields hold 100 characters, long text fields hold 4000), so plan your form questions around those constraints.
- The bot needs permission to send messages in the channel where you want responses stored, and users need permission to use the slash command.
- Testing your system in a private Discord server before deploying it to a public one prevents broken forms from frustrating your actual users.
Setting up your first slash command and button
Start by creating a slash command file in your commands folder. This command will be the entry point — when a user runs it, they see a button. Here is the actual structure:
Create a file called explore.js in your commands directory. Inside, define the slash command using the SlashCommandBuilder from discord.js. The command itself does one thing: it sends a message with a button. When the user clicks that button, the modal will appear. The button needs a custom ID — a unique string that identifies it so your bot knows which button was clicked.
The button's custom ID should be something like apply_button. Later, when the user clicks it, your bot will listen for that specific ID and open the modal. Keep custom IDs short and descriptive because Discord has a 100-character limit on them.
Creating the modal that collects form responses
A modal is the actual form. It contains text input fields, and each field can be either short (single line, up to 100 characters) or long (multiple lines, up to 4000 characters). When you design your form, you need to decide which questions fit in which field type.
Create a separate file to handle the button interaction. When the bot detects that someone clicked the button with ID apply_button, this file runs. Inside it, you create a Modal object, add text input fields to it, and show it to the user. Each field needs its own custom ID — something like name_input, experience_input, why_join_input. These IDs let you pull the user's answers out of the modal submission later.
Discord limits modals to five text input fields per form. If your process needs more than five questions, you will need to build a multi-step system where the first modal leads to a second one, or split the form across multiple commands.
Handling the modal submission and storing responses
When the user fills out the modal and clicks Submit, your bot receives a modalSubmit interaction. This is where you extract the answers and decide what to do with them. The most straightforward approach is to send all the responses to a designated channel so moderators can review them.
Create a file that listens for modal submissions with the ID you set earlier. Inside, use the fields.getTextInputValue() method to pull each answer out by its custom ID. Then create an embed — a formatted message box — that displays the applicant's name, their answers, and a timestamp. Send that embed to your applications channel.
If you want to store responses in a database instead of a channel, the process is the same up to the point where you extract the values. Instead of sending an embed, you would insert a new row into your database with those values. This approach scales better if you expect hundreds of applications.
Setting permissions so users can actually use the system
Your bot needs two kinds of permission to work. First, it needs permission to send messages in the channel where you want responses stored. Second, users need permission to use the slash command itself. Without the second permission, the command will not even appear in their slash command menu.
Set command permissions in your bot's code when you register the slash command. You can restrict it to specific roles — for example, only members with the "Applicant" role can use it. You can also restrict it to specific channels. If you want everyone in the server to see the command, set no restrictions at all.
Test this by logging in as a regular member account and checking whether the command appears. If it does not, check your bot's role permissions and the command's default member permissions in your code.
Testing your system before going live
Build and test your process system in a private Discord server first. Create a test account, run the slash command, fill out the modal, and check whether the response appears in your designated channel. Look for these common problems: the button does not appear, the modal does not open when clicked, the modal opens but fields are blank, or the response message is malformed.
If the button does not appear, check that your slash command file is in the correct folder and that your bot has reloaded it. If the modal does not open, verify that the button's custom ID matches exactly the custom ID you are listening for in your interaction handler — even a single space or typo will break it.
Once everything works in your test server, deploy the command to your main server. You can do this by restarting your bot or by using a reload command if you have built one into your bot's code.
Common problems and how to fix them
The slash command does not appear: Your bot has not registered it yet. Restart your bot or run your deploy command. Wait up to an hour for Discord to sync the command across all servers.
The modal opens but fields are empty: You are not extracting the values correctly. Double-check that the custom IDs in your modal submission handler match exactly the custom IDs you assigned to each field when you created the modal.
The response message does not send: Your bot does not have permission to send messages in that channel. Check the channel permissions and make sure your bot's role is above the channel's restrictions.
Users say the command is not showing up for them: They may not have permission to use it. Check your command's default member permissions and any role-based restrictions you set. If you restricted it to a specific role, make sure they have that role.
Frequently Asked Questions
Can I make a form with more than five questions?
Discord limits each modal to five text input fields. If you need more questions, create a second modal that opens after the first one is submitted. Store the first set of answers temporarily, then combine them with the second set before saving everything.
What happens if someone submits the same process twice?
Discord does not prevent duplicate submissions. If you want to block them, store the user's ID in a database when they submit, then check that database before opening the modal. If they have already submitted, send them a message saying applications are one per person.
Can I send the process responses to a private message instead of a channel?
Yes. Instead of sending the embed to a channel, use interaction.user.send() to send it directly to the applicant, or use client.users.send() with a moderator's user ID to send it to them privately. The code structure is the same.
How do I let applicants see their own submission after they explore?
After you send the response to your applications channel, send a separate message back to the user confirming their submission was received. Include their answers in that confirmation so they can verify everything was recorded correctly.
Can I add buttons or dropdowns to the form instead of just text fields?
Modals only support text input fields. If you want users to choose from a list, use a select menu or buttons before the modal opens — for example, a button that says "explore as a Developer" and another that says "explore as a Moderator", each opening a different modal tailored to that role.