why am i getting this error?
it code https://pastebin.com/J50NXXY6
Pastebin
const { SlashCommandBuilder } = require('@discordjs/builders');cons...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
30 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.
- Issue solved? Press the button!log interaction.constructor.name
Client
well then you pass in a client in your command handler, not an interaction
The order of function parameters must match between definition and function call.
- mismatch! you pass an interaction where the client is expected
- mismatch! you pass the client where an interaction is expected
my handler.js
how do i fix it?
either remove the client, or pass in your params properly
the first is the better since you can access it from your interaction
show interactionCreate line 62 and around
you did not define logger
in handler?
wherever you construct client
but i dont see the need of a logger when you can just use console.error
I think I'm giving up because I don't know what to do anymore ;/
still error
same
Just use console.error instead of client.logger?
show the relevant code
which?
interactionC<reate line 9
as you can also see from your error
removed client from your handler
yet you added it there?
this is basic js at this point
I forgot about that should i remove the client from everything? messageCreate.js etc...
if you removed it in your handler yes
Most dhs structures have a client property
I deleted the client
ehh
Unknown Userβ’2y ago
Message Not Public
Sign In & Join Server To View
In JavaScript, = is used for assignment, == for loose equality, and === for strict equality checks.
- Equality and sameness in JavaScript: learn more