Mismatched Parameter Fix

Trying to fetch the user but not working
57 Replies
d.js docs
d.js docs3y ago
• 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.
Almeida
Almeida3y ago
2, 3, and 4 ^
Mardroide
MardroideOP3y ago
i'm doing it sir thanks
Mardroide
MardroideOP3y ago
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
let me try
Almeida
Almeida3y ago
you missed steps 2 and 4
Mardroide
MardroideOP3y ago
the error its all i have at console and what im triying to do its display user banner it he/she has it and the if not display a hex color with an API. What doesn't work its almost everything because when i provide an user it always shows the color and not the banner (and he/she has a banner). When i try to do it with no target it throws that err
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
im changing all code to try a thing
Mardroide
MardroideOP3y ago
SourceBin
Banner command 2.0
Instantly share your code with the world.
Mardroide
MardroideOP3y ago
so i made this when i use the option it alawys shows the banner (without existing the banner)
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
yeah sir
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
you mean this line?
d.js docs
d.js docs3y ago
The order of function parameters must match between definition and function call.
function execute(client, message, args) { ... };
execute(message, client, args);
function execute(client, message, args) { ... };
execute(message, client, args);
• mismatch! you pass a Message where the client is expected • mismatch! you pass the Client where a Message is expected
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
Mardroide
MardroideOP3y ago
its correct
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
why? im lost sorry
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
what that means?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
but how i fix it because I use a handler to do the slash
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
just in that file or in all files
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
ok 1 sec okey all done but now i have errors all sites
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
now i have errors at events 💀 maybe its the handler look
Mardroide
MardroideOP3y ago
Mardroide
MardroideOP3y ago
commands its the slash handler
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
yeah? and why for me no
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
but if i use like that way i had the things will happend like that way? i think the error its at my event handler
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
yeah thats what i was triying can i show you the vent handler because i think thats the problem
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
SourceBin
EVENT HANDLER
Instantly share your code with the world.
Mardroide
MardroideOP3y ago
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
Mardroide
MardroideOP3y ago
here in the new guide its different it should be only args?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
but then, i have to change this
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
just pass client? all my bot its broken 💀
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
how you do it then
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
i just updated the handler
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
but still not working xd im gonna have dinner later i'll be here Im back the order shouldn't be the error thats are parameters no? nothing works
d.js docs
d.js docs3y ago
Version 14 has released! Please update at your earliest convenience. • Update: npm rm discord.js npm i discord.jsUpdate guide (use CTRL + F to search for the old method or property) The order of function parameters must match between definition and function call.
function execute(client, message, args) { ... };
execute(message, client, args);
function execute(client, message, args) { ... };
execute(message, client, args);
• mismatch! you pass a Message where the client is expected • mismatch! you pass the Client where a Message is expected
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Mardroide
MardroideOP3y ago
i just fixed all stuff i just changed the way the handlers read the files and now its also faster 🙂
Want results from more Discord servers?
Add your server