Nxbula
Nxbula
DIAdiscord.js - Imagine an app
Created by Nxbula on 11/9/2023 in #djs-questions
14.9.0 Client.on('guildMemberUpdate') Problem
Hello! I am on discord js 14.9.0 and I am trying to use client.on('guildMemberUpdate') within an event file. The documentation says that there are two parameters, oldMember, and newMember. When I try to use the paramaters, I get the oldMember parameter working, but the newMember parameter returns undefined. Code snippet:
module.exports = {name: Events.GuildMemberUpdate,
async execute(oldMember: GuildMember, newMember: GuildMember)
{
console.log(oldMember) // Returns the member before role changes
console.log(newMember) // Returns undefined
}}
module.exports = {name: Events.GuildMemberUpdate,
async execute(oldMember: GuildMember, newMember: GuildMember)
{
console.log(oldMember) // Returns the member before role changes
console.log(newMember) // Returns undefined
}}
45 replies