Search
Get Started
d-I❄
discord.js - Imagine ❄
•
2y ago
</PixelPatron>
List commands
Hello
. Can i list command Like Client
.commands or anything like
?
discord.js - Imagine ❄
Join
Support server for discord.js, a Node.js module to interact with Discord's apps API.
58,353
Members
View on Discord
Was this page helpful?
Yes
No
D
d.js toolkit
•
6/25/24, 10:52 AM
What
's your exact discord
.js
npm list discord.js
npm list discord.js
and node
node -v
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
!
✅
✅
Marked as resolved by OP
T
treble/luna
•
6/25/24, 11:02 AM
client
.commands is not a default property and is usually populated by yourself
T
treble/luna
•
6/25/24, 11:02 AM
If you want to list slash commands
, use
<Client
>
.application
.commands
.fetch
(
)
T
treble/luna
•
6/25/24, 11:03 AM
for guild commands
, use
<Guild
>
.commands
.fetch
(
)
<
</PixelPatron>
OP
•
6/26/24, 11:35 PM
Nope
. I deploy my commands in an array named client
.slashCommands and client
.prefixCommands
.
. the two on one array named client
.commands
.
. but I can
’t call this on my dashboard yyy
T
treble/luna
If you want to list slash commands, use <Client>.application.commands.fetch()
T
treble/luna
•
6/27/24, 6:52 AM
Thrn use this
<
</PixelPatron>
OP
•
6/27/24, 8:17 AM
The problem is
.
. this fetch all commands
.
. I have a few dev commands
.
. there shouldn
’t be list
T
treble/luna
•
6/27/24, 9:03 AM
Then filter those out
T
treble/luna
•
6/27/24, 9:03 AM
Or map over your client
.slashCommands
List commands - discord.js - Imagine ❄