webhook.send({ username: client.user.displayName, avatarURL: client.user.displayAvatarURL(), embeds: embed, files: attachments ?? [], components: components ?? [] }).then(res => { if (res instanceof ArrayBuffer) { console.log("Received ArrayBuffer:"); console.log(Buffer.from(res).toString()); } else { console.log(res); } }) .catch(console.error); type sendLogMessageWithEmbedParams = { webhook: WebhookClient, client: ShardingClient, embed: EmbedBuilder[], attachments?: AttachmentBuilder[], components?: ActionRowBuilder[] };