#can i get the solution for this

52 messages · Page 1 of 1 (latest)

narrow owl
#

node:internal/errors:496
ErrorCaptureStackTrace(err);
^

TypeError [ERR_INVALID_ARG_TYPE]: The "emitter" argument must be an instance of EventEmitter. Received type string ('ready')
at new NodeError (node:internal/errors:405:5)
at eventTargetAgnosticAddListener (node:events:1032:11)
at node:events:987:5
at new Promise (<anonymous>)
at Client.once (node:events:967:10)
at Object.<anonymous> (C:\Users\Nishad\Desktop\Slash Commands\index.js:6:8)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12) {
code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v20.7.0

twilit ferryBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • 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!
untold hazel
#

Show your code

narrow owl
#

ihave doing coding

#

but ihave got an error

untold hazel
#

i didnt ask if you wrote code

#

i asked to show the code

narrow owl
#

ok

pliant peak
#

You seem to have called Client.once on the class, not an instance

narrow owl
#

what you talling

pliant peak
#

Did you code this bot?

narrow owl
#

ihave just started coding

pliant peak
#

Then show your code (what you sent doesn’t contain any js code, only node_modules and a config json)

narrow owl
lyric vineBOT
#

To share long code snippets, use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks or files.

narrow owl
#

sry wait

#

sir it not getting upload

untold hazel
#

reset your token

#

and indeed

#

you call Client.once on the class

#

not on your constructed client

narrow owl
narrow owl
#

the bot is not getting up

untold hazel
#

because you are calling Client.once on the class, not client.once

narrow owl
#

then what i need to add in there

untold hazel
#

you need to edit the way you call client

#

capitalization matters

#

you're calling it on the class

#

not on your client

narrow owl
#

can you edit and snd

pliant peak
#

We don’t spoonfeed, so no.

narrow owl
#

i cant uderstand that wolvinny said

#

iam noo good to trnslate english to my language so

#

ihave told

forest stirrup
#

You have to change Client.once to client.once

#

Like he said, capitalization matters

#

I also won't spoonfeed you code so change it yourself

#

It's so simple

#

Backspace, c

narrow owl
#

okk

little tendon
#

also next time don't reveal your bot's token myDudes

narrow owl
#

okk bro

#

ihave just reset it