How can I create a private thread? ([email protected])

I tried this type: "GUILD_PRIVATE_THREAD" and that type: ChannelType.PrivateThread, both didn't work. Thanks for help!
5 Replies
d.js toolkit
d.js toolkit10mo 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!
darp
darp10mo ago
error?
Abwegig
AbwegigOP10mo ago
no error in both cases
darp
darp10mo ago
show code
Abwegig
AbwegigOP10mo ago
if (interaction.customId === "selectReasonMenu") { const selectedValue = interaction.values[0]; console.log(Ausgewählter Wert: ${selectedValue}); interaction.channel.threads .create({ name: Ticket - ${selectedValue}, autoArchiveDuration: 1440, type: ChannelType.PrivateThread, reason: Thread für das Ticket mit dem Grund: ${selectedValue}, startMessage: interaction.message, }) .then(async (thread) => { const threadChannel = await interaction.guild.channels.fetch( thread.id ); await thread.members.add(interaction.user.id); }) .catch(console.error); } okay, thanks
Want results from more Discord servers?
Add your server