.addChoices and name_localizations

Hello, I have big problems with 2 orders containing . addChoices, here are the screens, if a charitable soul can @ to propose an idea I’m taking:) I have a good look in my folder AutoModeration and are the only two commands with an . addChoices
No description
No description
No description
11 Replies
d.js toolkit
d.js toolkit3mo 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!
NyR
NyR3mo ago
Why are you using OR (||) operator there :waitWhat: ? Also name_localizations: is a property, not a function
👔 | Homme Bleu
👔 | Homme BleuOP3mo ago
name_localizations gives me exactly the same error 😦
treble/luna
treble/luna3mo ago
Show your updated code
👔 | Homme Bleu
👔 | Homme BleuOP3mo ago
No description
No description
treble/luna
treble/luna3mo ago
again name_localizations isnt a function didnt see the :
👔 | Homme Bleu
👔 | Homme BleuOP3mo ago
folder Automoderation
No description
👔 | Homme Bleu
👔 | Homme BleuOP3mo ago
and my folder...
No description
👔 | Homme Bleu
👔 | Homme BleuOP3mo ago
well I find... I forgot to fill my name_localizations of another command I think
👔 | Homme Bleu
👔 | Homme BleuOP3mo ago
little question in this code, is it possible that if a file poses problem, it tells me in the console directly that it is the file? https://sourceb.in/LaGVfwcTp1
SourceBin
handlersCommands.js
Instantly share your code with the world.
👔 | Homme Bleu
👔 | Homme BleuOP3mo ago
:5692peepofinecry: but this line
if (command.name) {
client.commands.set(command.name, command);
table.addRow(fileName, folder, `Chargé` || `Non chargé`);
} else {
table.addRow(fileName, folder, `Chargé` || `Non chargé`);
continue;
}
if (command.name) {
client.commands.set(command.name, command);
table.addRow(fileName, folder, `Chargé` || `Non chargé`);
} else {
table.addRow(fileName, folder, `Chargé` || `Non chargé`);
continue;
}
Is it possible that he tells me Not loaded if a file is problematic? how can I modify all code so that it displays me a if (command.name) a file with problems?
Want results from more Discord servers?
Add your server