spearkit 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,6 +12,26 @@ custom-id params and modal fields are all inferred.
12
12
  npm install spearkit discord.js
13
13
  ```
14
14
 
15
+ ## Batteries included
16
+
17
+ - **Type-safe slash commands**, options, subcommands, autocomplete, buttons, selects and modals — no `interactionCreate` switch.
18
+ - **Cooldowns** — per user/role/guild/channel, with exemptions and per-role/per-user overrides ([guide](./docs/cooldown.md)).
19
+ - **Scheduled tasks** — cron and interval jobs, started on ready ([guide](./docs/scheduler.md)).
20
+ - **Prefix commands** — classic `!text` commands that share cooldowns ([guide](./docs/prefix.md)).
21
+ - **Structured logging** — leveled, scoped, pluggable; every error flows through it ([guide](./docs/logging.md)).
22
+ - **Usage tracking** — record who used what to a database and/or a Discord channel ([guide](./docs/usage.md)).
23
+ - **dotenv built in** — auto-load `.env` and read typed env vars ([guide](./docs/env.md)).
24
+ - **Plugins & file-based loading** for organising larger bots.
25
+ - **Guards** — declarative `requireAnyRole`/`requireUserPermissions`/`guildOnly`/`requireOwner` preconditions on commands, components and prefix commands ([API ref](./docs/api-reference.md#guards--declarative-preconditions)).
26
+ - **Context-menu commands** — `userCommand` / `messageCommand` with typed `targetUser` / `targetMessage` ([API ref](./docs/api-reference.md#context-menu-commands)).
27
+ - **Preset embeds** — `ctx.success/info/warn/error` and `client.embeds` factory with configurable colors/icons ([API ref](./docs/api-reference.md#embeds--preset-replies)).
28
+ - **Pagination & confirmation** — `paginate(...)` and `confirm(...)` button flows with user-only filter and timeout.
29
+ - **Typed prefix args** — `prefixCommand({ args: a => a.snowflake("target").duration("d").rest("reason"), run: ctx => ctx.options })`.
30
+ - **Primitives** — `KeyedLock`, `safeFetch.{member,channel,...}`, `formatDuration`/`parseDuration`/`discordTimestamp`, `MemoryCache` (TTL + counters + rate limit), `loadConfig` (JSON/JSON5/YAML).
31
+ - **Logger transports** — multi-sink (`consoleSink`, `jsonlSink`, `webhookSink`); per-level routing.
32
+ - **Scheduler extras** — `scheduler.delay/followUp/reconcile` for one-shot jobs and on-ready recovery.
33
+ - **Deploy strategy** — `deployAllCommands({ dryRun, strategy: "diff" })` for safe CI deploys.
34
+
15
35
  ## Documentation
16
36
 
17
37
  - **Docs site** ([`website/`](./website)) — a [Fumadocs](https://fumadocs.dev) site themed like the discord.js docs. Run it with `cd website && pnpm install && pnpm dev`.