djs.config.ts file is the heart of your djs-core project. It defines essential settings like your Discord bot token and server IDs.
djs.config.ts
Create a djs.config.ts file in your project root. Use the Config type from @djs-core/dev for full type safety.
Options
Your Discord bot token from the Discord Developer Portal.
Array of guild (server) IDs where commands should be registered.
- During development, using specific server IDs ensures near-instant command updates.
- Use an empty array
[]for global commands (can take up to 1 hour to propagate).
Environment Variables
We recommend using a.env file to manage your secrets:
.env
.gitignore includes: