create-seedcord 0.3.2 → 0.4.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 +7 -5
- package/dist/index.mjs +185 -114
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/templates/AGENTS.md.hbs +6 -2
- package/templates/README.md.hbs +2 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-seedcord",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"description": "Scaffold a new seedcord bot",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"discord",
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
],
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@clack/prompts": "^1.7.0",
|
|
43
|
-
"@seedcord/errors": "^0.
|
|
44
|
-
"@seedcord/eslint-config": "^2.
|
|
45
|
-
"@seedcord/tsconfig": "^2.0.
|
|
43
|
+
"@seedcord/errors": "^0.12.0",
|
|
44
|
+
"@seedcord/eslint-config": "^2.3.0",
|
|
45
|
+
"@seedcord/tsconfig": "^2.0.5",
|
|
46
46
|
"@seedcord/tsdown-config": "^2.0.1",
|
|
47
|
-
"@seedcord/types": "^0.14.
|
|
47
|
+
"@seedcord/types": "^0.14.2",
|
|
48
48
|
"@seedcord/vitest-config": "^0.0.1",
|
|
49
49
|
"discord.js": "^14.27.0",
|
|
50
50
|
"handlebars": "^4.7.9",
|
|
51
51
|
"package-manager-detector": "^1.8.0",
|
|
52
|
-
"tsx": "^4.23.
|
|
52
|
+
"tsx": "^4.23.15",
|
|
53
53
|
"typescript": "^6.0.3"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"test:watch": "vitest dev",
|
|
70
70
|
"coverage": "vitest run --coverage"
|
|
71
71
|
},
|
|
72
|
-
"readme": "<div align=\"center\">\n <picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://cdn.seedcord.org/assets/wordmark-dark.webp\" />\n <img src=\"https://cdn.seedcord.org/assets/wordmark-light.webp\" alt=\"seedcord\" width=\"440\" />\n </picture>\n</div>\n\n<div align=\"center\">\n <h3>The whole Discord bot,
|
|
72
|
+
"readme": "<div align=\"center\">\n <picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://cdn.seedcord.org/assets/wordmark-dark.webp\" />\n <img src=\"https://cdn.seedcord.org/assets/wordmark-light.webp\" alt=\"seedcord\" width=\"440\" />\n </picture>\n</div>\n\n<div align=\"center\">\n <h3>The whole Discord bot, typed end to end</h3>\n <a href=\"https://seedcord.org\">Website</a> ·\n <a href=\"https://seedcord.org/guide\">Guide</a> ·\n <a href=\"https://seedcord.org/docs\">Reference</a> ·\n <a href=\"https://discord.gg/DzFxY58WXf\">Discord</a>\n</div>\n\n<br />\n\n<div align=\"center\">\n\n[](https://www.npmjs.com/package/create-seedcord) [](https://nodejs.org) [](LICENSE)\n\n</div>\n\n## About\n\n`create-seedcord` scaffolds a new seedcord bot project.\n\nUntil v1.0.0, minor versions can break.\n\n## Usage\n\n```sh\npnpm create seedcord my-bot\nnpm create seedcord my-bot\nyarn create seedcord my-bot\n```\n\nIt asks where the project goes, how Discord reaches your bot, what the bot should react to, your bot token, your app public key on http, and an accent color. Then it writes the project, installs dependencies, formats, generates your command types, and makes the first commit. If a step after the write fails, you get a warning and the summary still prints.\n\nIf you don't have the token or key yet, press Enter twice on its prompt to skip it. Fill it into `.env` before you start the bot.\n\nOn Windows, run it from Windows Terminal. The prompts fall back to ASCII in `cmd.exe` making the boxes draw as `T`, `|`, and `o`.\n\n## Flags\n\nEvery question has a flag. Pass them all to skip all questions. `--help` prints the list.\n\nnpm forwards flags to the package only after a `--`:\n\n```sh\nnpm create seedcord my-bot -- --transport gateway --capabilities reactions\npnpm create seedcord my-bot --transport gateway --capabilities reactions\n```\n\n`--no-install` and `--no-git` turn off those two steps. `--no-token` and `--no-public-key` leave those keys empty without asking. `-v` prints the version and `-h` prints the flag list.\n\nWith no terminal to ask on, it reads the flags alone. It prints the flag that would supply any answer you left out.\n\n## What you get\n\nA TypeScript project holding one slash command, its handler, a sample event handler (if you picked `gateway`), `seedcord.config.ts`, eslint, prettier, and a `.env` listing every key the framework reads.\n\n`pnpm dev` starts it with hot reload. On the http transport it also opens a cloudflared tunnel and sets it up, and Discord posts interactions to that URL.\n"
|
|
73
73
|
}
|
package/templates/AGENTS.md.hbs
CHANGED
|
@@ -6,9 +6,9 @@ Rules for an AI coding agent working in this repo.
|
|
|
6
6
|
|
|
7
7
|
## Reading the docs
|
|
8
8
|
|
|
9
|
-
<https://
|
|
9
|
+
<https://seedcord.org/guide/llms.txt> lists every page in the guide with a line on what it covers. Each page answers at its own url plus `.md`, so <https://seedcord.org/guide/commands/options.md> is the Options page as Markdown.
|
|
10
10
|
|
|
11
|
-
The API reference is at <https://
|
|
11
|
+
The API reference is at <https://seedcord.org/docs>, one page per symbol.
|
|
12
12
|
|
|
13
13
|
This project runs on the {{#if isGateway}}gateway{{else}}http{{/if}} transport and imports everything from `{{ transportPackage }}`. A page marks anything that differs between the two.
|
|
14
14
|
|
|
@@ -33,6 +33,10 @@ Run `{{ pm.run }} codegen` after you add a command or change its options. It wri
|
|
|
33
33
|
|
|
34
34
|
<!-- prettier-ignore-end -->
|
|
35
35
|
|
|
36
|
+
## Connections and state
|
|
37
|
+
|
|
38
|
+
Anything that holds a connection, keeps state between interactions, or runs in the background belongs in a plugin, either an existing one or your own. Read <https://seedcord.org/guide/plugins.md> and <https://seedcord.org/guide/plugins/your-own.md> before you add one.
|
|
39
|
+
|
|
36
40
|
## Before you call it done
|
|
37
41
|
|
|
38
42
|
Run `{{ pm.run }} tc` and `{{ pm.run }} lint`. A wrong route or a wrong option name is a compile error, so a green type-check catches most of what an invented API gets wrong.
|
package/templates/README.md.hbs
CHANGED
|
@@ -58,5 +58,5 @@ The two webhook keys take Discord webhook URLs. Set them to get error reports po
|
|
|
58
58
|
|
|
59
59
|
## Docs
|
|
60
60
|
|
|
61
|
-
- Guide: <https://
|
|
62
|
-
- API reference: <https://
|
|
61
|
+
- Guide: <https://seedcord.org/guide>
|
|
62
|
+
- API reference: <https://seedcord.org/docs>
|