From 15d6008ba35d3083b7fcc549fc535b30359a4024 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Thu, 18 Jul 2024 16:50:58 -0500 Subject: [PATCH] more config --- src/content/docs/v4/reference/config.mdx | 21 +++++++++++++++++++-- src/content/docs/v4/reference/modules.mdx | 5 +++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/content/docs/v4/reference/config.mdx b/src/content/docs/v4/reference/config.mdx index 8aac8b212..d74946527 100644 --- a/src/content/docs/v4/reference/config.mdx +++ b/src/content/docs/v4/reference/config.mdx @@ -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", +} +``` +::: diff --git a/src/content/docs/v4/reference/modules.mdx b/src/content/docs/v4/reference/modules.mdx index dcff352c3..edb426aa3 100644 --- a/src/content/docs/v4/reference/modules.mdx +++ b/src/content/docs/v4/reference/modules.mdx @@ -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"; +``` + - src/events/