seedcord 0.17.3 → 0.18.0-next.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 +58 -9
- package/dist/cli.mjs +261 -83
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +22 -4
- package/dist/index.mjs +1 -1
- package/dist/{src-_7QZSCTR.mjs → src-Dwy4ICYH.mjs} +3 -3
- package/dist/src-Dwy4ICYH.mjs.map +1 -0
- package/package.json +30 -20
- package/dist/src-_7QZSCTR.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,18 +1,67 @@
|
|
|
1
|
-
<
|
|
1
|
+
<div align="center">
|
|
2
2
|
<picture>
|
|
3
3
|
<source media="(prefers-color-scheme: dark)" srcset="https://cdn.seedcord.org/assets/wordmark-dark.webp" />
|
|
4
4
|
<img src="https://cdn.seedcord.org/assets/wordmark-light.webp" alt="seedcord" width="440" />
|
|
5
5
|
</picture>
|
|
6
|
-
</
|
|
6
|
+
</div>
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
<div align="center">
|
|
9
|
+
<h3>The whole Discord bot, wired and typed</h3>
|
|
10
|
+
<a href="https://seedcord.org">Website</a> ·
|
|
11
|
+
<a href="https://guide.seedcord.org">Guide</a> ·
|
|
12
|
+
<a href="https://docs.seedcord.org">Reference</a> ·
|
|
13
|
+
<a href="https://discord.gg/DzFxY58WXf">Discord</a>
|
|
14
|
+
</div>
|
|
9
15
|
|
|
10
|
-
|
|
16
|
+
<br />
|
|
11
17
|
|
|
12
|
-
|
|
18
|
+
<div align="center">
|
|
13
19
|
|
|
14
|
-
-
|
|
15
|
-
- Until a major v1.0.0 release for seedcord, expect breaking changes in minor versions.
|
|
16
|
-
- Documentation will come soon as well!
|
|
20
|
+
[](https://www.npmjs.com/package/seedcord) [](https://nodejs.org) [](LICENSE)
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
## About
|
|
25
|
+
|
|
26
|
+
`seedcord` is the CLI a bot project runs during development and at build time. It reads `seedcord.config.ts` and gives you a dev server with hot reload, a production build, the codegen that types your commands, and a cleanup tool for stale guild commands.
|
|
27
|
+
|
|
28
|
+
Until v1.0.0, minor versions can break.
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
`pnpm create seedcord` adds it to a new project. To add it to an existing one:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
pnpm add -D seedcord
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Commands
|
|
39
|
+
|
|
40
|
+
<!-- prettier-ignore-start -->
|
|
41
|
+
|
|
42
|
+
| command | what it does |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| `seedcord dev` | runs the bot from the config file, reloading changed modules in place |
|
|
45
|
+
| `seedcord build` | compiles the project from the config file |
|
|
46
|
+
| `seedcord codegen` | writes the typed augmentations for your commands and config |
|
|
47
|
+
| `seedcord commands` | inspects and cleans commands already deployed to Discord |
|
|
48
|
+
|
|
49
|
+
<!-- prettier-ignore-end -->
|
|
50
|
+
|
|
51
|
+
`codegen --check` verifies the committed augmentations match your source. Run it in CI.
|
|
52
|
+
|
|
53
|
+
`commands --clean` reports guild commands that duplicate a global one. It runs as a dry run until you pass `--apply`.
|
|
54
|
+
|
|
55
|
+
On the http transport, `dev` also opens a cloudflared tunnel and points Discord's interactions URL at it.
|
|
56
|
+
|
|
57
|
+
## Config
|
|
58
|
+
|
|
59
|
+
`defineConfig` types `seedcord.config.ts`:
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
import { defineConfig } from 'seedcord';
|
|
63
|
+
|
|
64
|
+
export default defineConfig({
|
|
65
|
+
// ...
|
|
66
|
+
});
|
|
67
|
+
```
|