Discordjs has types for typescripts devs?

Hey there! So, i'm developing a discord bot and i was expecting to use typescript for the development but when i go check for the types on discordjs docs, it doesn't appear to have any types to cast on some properties or vars like Client or client.commands. :crySparkle: My humble question is if there is some way to use typescript for the development and if there is some docs or tutorial for the type casting in discordjs lib i've not seen.
4 Replies
d.js toolkit
d.js toolkit2mo ago
d.js docs
d.js docs2mo ago
We highly recommend you extend the Client structure properly instead of just attaching custom properties like .commands to the regular discord.js Client instance. - Using typescript, you might want to consider casting or augmenting the module type
IceSann
IceSannOP2mo ago
hmm seems fair, thanks! :)
d.js toolkit
d.js toolkit2mo ago
The thread owner has marked this issue as solved.

Did you find this page helpful?