embedbuilder is not working ...

try {
// interaction.guild.members.ban(member, {reason: reason});
const EMBED = new EmbedBuilder()
.setTitle(`Ban user:`)
.setAuthor({name: interaction.member.username})
.setTimestamp()
// .setImage(reasonFileURL)
// .addFields(
// {name: ""}
// )
// console.log(reasonFile);
archiveChannel.send({embeds: [EMBED]});

} catch (error) {
console.log(error);
}
try {
// interaction.guild.members.ban(member, {reason: reason});
const EMBED = new EmbedBuilder()
.setTitle(`Ban user:`)
.setAuthor({name: interaction.member.username})
.setTimestamp()
// .setImage(reasonFileURL)
// .addFields(
// {name: ""}
// )
// console.log(reasonFile);
archiveChannel.send({embeds: [EMBED]});

} catch (error) {
console.log(error);
}
9 Replies
d.js toolkit
d.js toolkit2y 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 User2y ago
Message Not Public
Sign In & Join Server To View
الـنَّـهْـشَـلُ
it gives me undefined
treble/luna
treble/luna2y ago
Members dont have usernames, users do
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
الـنَّـهْـشَـلُ
so its interaction.user.username ?
treble/luna
treble/luna2y ago
Yes
الـنَّـهْـشَـلُ
ahaaaa thx thx it worked
Want results from more Discord servers?
Add your server