mirror of
https://github.com/sern-handler/website
synced 2026-06-06 01:16:47 +00:00
more config
This commit is contained in:
@@ -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",
|
||||
}
|
||||
```
|
||||
:::
|
||||
|
||||
@@ -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/
|
||||
|
||||
Reference in New Issue
Block a user