Language
There are two available flavours of Javascript in create-discord-bot; Javascript and Typescript.
Typescript
Typescript is our recommendation; due to its Type-safety and advanced Intellisense, you'll be able to catch bugs before you push your bot into production and improve your developer experience.
Tools
- tsx - Default Typescript executor included with create-discord-bot, faster than ts-node, and other executors can also do live-reload.
- swc - Typescript compiler can minify, mangle, and compress your code to increase performance faster than babel and others. (Doesn't do type-checking)
- tsc - The included compiler with Typescript does type-checking and compiles to earlier ES versions.
Javascript
Simpler and easier to use, and fewer steps are needed to execute than Typescript.
tip
You can add the following to the top of your Javascript file to have basic type checking and IntelliSense similar to Typescript.
// @ts-check
Tools
- nodemon - Default live-reload executor included, no longer needed if you're using NodeJS v19+, which has the
--watch
flag that does something similar.