guildCreate event doesn't flag

Hi everyone, i attempted to make a simple whitelist system that checks if a servers ID is in a list of whitelisted servers however it didn't seem to work. All intents are enabled and When addingConsole.log to see if it was an issue in the code i found that the event never triggered. I'm relatively new to discord.js so any help would be much appreciated! If anything else is needed please let me know and i'll give you whatever is needed to try fix this bug. Thank you in advance
No description
No description
19 Replies
d.js toolkit
d.js toolkit16mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
treble/luna
treble/luna16mo ago
show your full code
wowie
wowieOP16mo ago
Sorry its in txt downloaded from mobile
d.js docs
d.js docs16mo ago
To share long code snippets, use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks or files.
wowie
wowieOP16mo ago
Sorry I'm still new to this community i appologise
wowie
wowieOP16mo ago
Should have sent the proper link this time, apologies.
treble/luna
treble/luna16mo ago
why do you make 2 clients? and what is getAllIntents
wowie
wowieOP16mo ago
That code was removed in the place of a array with some intents Sorry what do you mean? Asked a friend for help so not all the code is mine
treble/luna
treble/luna16mo ago
you have 2 clients which is why you are having this issue
wowie
wowieOP16mo ago
Could you show me how i would remove one of them? Sorry if i'm asking too much i plan on having a deeper dive into the djs docs later today
treble/luna
treble/luna16mo ago
by just removing them from your code?
wowie
wowieOP16mo ago
Yea but i can't see where the two clients are
treble/luna
treble/luna16mo ago
hold on you reassogn your client instead why though also does the ready event fire
wowie
wowieOP16mo ago
Yea it does wait no it doesnt wtf
treble/luna
treble/luna16mo ago
yeah i would take a different approach when constructing your client
wowie
wowieOP16mo ago
No description
No description
wowie
wowieOP16mo ago
what would you do
Want results from more Discord servers?
Add your server