Trying to create a transcript

I use discord-html-transcripts to try to get a transcript of the current channel sent to a different one. Image shows what the error seems to be, but I have no idea what it means </3 Code:
const attachment = await discordTranscripts.createTranscript(interaction.channel, {
limit: -1, // Max amount of messages to fetch. `-1` recursively fetches.
returnType: 'attachment', // Valid options: 'buffer' | 'string' | 'attachment' Default: 'attachment' OR use the enum ExportReturnType
filename: interaction.channel.name + '.html', // Only valid with returnType is 'attachment'. Name of attachment.
saveImages: true, // Download all images and include the image data in the HTML (allows viewing the image even after it has been deleted) (! WILL INCREASE FILE SIZE !)
footerText: "reached the end of {number} message{s}", // Change text at footer, don't forget to put {number} to show how much messages got exported, and {s} for plural
poweredBy: false // Whether to include the "Powered by discord-html-transcripts" footer
});
const channelyum = client.channels.cache.get('1071512112997879821'); //channel to send it in

console.log('yo creating a transcript');
await interaction.reply('Creating a transcript... (please wait)');

channelyum.send({
files: [attachment],
});

interaction.channel.send('Transcript saved!');
const attachment = await discordTranscripts.createTranscript(interaction.channel, {
limit: -1, // Max amount of messages to fetch. `-1` recursively fetches.
returnType: 'attachment', // Valid options: 'buffer' | 'string' | 'attachment' Default: 'attachment' OR use the enum ExportReturnType
filename: interaction.channel.name + '.html', // Only valid with returnType is 'attachment'. Name of attachment.
saveImages: true, // Download all images and include the image data in the HTML (allows viewing the image even after it has been deleted) (! WILL INCREASE FILE SIZE !)
footerText: "reached the end of {number} message{s}", // Change text at footer, don't forget to put {number} to show how much messages got exported, and {s} for plural
poweredBy: false // Whether to include the "Powered by discord-html-transcripts" footer
});
const channelyum = client.channels.cache.get('1071512112997879821'); //channel to send it in

console.log('yo creating a transcript');
await interaction.reply('Creating a transcript... (please wait)');

channelyum.send({
files: [attachment],
});

interaction.channel.send('Transcript saved!');
The 'yo creating a transcript' sends, but not the 'Creating a transcript... (please wait)'. It also works in some channels, but not others. Any help would be greatly appreciated -- thank you so much!!
No description
4 Replies
d.js toolkit
d.js toolkit2mo 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! - Marked as resolved by OP
cinnamew ✿
cinnamew ✿OP2mo ago
ack i wasn't sure what to tag so i taggd node as well but that's prob not applicable here?
d.js docs
d.js docs2mo ago
Common causes of DiscordAPIError[10062]: Unknown interaction: - Initial response took more than 3 seconds ➞ defer the response *. - Wrong interaction object inside a collector. - Two processes handling the same command (the first consumes the interaction, so it won't be valid for the other instance) * Note: you cannot defer modal or autocomplete value responses
cinnamew ✿
cinnamew ✿OP2mo ago
Thank you so much!! That fixed the issue :))
Want results from more Discord servers?
Add your server