All commands are not showing in the command list in the server

for some reason the only slash command that doesnt show is the spamming slash command
30 Replies
d.js toolkit
d.js toolkit3w ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
mr.everything
mr.everythingOP3w ago
require('dotenv').config(); const { Client, GatewayIntentBits } = require('discord.js'); const { setupCensorSystem } = require('./censor'); // (assuming censor system) const { setupMuteSystem } = require('./spamming'); // Import mute system (from spamming.js) const { setupUnmuteSystem } = require('./unmute'); // Import unmute system const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent], }); client.once('ready', () => { console.log(Logged in as ${client.user.tag}); setupCensorSystem(client); // Assuming censor system setupMuteSystem(client); // Setup mute system from spamming.js setupUnmuteSystem(client); // Setup unmute system }); client.login(process.env.TOKEN);
mr.everything
mr.everythingOP3w ago
im confused
Amgelo
Amgelo3w ago
about which part?
mr.everything
mr.everythingOP3w ago
this
Amgelo
Amgelo3w ago
you have this inside your command
mr.everything
mr.everythingOP3w ago
wdym command
Amgelo
Amgelo3w ago
that overrides all commands with the ones you're passing the file you sent
mr.everything
mr.everythingOP3w ago
how do I fix it which file
Amgelo
Amgelo3w ago
the only file you sent we don't know how it's called you sent it as "message.txt"
mr.everything
mr.everythingOP3w ago
its called spamming.js
Amgelo
Amgelo3w ago
well, that
mr.everything
mr.everythingOP3w ago
so what do I fix in it
Amgelo
Amgelo3w ago
don't set all commands in that callback
mr.everything
mr.everythingOP3w ago
and how can I make sure in the future that all the commands will show
Amgelo
Amgelo3w ago
by not setting all commands to a single one
mr.everything
mr.everythingOP3w ago
how do I fix this so all the commands in one file?
d.js docs
d.js docs3w ago
:guide: Creating Your Bot: Registering slash commands The command deployment script, to register your slash commands with Discord so they appear in the interface. read more
mr.everything
mr.everythingOP3w ago
the command is in its own file I didnt decide it
Amgelo
Amgelo3w ago
then?
mr.everything
mr.everythingOP3w ago
i used chat gpt how do I do this
Amgelo
Amgelo3w ago
the AI itself doesn't understand the answers it gives, and often it's not even correct
mr.everything
mr.everythingOP3w ago
No description
mr.everything
mr.everythingOP3w ago
@Qjuh i set it up but im getting a error called command.toJSON is not a function how do I fix this can you send the link to the guide @Qjuh its not helping I read it when I do node deploy-commands.js nothing happens I set up the code and I followed the steps
Amgelo
Amgelo3w ago
does it log anything at all? if not then you might've not saved your file
mr.everything
mr.everythingOP3w ago
oh yeah ur right I didnt save it
mr.everything
mr.everythingOP3w ago
No description
mr.everything
mr.everythingOP3w ago
this is what I got yeah how do I fix this
d.js docs
d.js docs3w ago
:guide: Creating Your Bot: Creating slash commands - Individual command files read more

Did you find this page helpful?