more config

This commit is contained in:
Jacob Nguyen
2024-07-18 16:50:58 -05:00
parent 0ac2b02e24
commit 15d6008ba3
2 changed files with 24 additions and 2 deletions

View File

@@ -42,19 +42,36 @@ Sern.init(config)
```
## Optional
### events
Supply a directory for sern to register [event modules](/v4/reference/modules)
```js
export const events = "./dist/events"
```
### tasks
Supply a directory for sern to register [scheduled tasks](/v4/reference/tasks)
```js
export const tasks = "./dist/tasks"
```
### defaultPrefix
Supply a prefix for sern to enable text commands.
```js
export const defaultPrefix = "?"
```
### user defined
Feel free to supply any other constants / variables you may need.
```js
export const OWNERS = ['182326315813306368']
```
:::warning
If you use javascript + common.js, star imports do not work. Please export an object default and put your configuration there.
```js
exports.default = {
commands : "./dist/commands",
}
```
:::

View File

@@ -153,6 +153,11 @@ We are now moving to event modules, which listens to the vast streams of data pr
- `discord.js`, `EventType.Discord`
- `yourself`, `EventType.External`
If you haven't already, add the `events` directory to your [config](/v4/reference/config)
```js
export const events="./dist/tasks";
```
<FileTree>
- src/events/