#now this error prompts stating `invalid
1 messages · Page 1 of 1 (latest)
I'm guessing that's him registering commands
yes, the error prompts after using client.commands to register
try client.commands.map() as body
alright
I'm guessing this is the issue
TypeError: undefined is not a function
screenshot what did you change
elaborate?
client.commands.map(ctx => ctx.data)
and you want it as a json I believe
the reason is because you provide Collection to the body, but it should be an array
as referred to the guide, yes
this fixed it
in "body" property, when setting application commands, change client.commands.map() to client.commands.map(c => c.data)
yeah
yes
ah
well, the issue was you were providing Collection class to the body, while it should be array instance. Collection is like a "better array" from discord.js, so thats why they made you use it. So, what we did, is "parsed" client.commands, which is Collection type of to array type, using map(), because it returns an array
np
No worries