userUpdate event is not being emitted
I want to have an UpdateUser event but I got an intents error.
46 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Here's my code, any idea on why it wont work?
its supposed to detect username changes, but it wont even run in the first place
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
so do I just do oldMember.username?
also, the event doesent fire at all
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
alright thanks for the tip
but the event wont fire at all
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yeah
the setup seems fine according to docs
other commands and event work
for example the ready event work fine
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
all of the events are being handled in the root file, index.js
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
hold on lemme grab it
here
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
sure 1 sec
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
stringifying it returns an empty object
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yes
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
no
console.log didnt work either
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
1 sec
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
there was also no errors
seems like the event just didnt get recognised
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
alright gimme a moment
Please add the following code to your code base outside of any other event listeners and provide the full log output relevant to your issue.
- Note: if you initialize your Client as
bot
or other identifiers you need to use these instead of client
- If the output is too long to post consider using a bin instead: gist | paste.gg | sourceb.in | hastebinUnknown User•2y ago
Message Not Public
Sign In & Join Server To View
also the "messageCreate" event doesent work
ill try this
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
MAIN [WS => Manager] Fetched Gateway Information
MAIN URL: wss://gateway.discord.gg
MAIN Recommended Shards: 1 +313ms
MAIN [WS => Manager] Session Limit Information
MAIN Total: 1000
MAIN Remaining: 996 +0ms
MAIN [WS => Shard 0] Connecting to wss://gateway.discord.gg?v=10&encoding=json +1ms
MAIN [WS => Shard 0] Waiting for event hello for 60000ms +4ms
MAIN [WS => Shard 0] Preparing first heartbeat of the connection with a jitter of 0.8242820102342703; waiting 34001ms +178ms
MAIN [WS => Shard 0] Waiting for identify throttle +1ms
MAIN [WS => Shard 0] Identifying
MAIN shard id: 0
MAIN shard count: 1
MAIN intents: 37379
MAIN compression: none +1ms
MAIN [WS => Shard 0] Waiting for event ready for 15000ms +1ms
MAIN [WS => Shard 0] Shard received all its guilds. Marking as fully ready. +202ms
MAIN Logged in as bot1#4088! +1ms
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yep
but the onmessage and onuserupdate event doesent
its weird
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
14.11.0
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
no, the error turned out to be because I added some random GatewayDispatchEvents thing inside of the intents list
that was an issue made by me
good call ^
I just tried changing the username of my alt, that is in the same server as my bot. Nothing printed
oh ok messageCreate event seems to work fine
so its only the userupdate event
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
so what would I use to check if a user's name updated?
which one?
and I'd still use the UserUpdate event?
the docs wont let me search for anything
which is why im asking here
wait this is for actual discord docs?
I was talking about the discord.js.org docs
not working
the search doesent work
I put in anything
and it always says no result found
oh it was core package, changing to discord.js works perfectly
could I use guildMemberUpdate to check the username change of a user
alright ill check docs
we already have that intent added
heres the current function, would this work?
I just changed username and it didnt work
ok so
we used guildMemberUpdate
and it only fired for a username update
like the display name
but not the actual @ username
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
only firing when we change the display name, not the actual username
gmu
well before we tried UserUpdate and it didnt fire at all but we'll try again
also whats the package for the discord dev thing?
alright we're gonna try to swap to the dev version
and see how it goes
alrigth we tried some things and it didnt work, imma just look into this some other time, thx for all of the help though
imma close this thread