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,
  ],


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] });
Was this page helpful?