Slash Commands

Hey i'm a new dev with discord.js, i know basics but i can't find what goes wrong with my code for slash commands
27 Replies
d.js toolkit
d.js toolkit7mo 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! - Marked as resolved by OP
d.js docs
d.js docs7mo ago
To share long code snippets, use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks or files.
HydrA2F/ミズさん
sorry
HydrA2F/ミズさん
Gist
My bot code
My bot code. GitHub Gist: instantly share code, notes, and snippets.
HydrA2F/ミズさん
my /clear command won't work too i let you see if i'm just bad at coding or if there's a real problem i'm using adkynet for hosting my bot btw
duck
duck7mo ago
it'd also be helpful if you could actually describe your issue do you receive any errors? how does your bot behave? when you say your /clear command won't work too, are you referring to its execution or are you having trouble deploying it? (#how-to-get-help)
HydrA2F/ミズさん
. I don't have any errors . My /ticket won't show my '.setRequired(true)' and i can't get "topic" . My /clear command is not showed in slash commands of my bot so i think it's not correctly deploy
HydrA2F/ミズさん
the only one i get but i don't have text after /ticket on black background color
HydrA2F/ミズさん
like this :
No description
duck
duck7mo ago
. My /ticket won't show my '.setRequired(true)' and i can't get "topic"
what exactly do you mean by "won't show my .setRequired(true)? do you mean that the option appears when attempting to use the ticket command but it appears to be optional? what do you mean by 'i can't get "topic"'? is it that you've logged theme and see that it's null?
My /clear command is not showed in slash commands of my bot so i think it's not correctly deploy
have you run deploy-command.js again? do you receive any errors when doing so? have you confirmed that your commands array is properly populated?
HydrA2F/ミズさん
1st one : i want the little text in white on black after command's name 2nd : i want to get what's in the "topic" string right after command name and yes i see "null" 3rd : i don't know why i can't run commands on cmd of my host
treble/luna
treble/luna7mo ago
your bot process is already running So that other node is totally ignored Either stop your bot or open a new terminal
HydrA2F/ミズさん
when my bot is stopped and i write the command it's not showed in terminal
HydrA2F/ミズさん
sorry if i'm doing things wrong
treble/luna
treble/luna7mo ago
i dont know whether you can run node commands in ptero you'll have to try locally (or find a proper host that supports termina' commands)
HydrA2F/ミズさん
it will work if i'm trying it locally and after i run using my host ?
treble/luna
treble/luna7mo ago
yes
HydrA2F/ミズさん
ok i'll try
treble/luna
treble/luna7mo ago
you only need to deploy if you change command data
HydrA2F/ミズさん
oooh ok
HydrA2F/ミズさん
when i run it locally :
No description
treble/luna
treble/luna7mo ago
Isnt that what you want
HydrA2F/ミズさん
thanks for all and sorry for this i know that i need to do that now thx ! ❤️