glyria dev
Usage
npm run dev
# or
npx glyria dev
What it does
glyria dev starts your bot with hot reload — no manual restarts needed while you develop.
Hot reload behavior
glyria.js watches your files and reacts differently depending on what changed:
| Changed file | Behavior |
|---|---|
src/commands/** | Hot reloads commands only — no restart |
src/events/** | Hot reloads events only — no restart |
glyria.config.ts | Hot reloads config only — no restart |
Any other src/** file | Full bot restart |
This means editing a command or event is near-instant — the bot doesn't disconnect from Discord.
Environment
glyria dev sets the following environment variables automatically:
NODE_ENV=development
GLYRIA_DEV=true
GLYRIA_DEV=true switches the command loader to use src/ and .ts files directly instead of dist/ — no build step needed in dev.
Anti double-trigger
glyria.js includes a 150ms cooldown per file to prevent the watcher from firing twice on the same save — common behavior with some editors and OS file systems.
TypeScript
Your TypeScript files are executed directly via tsx — no compilation needed during development. Just save and glyria.js handles the rest.
GUILD_ID in your .env to use guild-scoped commands in dev mode. They register instantly instead of waiting up to 1 hour for global propagation.GUILD_ID=your_guild_id_here

