How to send files through broadcastEval?

the error is due to an invalid file, the same does not happen when it is sent in the current client
await this.client.shard.broadcastEval(async (shard, { channelId, payload }) => {
const channel = shard.channels.cache.get(channelId);
if (!channel?.isTextBased()) return;
return await channel.send(payload); // files in payload
}, { context: { channelId, payload } });
await this.client.shard.broadcastEval(async (shard, { channelId, payload }) => {
const channel = shard.channels.cache.get(channelId);
if (!channel?.isTextBased()) return;
return await channel.send(payload); // files in payload
}, { context: { channelId, payload } });
4 Replies
d.js toolkit
d.js toolkit9mo 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!
Gorniaky
GorniakyOP9mo ago
payload is type of MessageCreateOptions one AttachmentBuilder with a buffer
Gorniaky
GorniakyOP9mo ago
ok, I'll try... but I just realized there's one more thing I can try
No description
Gorniaky
GorniakyOP9mo ago
sorry thanks
Want results from more Discord servers?
Add your server