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 docs3y 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 User3y ago
Message Not Public
Sign In & Join Server To View
Isra
IsraOP3y ago
files is an array
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Isra
IsraOP3y 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
IsraOP3y ago
My AttachmentBuilder seems to be valid
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Isra
IsraOP3y 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
Almeida3y ago
Since the rest docs on discord.js.org don't work You can use the other site
Isra
IsraOP3y ago
The client says This interaction failed
Want results from more Discord servers?
Add your server