Cannot send file

await interaction.reply({
ephemeral: true,
files: skin.map(
(i) =>
new AttachmentBuilder(
Buffer.from(i.file, 'base64'),
{ name: `${i.name}.png` }
)
),
});
await interaction.reply({
ephemeral: true,
files: skin.map(
(i) =>
new AttachmentBuilder(
Buffer.from(i.file, 'base64'),
{ name: `${i.name}.png` }
)
),
});
This code used to work in v13 but now silently fails with an interaction error
11 Replies
d.js docs
d.js docs2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Isra
Isra2y ago
files is an array
Isra
Isra2y ago
It says it’s an array of https://discord.js.org/#/docs/rest/main/typedef/RawFile but this site is blank
Discord.js
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
Isra
Isra2y ago
Discord.js
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
Isra
Isra2y ago
My AttachmentBuilder seems to be valid
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Isra
Isra2y ago
What do you mean for the time being? Is it a bug? There is no error, the interaction just fails. I'm logging debug events and using try catch
Almeida
Almeida2y ago
Since the rest docs on discord.js.org don't work You can use the other site
Isra
Isra2y ago
The client says This interaction failed