Typescript Support
Does djs support Bun/TS?
I know this might sound like a silly question but I've looked at the guide and all the examples still use CommonJS.
10 Replies
I know it supports TS but i wanna know if it's worth using it with djs or not
Yes, the library supports TypeScript. It doesn't actively support Bun but I've heard people say it works fine (issues pop up every once in a while tho...so just be aware of that)
The guide itself is pretty old and it's really just for beginner devs to learn the basics about using the library, or to get examples of how to use some less self explanatory functions of the library (like the ComponentV2 builders)
Ooh i see. I was also wondering something else. Do people still buy into "old style" commands or should we go full slashcommand mode?
What's the recommended approach now?
Bun should be supported
The recommended approach is Slash Commands. IMO, they're better in every way. Plus, you don't need to worry about applying for the privileged intent if/when you hit 100 servers...cuz Discord is not going to accept it if all you need it for is Prefix Commands
thats nice 😄 i remember parsing prefixes being extremely jarring (this is not my first bot) especially when people want custom prefixes or per server prefixes as well
Yes. Slash Commands solve a lot of those problems for you
Built in "help" command, automatic data validation for invalid arguments (custom option types), ephemeral message responses, built in permissions system (unfortunately doesn't support roles automatically in the code, unless you use OAuth)
I'm using discord.js with bun. Haven't faced any issue yet
me also, so fast nothing wrong, plugged into vscode and still go vroom vroom