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
- 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 OPsorry
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
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)
. 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
the only one i get but i don't have text after /ticket on black background color
like this :
. 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 deployhave you run deploy-command.js again? do you receive any errors when doing so? have you confirmed that your
commands
array is properly populated?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
your bot process is already running
So that other node is totally ignored
Either stop your bot or open a new terminal
when my bot is stopped and i write the command it's not showed in terminal
sorry if i'm doing things wrong
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)
it will work if i'm trying it locally and after i run using my host ?
yes
ok i'll try
you only need to deploy if you change command data
oooh ok
when i run it locally :
Isnt that what you want
thanks for all and sorry for this
i know that i need to do that now thx !
❤️