Discord Bot BaseConventions
ES6 Modules
Development standards for this project
ES6 Modules
This base uses "type": "module"
in the package.json. It's important to remember to use the .js
extension when importing files via relative paths (even if they are TypeScript files).
If you export a function from a TypeScript file:
Import it by adding the.js
extension at the end:
We can also use the await
keyword at the top level of the code:
If for some reason you need dynamic imports, you can use import
as a function in the code: