diff --git a/docs/guide/walkthrough-v2/cli.md b/docs/guide/walkthrough/cli.md similarity index 100% rename from docs/guide/walkthrough-v2/cli.md rename to docs/guide/walkthrough/cli.md diff --git a/docs/guide/walkthrough-v2/conclusion.md b/docs/guide/walkthrough/conclusion.md similarity index 100% rename from docs/guide/walkthrough-v2/conclusion.md rename to docs/guide/walkthrough/conclusion.md diff --git a/docs/guide/walkthrough-v2/dependency-injection.md b/docs/guide/walkthrough/dependency-injection.md similarity index 95% rename from docs/guide/walkthrough-v2/dependency-injection.md rename to docs/guide/walkthrough/dependency-injection.md index 0a0e159ec..b1abccb35 100644 --- a/docs/guide/walkthrough-v2/dependency-injection.md +++ b/docs/guide/walkthrough/dependency-injection.md @@ -1,7 +1,9 @@ --- sidebar_position: 7 --- - +:::warning +This is version 2 code. Please view [transitioning to v3](../transition) +::: Since version 2.0.0, dependency injection, thanks to [iti](https://github.com/molszanski/iti), is a feature to customize your bot's utilities and structures. Minimal setup for any project. diff --git a/docs/guide/walkthrough-v2/first-command.md b/docs/guide/walkthrough/first-command.md similarity index 100% rename from docs/guide/walkthrough-v2/first-command.md rename to docs/guide/walkthrough/first-command.md diff --git a/docs/guide/walkthrough-v2/first-event.md b/docs/guide/walkthrough/first-event.md similarity index 100% rename from docs/guide/walkthrough-v2/first-event.md rename to docs/guide/walkthrough/first-event.md diff --git a/docs/guide/walkthrough-v2/goal.md b/docs/guide/walkthrough/goal.md similarity index 83% rename from docs/guide/walkthrough-v2/goal.md rename to docs/guide/walkthrough/goal.md index 93d97bb44..5a0180fcd 100644 --- a/docs/guide/walkthrough-v2/goal.md +++ b/docs/guide/walkthrough/goal.md @@ -2,9 +2,9 @@ sidebar_position: 1 --- -::warning -This is the v2 guide. Go to the v3 guide! -:: +:::warning +Please read the transition page if you are moving from version 2 to version 3. +::: # Walkthrough diff --git a/docs/guide/walkthrough-v2/good-to-know.md b/docs/guide/walkthrough/good-to-know.md similarity index 100% rename from docs/guide/walkthrough-v2/good-to-know.md rename to docs/guide/walkthrough/good-to-know.md diff --git a/docs/guide/walkthrough-v2/plugins.md b/docs/guide/walkthrough/plugins.md similarity index 100% rename from docs/guide/walkthrough-v2/plugins.md rename to docs/guide/walkthrough/plugins.md diff --git a/docs/guide/walkthrough-v2/sern-emitter.md b/docs/guide/walkthrough/sern-emitter.md similarity index 96% rename from docs/guide/walkthrough-v2/sern-emitter.md rename to docs/guide/walkthrough/sern-emitter.md index b6e2fd8ba..f9df6cbfd 100644 --- a/docs/guide/walkthrough-v2/sern-emitter.md +++ b/docs/guide/walkthrough/sern-emitter.md @@ -11,4 +11,4 @@ You're shipped with the SernEmitter. This EventEmitter listens to - `warn` events, where it is possible to throw errors You can put these and other event listeners into [event modules](./first-event.md)! -
View all events \ No newline at end of file +
View all events diff --git a/docs/guide/walkthrough-v3/transition.md b/docs/guide/walkthrough/transition.md similarity index 65% rename from docs/guide/walkthrough-v3/transition.md rename to docs/guide/walkthrough/transition.md index daacc439d..6efc1e22d 100644 --- a/docs/guide/walkthrough-v3/transition.md +++ b/docs/guide/walkthrough/transition.md @@ -2,9 +2,11 @@ sidebar_position: 1 --- -# Transitioning from v2 to v3 - +# transition from v2 to v3 +:::warning +The "Node" moduleResolution is the only one that has been tested to work with sern. +::: - Sern.makeDependencies -> makeDependencies - it is asynchronous and top level function now. Make sure to await it before initing for proper synchronization. @@ -14,8 +16,7 @@ sidebar_position: 1 + await makeDependencies({ build: () => {} }) ``` Also, v3 comes with the new Service api. To make sure to enable intellisense - -include a dependencies.d.ts file into compilation. +include a dependencies.d.ts file into compilation. [Click here for all new features](../../../blog/3.0.0) ```ts /** * This file serves as intellisense for sern projects. @@ -32,7 +33,22 @@ declare global { } } - export {} ``` + +A standard project file tree:
+ +![file tree](../../../static/img/fs.png) + + +:::tip +Usually, you would use the create-bot tool. +For brand new bots, run + +```sh +npm create @sern/bot +``` + +and follow the interactive prompts. +:::tip diff --git a/static/img/fs.png b/static/img/fs.png new file mode 100644 index 000000000..34fb04457 Binary files /dev/null and b/static/img/fs.png differ