Developer Guild Commands
In this page, we will show you how to create commands only visible in the developer guild.
# The handler function (src/functions)
Setup
Folder Setup and .env configuration
Create a folder called dev
in the src
folder. This is where you will put in the commands for the developer server only. Keep in mind that they are ONLY visible in the server NO WHERE ELSE! Also the code checks if the interaction.user.id
is in the developer array. And dont forget to add
to your .env file. Also there is no need to add devOnly: true,
in the command export.
interactionCreate.js edits
Edit your src/events/interactionCreate.js
by adding this into the code:
Deploying commands
Deploying commands work in the same way as the regular command deploy method. You can also create subfolders named like you want to sort them better and then use the regular setup for a command.
Last updated