ClientMissingIntents, how do i fix this issue? i've tried everything it just doesnt work

please help
95 Replies
d.js toolkit
d.js toolkit4mo ago
Lux
LuxOP4mo ago
No description
Lux
LuxOP4mo ago
No description
Lux
LuxOP4mo ago
No description
Lux
LuxOP4mo ago
it just doesnt want to work, and idk what to do
Amgelo
Amgelo4mo ago
is that line 45? and can you show how you import GatewayIntentBits?
Lux
LuxOP4mo ago
how i import it?
Lux
LuxOP4mo ago
No description
Lux
LuxOP4mo ago
its these lines
Lux
LuxOP4mo ago
No description
Amgelo
Amgelo4mo ago
did you change your code? your error and code don't match according to your error, it comes from line 45
Lux
LuxOP4mo ago
??
Amgelo
Amgelo4mo ago
but it can't come from here, so it suggests you changed it
No description
Lux
LuxOP4mo ago
presenceupdatestatus i don't ermember changing my code hm is there a way to fix it?
Amgelo
Amgelo4mo ago
can you try running again and sharing the new error
Lux
LuxOP4mo ago
running again? npm start?
Amgelo
Amgelo4mo ago
also this shouldn't cause problems why do you have imports in line 39? imports are usually done at the top of the file however you're running it and getting the error
Lux
LuxOP4mo ago
i jst do npm start
Lux
LuxOP4mo ago
No description
Lux
LuxOP4mo ago
its a discord bot uh
Lux
LuxOP4mo ago
this is whats above it
No description
Lux
LuxOP4mo ago
No description
Amgelo
Amgelo4mo ago
are you sure you're seeing this file?
No description
Lux
LuxOP4mo ago
index.js?
Amgelo
Amgelo4mo ago
double check if it's saved
Lux
LuxOP4mo ago
No description
Lux
LuxOP4mo ago
yh
Amgelo
Amgelo4mo ago
yes, but the index.js in that path
Lux
LuxOP4mo ago
No description
Amgelo
Amgelo4mo ago
the dot suggests it's not saved
Lux
LuxOP4mo ago
in that path?
Amgelo
Amgelo4mo ago
try saving first
Lux
LuxOP4mo ago
No description
Lux
LuxOP4mo ago
alr
Amgelo
Amgelo4mo ago
why does it say inptents and not intents
Lux
LuxOP4mo ago
i've saved inpntents i have no fkin diea
Amgelo
Amgelo4mo ago
double check it says intents, and that it's saved
Lux
LuxOP4mo ago
if that was the cause of it i'll cry nope
Lux
LuxOP4mo ago
No description
Amgelo
Amgelo4mo ago
did this dot dissapear?
Lux
LuxOP4mo ago
it did
Lux
LuxOP4mo ago
No description
Lux
LuxOP4mo ago
it sfixed its fixed... i think the command doesn't work.
Amgelo
Amgelo4mo ago
define "doesn't work"
Lux
LuxOP4mo ago
No description
Lux
LuxOP4mo ago
definiton : doesn't even show as a command or im stupid
Lux
LuxOP4mo ago
this is the code for a simple ping command
No description
Lux
LuxOP4mo ago
in the server i have the bot, it does not work
Amgelo
Amgelo4mo ago
are you following the guide or...?
Lux
LuxOP4mo ago
nor show the command im doin everythin i can man </3 im sleep deprived liek hell
Amgelo
Amgelo4mo ago
I get that, but from where are you getting the steps to create the bot the guide? (https://discordjs.guide)
yvseann
yvseann4mo ago
Maybe its doing the same thing it did with me where it takes a while to register? Are you registering globally or on guild
Lux
LuxOP4mo ago
globally thats probably why
Amgelo
Amgelo4mo ago
it shouldn't take a while to register, it's immediate
Lux
LuxOP4mo ago
not following that
Amgelo
Amgelo4mo ago
refreshing the client sometimes help though
yvseann
yvseann4mo ago
Globally took a while for me but idk today was my first day
Lux
LuxOP4mo ago
im not following that * in other words
Amgelo
Amgelo4mo ago
but I'm not sure if that's the issue in the first place what are you following then?
Lux
LuxOP4mo ago
uhh, a random yt video i found how do i stop the bot now ffs
yvseann
yvseann4mo ago
Is discordjs.guide the official guide? Thats probably why ive had some issues following some other guide then Ctrl+c usually
Lux
LuxOP4mo ago
that worked let me try relaunch it
Amgelo
Amgelo4mo ago
yes it is, and it's the only recommended way
Lux
LuxOP4mo ago
No description
Lux
LuxOP4mo ago
command still doesn't show up under /
Amgelo
Amgelo4mo ago
the code you shared defines a function for registering commands but I don't see you calling that function anywhere
Lux
LuxOP4mo ago
so im stupid in other words it'll probably be easier to share the entire code ngl
Amgelo
Amgelo4mo ago
though I'd suggest learning from the guide, instead of following a random video
Lux
LuxOP4mo ago
im sleep deprived like hell, and i can't do much 😭
Amgelo
Amgelo4mo ago
you should sleep then
Lux
LuxOP4mo ago
i need to get this finished
yvseann
yvseann4mo ago
I see, yeah probably why i was having issues. Anyway ill leave this forum as this is unproductive toeards helping them
Lux
LuxOP4mo ago
more like my ADHD is saying finish it then u can sleep its fine man dw xD
yvseann
yvseann4mo ago
Sleep then finish it Trust me
Lux
LuxOP4mo ago
don't got time
Amgelo
Amgelo4mo ago
problem is, if you don't understand what you're doing, finishing will be really hard, even more so not being fully capable (because of lack of sleep)
Lux
LuxOP4mo ago
this is the only window im open for w time hm
Amgelo
Amgelo4mo ago
you can come back later and check the guide instead, it explains step by step what each codeblock does
Lux
LuxOP4mo ago
No description
Lux
LuxOP4mo ago
i do deploy commands
Amgelo
Amgelo4mo ago
^^
Lux
LuxOP4mo ago
i'm having trouble understnading "registering" and "calling"
yvseann
yvseann4mo ago
You defined it, but it isnt getting told to run anywhere
Amgelo
Amgelo4mo ago
do you know js fundamentals?
Lux
LuxOP4mo ago
ah alr well i'll have to do that i fixed it
esmBot
esmBot4mo ago
🏓 Pong!
Latency: 521ms
Latency: 521ms
yvseann
yvseann4mo ago
Nice
Lux
LuxOP4mo ago
thats not what i wnated ot do
yvseann
yvseann4mo ago
Wrong bot
Lux
LuxOP4mo ago
but yeah js had to do a few tweaks to the code
yvseann
yvseann4mo ago
Close enough
Lux
LuxOP4mo ago
No description
Lux
LuxOP4mo ago
it works tho :D now i have to quickly code 2 more commands and i'll be fine, thank you both for your time to help me, i will probably be back here tmrow or later today tysm tho!
yvseann
yvseann4mo ago
Sure lol good luck
Lux
LuxOP4mo ago
thanks, already coded 2 more commands

Did you find this page helpful?