66 Replies
- 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!well
show your command
I got this, was just working with this guy in v14 help
it happens everytime i run a command which makes sense because i use
await execute(..., ...) {
Send all of the stuff you did previously in a pastebin
Please
i assume its occuring inside command Handler
alr
We will see
Pastebin
discord.js v14 error - 1229 - Pastebin.com
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.
everything is there
- index.js
- command handler
- example command
Thank you I'll take a read through
Found the issue
oh really?
Line 5 on the pastebin, you are saying, if the command is a message in a channel like these right now, execute a command
You are using slash commands right?
yes
so your trying to say that
isChatInputCommands
are used for prefixed commands?I'll write you a replacement interactionCreate.js
that would be great
Like the old !help
yes
i am unsure about that because previously, i tried it and it worked. i tried it as an interaction command and it didnt cause the error mentioned above
This should work, if it doesn't we can work more on it
Wait a sec
Don't use that
Try this
https://pastebin.com/h9eR1PNi
Pastebin
module.exports = { name: 'interactionCreate', async execute(i...
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.
alr
It might work, might not, if it doesn't we work on it
Is it an indentation issue?
uh
did u mean
elseif {}
?Both work
Hold up a second
js is starting to make no sense
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
yet i get another error
Hold up I wrote that really badly
Let me redo it
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
what are the difference? 🤔
I like doing it
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
ahh i see
i learned a lot of lang
mixup
its common
This will work much better
Pastebin
module.exports = { name: 'interactionCreate', async execute(i...
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.
alr
It isn't formatted properly because of pastebin but your ide should sort that out
u added a extra
}
i removed it
lets seeSorry, hard to code on pastebin
Alright we are getting somewhere now
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Did you get that message before?
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
They didn't tell us that the bot sent a message
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
wait
every command has the same error
hm?
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
it is saved
im not sure what you mean by "you’re not using execute as the function in each command file"
?
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
alr
because it only has 2 commands?
this bothers me a lot
I know this doesn't pertain to your current error but it will return an error later:
Also remove the first line SelectMenuBuilder StringSelectMenuBuilder
const { dir } = require("console");
done
i logged
{ '0': 'help.js', '1': 'ping.js', folder: 'tools' }
idk how is that gonna help
guys?
so
how do i fix it
index?
i showed cmd handlerthis is all i have currently
index
cant find it hm
lemme show handleCommands
its for my help cmd
properties
is essential for handleCommands
commands.set(command.data.name, properties)
but it breaks it did follow
but i was able to understand
other than a few parts
property is a constant with value {folder, ...commandFiles};
folder = commandFolders for example folders inside the 'commands' directory such as 'tools'
commandFiles are those who ends with .js
assuming its fetching those
huh
i dont know what to do anymore
so im gonna write the code from scratch
is that a good idea?
ok
handleCommands?
this?
awesome, that works
im so greatfulbut doesnt seem to implement the menu?