error with dm channel awaitmessage

let dmChannel = interaction.user.dmChannel
if (!dmChannel) dmChannel = await interaction.user.createDM()

const filter = m => m.author.id === interaction.user.id && m.channel.type === 1
const collector = dmChannel.createMessageCollector({ filter, time: 600000 })
let dmChannel = interaction.user.dmChannel
if (!dmChannel) dmChannel = await interaction.user.createDM()

const filter = m => m.author.id === interaction.user.id && m.channel.type === 1
const collector = dmChannel.createMessageCollector({ filter, time: 600000 })
5 Replies
d.js toolkit
d.js toolkit•3mo ago
Mark
MarkOP•3mo ago
No description
Amgelo
Amgelo•3mo ago
that looks like an error from an editReply not something with the code you shared and it's not the full error either
Mark
MarkOP•3mo ago
ill check well i jump from component v2 to content only
await interaction.deferReply({ flags: [MessageFlags.Ephemeral] })

await interaction.editReply({ components: [container], flags: [MessageFlags.IsComponentsV2] })

to

await interaction.editReply({ content: '📩 Check your DMs to continue the upload' })
await interaction.deferReply({ flags: [MessageFlags.Ephemeral] })

await interaction.editReply({ components: [container], flags: [MessageFlags.IsComponentsV2] })

to

await interaction.editReply({ content: '📩 Check your DMs to continue the upload' })
this is 3 replies only
Amgelo
Amgelo•3mo ago
you can't editReply with content if your message uses cv2 you can't reverse the cv2 state from a message, once it has the flag you can't unset it and cv2 messages can't have a content, use a text display component it's important you not only share the code but also the full error, you would've noticed long ago it's not coming from that snippet you shared initially but from the editReply

Did you find this page helpful?