Unable to get member data from users that have left / kicked

Hi, I am trying to get data from members who have left the discord server or have been kicked. But I keep getting undefined errors and I am unsure why here is my code. This only happen in sapphire

@ApplyOptions<Listener.Options>({ event: Events.GuildMemberRemove, name: 'Handle Guild Member Kick/Leave' })
export class MemberRemove extends Listener {
    public async run(guild: Guild, member: PartialGuildMember) {
        console.log(member); }
}
Solution
1. Unrelated to Sapphire
2. You're implementing the event parameters incorrectly, see https://discord.js.org/#/docs/discord.js/main/class/Client?scrollTo=e-guildMemberRemove
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
Discord.js
Was this page helpful?