create-seedcord 0.4.2 → 0.5.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
@@ -10,7 +10,7 @@
10
10
  <a href="https://seedcord.org">Website</a> ·
11
11
  <a href="https://seedcord.org/guide">Guide</a> ·
12
12
  <a href="https://seedcord.org/docs">Reference</a> ·
13
- <a href="https://discord.gg/DzFxY58WXf">Discord</a>
13
+ <a href="https://seedcord.org/chat/">Discord</a>
14
14
  </div>
15
15
 
16
16
  <br />
@@ -23,41 +23,28 @@
23
23
 
24
24
  ## About
25
25
 
26
- `create-seedcord` scaffolds a new seedcord bot project.
26
+ `create-seedcord` sets up a new seedcord bot. It asks a few questions, writes the project, and can install its dependencies and make the first git commit. You run it once, when you start a new bot.
27
27
 
28
- Until v1.0.0, minor versions can break.
28
+ seedcord is pre-1.0, so a minor version can break your bot. Each release's changelog says what changed and how to update.
29
29
 
30
30
  ## Usage
31
31
 
32
32
  ```sh
33
33
  pnpm create seedcord my-bot
34
- npm create seedcord my-bot
35
- yarn create seedcord my-bot
36
34
  ```
37
35
 
38
- It 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.
36
+ `npm create seedcord`, `yarn create seedcord`, and `bun create seedcord` work too, and the project uses that package manager.
39
37
 
40
- If 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.
38
+ It asks whether your bot is a gateway or an http bot, where an http bot runs, what a gateway bot reacts to, your bot token, and the servers to test your commands in. The [first bot guide](https://seedcord.org/guide/first-bot) walks through each question.
41
39
 
42
- On Windows, run it from Windows Terminal. The prompts fall back to ASCII in `cmd.exe` making the boxes draw as `T`, `|`, and `o`.
43
-
44
- ## Flags
45
-
46
- Every question has a flag. Pass them all to skip all questions. `--help` prints the list.
47
-
48
- npm forwards flags to the package only after a `--`:
40
+ Every question has a flag, and `--help` prints them all. npm passes flags on only after a `--`:
49
41
 
50
42
  ```sh
51
43
  npm create seedcord my-bot -- --transport gateway --capabilities reactions
52
- pnpm create seedcord my-bot --transport gateway --capabilities reactions
53
44
  ```
54
45
 
55
- `--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.
56
-
57
- With no terminal to ask on, it reads the flags alone. It prints the flag that would supply any answer you left out.
58
-
59
46
  ## What you get
60
47
 
61
- A 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.
48
+ A TypeScript project with one slash command, its handler, a sample plugin, `seedcord.config.ts`, ESLint, Prettier, and a `.env` for your token. A gateway bot also gets a sample event handler. An http bot on Cloudflare Workers also gets a `cloudflare.config.ts` and a `deploy` script.
62
49
 
63
- `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.
50
+ `pnpm dev` starts the bot with hot reload.
@@ -0,0 +1,4 @@
1
+ import e from"react-devtools-core";const t=globalThis;t.window||=globalThis,t.self||=globalThis,t.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__=[{type:1,value:7,isEnabled:!0},{type:2,value:`InternalApp`,isEnabled:!0,isValid:!0},{type:2,value:`InternalAppContext`,isEnabled:!0,isValid:!0},{type:2,value:`InternalStdoutContext`,isEnabled:!0,isValid:!0},{type:2,value:`InternalStderrContext`,isEnabled:!0,isValid:!0},{type:2,value:`InternalStdinContext`,isEnabled:!0,isValid:!0},{type:2,value:`InternalFocusContext`,isEnabled:!0,isValid:!0}],await(async(e=`ws://localhost:8097`,t=2e3)=>new Promise(n=>{let r=new WebSocket(e),i=setTimeout(()=>{n(!1),r.close()},t);i.unref(),r.addEventListener(`open`,()=>{clearTimeout(i),r.close(),n(!0)}),r.addEventListener(`error`,()=>{clearTimeout(i),n(!1)})}))()?(e.initialize(),e.connectToDevTools()):console.warn(`DEV is set to true, but the React DevTools server is not running. Start it with:
2
+
3
+ $ npx react-devtools
4
+ `);export{};