supg
supg
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
imma close this thread
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
alrigth we tried some things and it didnt work, imma just look into this some other time, thx for all of the help though
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
and see how it goes
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
alright we're gonna try to swap to the dev version
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
also whats the package for the discord dev thing?
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
well before we tried UserUpdate and it didnt fire at all but we'll try again
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
gmu
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
only firing when we change the display name, not the actual username
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
but not the actual @ username
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
like the display name
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
and it only fired for a username update
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
we used guildMemberUpdate
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
ok so
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
I just changed username and it didnt work
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
heres the current function, would this work?
client.on('guildMemberUpdate', (oldMember, newMember) => {
debug("UserUpdate event fired");
const oldUsername = oldMember.user.username;
const newUsername = newMember.user.username;

// Check if the username has changed
if (oldUsername !== newUsername) {
// Username has been changed
debug(`User '${oldUsername}' changed their username to '${newUsername}'`);

// You can perform any actions or emit events here based on the username change
eventEmitter.emit('usernameChange', oldUsername);
}
});
client.on('guildMemberUpdate', (oldMember, newMember) => {
debug("UserUpdate event fired");
const oldUsername = oldMember.user.username;
const newUsername = newMember.user.username;

// Check if the username has changed
if (oldUsername !== newUsername) {
// Username has been changed
debug(`User '${oldUsername}' changed their username to '${newUsername}'`);

// You can perform any actions or emit events here based on the username change
eventEmitter.emit('usernameChange', oldUsername);
}
});
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
we already have that intent added
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
alright ill check docs
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
could I use guildMemberUpdate to check the username change of a user
99 replies
DIAdiscord.js - Imagine an app
Created by supg on 6/21/2023 in #djs-questions
userUpdate event is not being emitted
oh it was core package, changing to discord.js works perfectly
99 replies