-
Notifications
You must be signed in to change notification settings - Fork 7
Development
- For contributors and the curious.
- Assumes you already did the Installation.
| Script | What it does |
|---|---|
pnpm dev |
Run from source with tsx (includes --debug). |
pnpm build |
Type-check + emit to dist/ (tsconfig.build.json). |
pnpm clean |
Wipe and rebuild dist/. |
pnpm start |
Run the built bot from dist/. |
pnpm typecheck |
tsc --noEmit, no output. |
pnpm test |
Run the node:test suite via tsx. |
pnpm lint |
Biome lint (with --write). |
pnpm format |
Biome check + format (with --write). |
pnpm db:generate |
Generate the Prisma client. |
pnpm db:push |
Push the Prisma schema to the database. |
pnpm db |
db:push then db:generate. |
Note
husky + lint-staged run Biome on staged *.ts / *.json files on commit.
src/
ββ commands/ # slash + prefix commands (by category: music, guild, user, developer)
ββ events/ # Discord gateway events
ββ components/ # component (button/menu/modal) handlers
ββ lavalink/ # hoshimi (Lavalink) events β node, player, track, queue, lyrics
ββ locales/ # translations (en-US, es-419)
ββ config/ # default.config.ts / local.config.ts
ββ middlewares/ # command middlewares (checks: nodes, voice, player, queueβ¦)
ββ generated/ # Prisma client (generated, git-ignored)
ββ structures/
β ββ classes/ # Stelle client, database, manager, components, modules
β ββ controllers/# database controllers (playlist, locale, prefix, player, requests)
β ββ types/ # shared types
β ββ utils/ # functions, data, listeners, decorators, manager helpers
ββ module.ts # module augmentation (seyfert/hoshimi typings)
ββ index.ts # entrypoint
prisma/schema.prisma # database schema
assets/ # application.yml, start scripts, fonts, images
tests/ # node:test test files
Directories are wired in seyfert.config.mjs under locations (commands, events, components, langs, config, lavalink). Stelle uses no manual handlers β Seyfert loads everything from those folders.
Stelle wraps hoshimi's events with createLavalinkEvent(...) under src/lavalink/. Node resume is driven by hoshimi's sessionOptions.resumeFn; the rest (track start/end, queue, player, lyrics) are individual event files.
Prisma (client generated to src/generated/prisma) over MongoDB, accessed through controllers on client.database.* (e.g. client.database.playlist). Redis backs the queue store. After editing prisma/schema.prisma, run pnpm db.
Tests use the built-in node:test runner through tsx and live in tests/*.test.ts. Run them with pnpm test.
Biome is the linter/formatter (config in biome.json). Run pnpm format before committing (the pre-commit hook also does this on staged files).
-
mainβ stable. -
devβ latest features (this wiki tracks it). PRs targetdev.
Made with
Getting started
Using Stelle
Advanced
Reference