Error with swich case
I have this ticket system but the problem is when i click the "close-button" the message "Cerrando ticket, espere un momento por favor" send but the bot dont change the category of the channel
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 OPconsole.log(ticketType) and show the output of the console here please
in your code , the console log goes in the code
who part? in the index?
right above the switch case would be a nice place to put it
nothing happends, i only got these
where did you put the console.log
okay did the message "cerrando ticket, por favor espere" even show up?
was it sent into the channel?
yes
yes
just place the console.log right below where you destructure ticketType
ready
and happends the same thing
oh no
nvm
i got this
@ShompiFlen
yea
that is what comp was hinting
ticketType doesn't exist on an interaction object nor on a discord.js Interaction
you can't just destructure it from it
but i have these
const ticketType = interaction.values[0];
one thing is not related to the other
and why the tycketType works here
@ShompiFlen
how did you define ticket type there
With the id of the tickets
when we ask these questions of "how did you define" "where is this defined" we ask to see your code
thats the source of truth