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
#Error with swich case
38 messages · Page 1 of 1 (latest)
- What's your exact discord.js
npm list discord.jsand nodenode -vversion? - Not a discord.js issue? Check out #1081585952654360687.
- 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
console.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
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
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
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