15 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!Just extend your
Command
interface with ApplicationCommandData
and don't do that unnecessary mappingswdym by unnecessary mappings?
By extending with
ApplicationCommandData
you will be able to pass the appCommands
array directly without mapping it.ah, how do i extend my interface with ApplicationCommandData? sorry im not the best with typescript haha
Ok, you can't extend it, since
ApplicationCommandData
is a type, but you can do
so i use this instead of importing Command from my types?
i dont see why something so simple is this difficult, is it like this for everyone?
You can export this type and use it in your command files
And you'll be able to pass your array directly to set
You just need to understate how strict typing works
im still getting these errors
Again, no need to map your commmands
so i just return this.application.commands.set(this.appCommands)?
Yes
oh there's no errors now, why was i doing that mapping in the first place?