I am trying to set the parameters to be optional with a default setup, I tried to make this but it shows cannot read properties of undefined (reading 'author')
client.embed = ({
author = client.user,
}) => {
const embed = new EmbedBuilder()
.setDescription("test")
if (author) embed.setAuthor({ name: author.username })
return embed
}```