feat: fixing some links after repo change

This commit is contained in:
Jacob Nguyen
2022-08-09 16:20:31 -05:00
parent e43eec5f20
commit 6f4ab8ef9c
7 changed files with 18 additions and 17 deletions

View File

@@ -1,10 +1,6 @@
Tell the users how to prepare to code.
like installing node & npm & etc.
(this is for the user who never coded before)
# Preparing to Code
After installing and IDE you need to insall node.
After installing and IDE you need to install node.
You can download the LTS version of node right [here](https://nodejs.org/en/download/release/latest/)

View File

@@ -30,10 +30,10 @@ exports.default = commandModule({
},
})
```
To view what each of these properties mean in depth, visit the [official documentation](https://sern-handler.js.org/docs).
To view what each of these properties mean in depth, visit the [official documentation](https://sern-handler.js.org/docs/api/enums/CommandType).
### Types of command modules
Every command module `type` is part of an enum. This field allows type inference for the rest of a module's fields. <br />
All the command types can be found in the [official documentation](https://sern-handler.js.org/docs)!
All the command types can be found in the [official documentation](https://sern-handler.js.org/docs/api/enums/CommandType)!
<p>So, lets say you want to make a command module that listens to modals. </p>
**Note**: Keep in mind you'll need to send a modal with a custom id `dm-me`. This example below is the response to a modal being sent.
@@ -73,7 +73,7 @@ Commands are straight forward. Keep in mind, every other property on the command
optional **except** the type and execute function.
# Context class
The provided Context class helps with modules of `CommandType.Both` ( A mixture of slash / legacy commands )
The provided Context class helps with modules of `CommandType.Both` (A mixture of slash / legacy commands)
In short, Slash Commands, Both Commands, Text Commands carry a Context data structure
The Context class is passed into modules with type :

View File

@@ -23,9 +23,9 @@ exports.default = eventModule({
})
```
Like command modules, the `type` property denotes what kind of event it is, which
can be found [here](https://sern-handler.js.org/docs).
can be found [here](https://sern-handler.js.org/docs/api/enums/EventType).
To view what each of these properties mean in depth, visit the [official documentation](https://sern-handler.js.org/docs).
To view what each of these properties mean in depth, visit the [official documentation](https://sern-handler.js.org/docs/api/enums/EventType).
<br />
Event modules are laid out similarly to command modules. These listen to any and all event you provide.

View File

@@ -1,9 +1,11 @@
# Good to know
## sern.config.json
A sern.config.json, although not necessary, allows your project to communicate with our cli.
<p>A sern.config.json, although not necessary, allows your project to communicate with our cli.</p>
For example, when installing typescript plugins, the language property is necessary to install from our
[open source repository](https://github.com/sern-handler/awesome-plugins).
[open source repository](https://github.com/sern-handler/awesome-plugins). <br />
Using the cli and running `sern init --sync` on pre-existing projects should install this json file in the root directory given.
Or, if this is a brand-new project, `sern init` automatically installs it.

View File

@@ -1,9 +1,11 @@
# Plugins
As of now, modules seem a little underwhelming. It appears that sern doesn't have all the features of a standard handler,
which manages permissions, categorizes, cool-downs, publishes application commands, role permissions, etc. Many important
parts that manage access and help streamline command creation to make are apparently absent.
Below is an example of an event plugin, one of the types of plugins.
<p>As of now, modules seem a little underwhelming. It appears that sern doesn't have all the features of a standard handler,
which manages permissions, categorizes, cool-downs, publishes application commands, role permissions, etc.</p>
<p>Many important parts that manage access and help streamline command creation to make are apparently absent.
Below is an example of an event plugin, one of the types of plugins.</p>
Typescript:
```typescript

View File

@@ -4,4 +4,5 @@ You're shipped with the SernEmitter. This EventEmitter listens to
- command modules registered and its status, the `module.register` event
- any errors that are recoverable, the `error` event
<br /> You can put these and other event listeners into event modules!
<br /> You can put these and other event listeners into event modules!
<br /> View all <a href="https://sern-handler.js.org/docs/api/modules#serneventsmapping">events</a>