So I got an interaction embed using this code :
client.on('interactionCreate', async (interaction) => {
if (!interaction.isButton()) return;
const raidembed = interaction.message.embeds
console.log(raidembed)
And this is what it returns :
[
Embed {
data: {
type: 'rich',
title: 'RAID DU : A :',
image: [Object],
footer: [Object],
fields: [Array],
description: '# Caveau des Incarnationsn### <:skull:1193157255407882340> Normal (:)',
color: 9124820
}
}
]
I need to edit the fields of the embed, and i am currently using the embed.spliceFields()
method.
How do i get to the fields array of the embed array ?
I tried console.log(raidembed.fields)
or console.log(raidembed.data.fields
but they all return “undefined”.
It looks to me like an array inside an object, inside an other object and inside an other array :
[object { object: { array: []}}]
Thanks in advance for your help.