Private therth not work

Pleas help me Code:
const client = require('../../client.js')

const {EmbedBuilder, StringSelectMenuBuilder, ButtonBuilder, ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle, ChannelType, ThreadAutoArchiveDuration, channel} = require('discord.js')

client.on('interactionCreate', async interaction => {
if (interaction.isButton()){
if (interaction.customId === 'ticket_create'){

await interaction.channel.threads.create({
name: 'Ticket',
autoArchiveDuration: ThreadAutoArchiveDuration.OneDay,
reason: 'System',
type: ChannelType.PrivateThread,

});


}
}
})
const client = require('../../client.js')

const {EmbedBuilder, StringSelectMenuBuilder, ButtonBuilder, ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle, ChannelType, ThreadAutoArchiveDuration, channel} = require('discord.js')

client.on('interactionCreate', async interaction => {
if (interaction.isButton()){
if (interaction.customId === 'ticket_create'){

await interaction.channel.threads.create({
name: 'Ticket',
autoArchiveDuration: ThreadAutoArchiveDuration.OneDay,
reason: 'System',
type: ChannelType.PrivateThread,

});


}
}
})
7 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!
monbrey
monbrey3mo ago
In what way does it not work
Raay
RaayOP3mo ago
I am owner from the Server but i dont can see it
monbrey
monbrey3mo ago
have you checked that this function runs
Raay
RaayOP3mo ago
No Oh i bekom a error API Error 50035 Invalid Form Body how i can fix it?
monbrey
monbrey3mo ago
Sharing all of the error would be a good start
Raay
RaayOP3mo ago
I have fix it thanks
Want results from more Discord servers?
Add your server