member.joinedAt = null

When I use the GuildMemberRemove Event the member.joinedAt is null. What am I doing wrong? Intents / Partials:
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildModeration,
],
partials: [
Partials.User,
Partials.Message,
Partials.Channel,
Partials.GuildMember,
],
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildModeration,
],
partials: [
Partials.User,
Partials.Message,
Partials.Channel,
Partials.GuildMember,
],
Event:
const joinedAt = member.joinedTimestamp;
const leftAt = Date.now();
const duration = leftAt - joinedAt;

const embed = new EmbedBuilder()
.setColor("Red")
.setTitle("Mitglied verlassen")
.setDescription(`- \`${member.user.tag}\` [<@${member.user.id}>]`)
.setTimestamp()
.addFields(
{
name: "Beigetreten:",
value:
`<t:${Math.floor(member.joinedTimestamp / 1000)}:F>` ||
member.joinedTimestamp,
inline: true,
},
{
name: "🕛 :",
value: ms(duration, { long: true }),
inline: true,
},
{
name: "Beigetreten (legacy):",
value: `- ${member.joinedAt}`,
inline: true,
}
)
.setFooter({ text: `👥 : ${member.guild.memberCount}` });

channel.send({ embeds: [embed] });
const joinedAt = member.joinedTimestamp;
const leftAt = Date.now();
const duration = leftAt - joinedAt;

const embed = new EmbedBuilder()
.setColor("Red")
.setTitle("Mitglied verlassen")
.setDescription(`- \`${member.user.tag}\` [<@${member.user.id}>]`)
.setTimestamp()
.addFields(
{
name: "Beigetreten:",
value:
`<t:${Math.floor(member.joinedTimestamp / 1000)}:F>` ||
member.joinedTimestamp,
inline: true,
},
{
name: "🕛 :",
value: ms(duration, { long: true }),
inline: true,
},
{
name: "Beigetreten (legacy):",
value: `- ${member.joinedAt}`,
inline: true,
}
)
.setFooter({ text: `👥 : ${member.guild.memberCount}` });

channel.send({ embeds: [embed] });
4 Replies
d.js toolkit
d.js toolkit•2mo 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! - ✅ Marked as resolved by OP
Unknown User
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
Nlmyr
Nlmyr•2mo ago
ok thank you for your info