feat: blog2/main (#30)

This commit is contained in:
Jacob Nguyen
2022-12-28 13:43:41 -06:00
committed by GitHub
parent 486b4eced9
commit 39ff89aa00
57 changed files with 4134 additions and 463 deletions

80
.idea/workspace.xml generated
View File

@@ -4,9 +4,9 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="53dd69d3-e01a-4656-b414-c727f5aa549a" name="Changes" comment="feat: change date of blog">
<change afterPath="$PROJECT_DIR$/blog/2022-12-13-mdx-blog-post.md" afterDir="false" />
<list default="true" id="53dd69d3-e01a-4656-b414-c727f5aa549a" name="Changes" comment="feat: add image">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/blog/2022-12-13-mdx-blog-post.md" beforeDir="false" afterPath="$PROJECT_DIR$/blog/2022-12-13-mdx-blog-post.md" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -60,7 +60,8 @@
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;project.structure.last.edited&quot;: &quot;Modules&quot;,
&quot;project.structure.proportion&quot;: &quot;0.0&quot;,
&quot;project.structure.side.proportion&quot;: &quot;0.0&quot;
&quot;project.structure.side.proportion&quot;: &quot;0.0&quot;,
&quot;ts.external.directory.path&quot;: &quot;E:\\IntelliJ IDEA 2022.1.1\\plugins\\JavaScriptLanguage\\jsLanguageServicesImpl\\external&quot;
}
}</component>
<component name="RecentsManager">
@@ -128,7 +129,10 @@
<workItem from="1664342844947" duration="41000" />
<workItem from="1664345686862" duration="1690000" />
<workItem from="1670994246639" duration="17000" />
<workItem from="1670994294247" duration="944000" />
<workItem from="1670994294247" duration="1058000" />
<workItem from="1671030002725" duration="5842000" />
<workItem from="1671047161316" duration="3576000" />
<workItem from="1671119393024" duration="3889000" />
</task>
<task id="LOCAL-00001" summary="feat: remove old index.html in static/">
<created>1660418841831</created>
@@ -235,7 +239,63 @@
<option name="project" value="LOCAL" />
<updated>1664347141696</updated>
</task>
<option name="localTasksCounter" value="16" />
<task id="LOCAL-00016" summary="feat: starting writing 2.0 release blog">
<created>1670995351643</created>
<option name="number" value="00016" />
<option name="presentableId" value="LOCAL-00016" />
<option name="project" value="LOCAL" />
<updated>1670995351643</updated>
</task>
<task id="LOCAL-00017" summary="feat: adding more to blog">
<created>1671035904313</created>
<option name="number" value="00017" />
<option name="presentableId" value="LOCAL-00017" />
<option name="project" value="LOCAL" />
<updated>1671035904313</updated>
</task>
<task id="LOCAL-00018" summary="feat: update docs and links">
<created>1671049168115</created>
<option name="number" value="00018" />
<option name="presentableId" value="LOCAL-00018" />
<option name="project" value="LOCAL" />
<updated>1671049168115</updated>
</task>
<task id="LOCAL-00019" summary="feat: update docs and links">
<created>1671049335597</created>
<option name="number" value="00019" />
<option name="presentableId" value="LOCAL-00019" />
<option name="project" value="LOCAL" />
<updated>1671049335597</updated>
</task>
<task id="LOCAL-00020" summary="feat: fix blog links">
<created>1671050397033</created>
<option name="number" value="00020" />
<option name="presentableId" value="LOCAL-00020" />
<option name="project" value="LOCAL" />
<updated>1671050397033</updated>
</task>
<task id="LOCAL-00021" summary="feat: update blog">
<created>1671121547701</created>
<option name="number" value="00021" />
<option name="presentableId" value="LOCAL-00021" />
<option name="project" value="LOCAL" />
<updated>1671121547701</updated>
</task>
<task id="LOCAL-00022" summary="feat: update typedoc">
<created>1671121807771</created>
<option name="number" value="00022" />
<option name="presentableId" value="LOCAL-00022" />
<option name="project" value="LOCAL" />
<updated>1671121807771</updated>
</task>
<task id="LOCAL-00023" summary="feat: try again">
<created>1671123452807</created>
<option name="number" value="00023" />
<option name="presentableId" value="LOCAL-00023" />
<option name="project" value="LOCAL" />
<updated>1671123452807</updated>
</task>
<option name="localTasksCounter" value="24" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@@ -267,6 +327,14 @@
<MESSAGE value="fix: links" />
<MESSAGE value="fix: try fiux" />
<MESSAGE value="feat: change date of blog" />
<option name="LAST_COMMIT_MESSAGE" value="feat: change date of blog" />
<MESSAGE value="feat: starting writing 2.0 release blog" />
<MESSAGE value="feat: adding more to blog" />
<MESSAGE value="feat: update docs and links" />
<MESSAGE value="feat: fix blog links" />
<MESSAGE value="feat: update blog" />
<MESSAGE value="feat: update typedoc" />
<MESSAGE value="feat: try again" />
<MESSAGE value="feat: add image" />
<option name="LAST_COMMIT_MESSAGE" value="feat: add image" />
</component>
</project>

View File

@@ -6,6 +6,7 @@ tags: [release]
---
## 2.0 Release
Join our [discord](https://sern.dev/discord)! <br />
Wow! We're finally increasing our semantic versioning by +`1.7.9.` <br />
What does this mean?
@@ -41,5 +42,150 @@ export default eventModule({
```
## Dependency Injection and Decoupling
THIS SECTION IS PROBABLY THE MOST IMPORTANT!! <br/>
i should have eaten something before i feel hungry
The powerful npm package `iti` decouples sern even more.
Decoupling data structures with the Inversion of Control pattern separates data from logic, which will help speed production
and make sern even more customizable than before.
### How do I start?
```typescript title="src/index.ts"
//With typescript, you can customize / augment your typings.
interface MyDependencies extends Dependencies {
'@sern/client' : Singleton<Client>;
'@sern/logger' : Singleton<DefaultLogging>
}
export const useContainer = Sern.makeDependencies<MyDependencies>({
// exclude: new Set(['@sern/logger']), don't autofill optional dependencies
build: root => root
.add({ '@sern/client': single(client) })
.add({ '@sern/logger': single(new DefaultLogging()) })
});
Sern.init({
defaultPrefix: '!', // removing defaultPrefix will shut down text commands
commands: 'src/commands',
// events: 'src/events' (optional),
containerConfig : {
get: useContainer //pass in your dependency getter here
}
});
```
Using the `Sern#makeDependencies` function, inject your dependencies.
We'll use specific dependencies that are created with the `@sern/keyword`
key.
Using typescript to display all `keywords` and what they represent:
```typescript
export interface Dependencies {
'@sern/client': Singleton<EventEmitter>; //Discord Client
'@sern/logger'?: Singleton<Logging>; //Logger
'@sern/emitter': Singleton<SernEmitter>; //SernEmitter
'@sern/store' : Singleton<ModuleStore>; //Stores all Command Modules
'@sern/modules' : Singleton<ModuleManager>; //Manages Modules
'@sern/errors': Singleton<ErrorHandling>; //A Lifetime / Crash Handler
}
```
:::danger
Sern#addExternal has been deprecated and removed in favor of Sern#makeDependencies
:::
At the moment, one optional dependency, `@sern/logger`, exists. If not added explicitly,
we'll **autofill** with a [DefaultLogger](https://sern.dev/docs/api/classes/defaultlogging).
:::tip
If you don't want a logger, add it to the
`exclude` field while composing dependencies.
:::
Use your generated dependency getter `useContainer` (use whatever name you want), access them
from anywhere.
:::note
the function [useContainerRaw](https://sern.dev/docs/api/modules#usecontainerraw) is provided for direct access to dependencies and the internal
data structure. Use this wisely as no guarantees are made and crashes can happen.
:::
The `build` field follows [createContainer](https://itijs.org/docs/quick-start#usage) function call.
## New CommandTypes
2.0 includes all the new role select menus. `CommandType.MenuSelect` has been renamed into
`CommandType.StringSelect`. The remaining SelectMenus are
`CommandType.RoleSelect`, `CommandType.ChannelSelect`, `CommandType.UserSelect`, `CommandType.MentionableSelect`
```typescript title="commands/roleselect.ts"
export default commandModule({
type: CommandType.RoleSelect,
execute(ctx) {
ctx.reply('role select')
},
})
```
In addition, commandModules with ContextMenus have been renamed.
```diff
- CommandType.MenuUser, CommandType.MenuMsg
+ CommandType.CtxUser, CommandType.CtxMsg
```
## Typings Simplification
Pre 2.0:
<img src="https://cdn.discordapp.com/attachments/820348341358952550/1038577974829666386/image.png" />
<br/> <br/> <br/>
Post 2.0:
<br/>
<img src="https://cdn.discordapp.com/attachments/820348341358952550/1052623728489550015/image.png" />
CommandPlugin<T\> and EventPlugin<T\> typings have also been static'ified, transformed from types to interfaces
## Breaking Changes
<img src="https://img.srizan.ml/Discord_z8Sn1UBfEe.png" />
<br />
All deprecation warnings from previous versions have taken effect, and are removed in 2.0.
```diff
- type Module = EventModule | CommandModule
+ type AnyModule = EventModule | CommandModule
-export type SpreadParams<T extends (...args: never) => unknown> = (
- args: Parameters<T>[number],
- ) => unknown;
```
Override type has been removed due to redundancy
```diff
- discord.js : 14.5
+ discord.js : 14.7
-typescript: 4.7
+ typescript: 4.9
```
```diff
+ interface Wrapper {
+ readonly defaultPrefix?: string;
+ readonly commands: string;
+ readonly events?: string;
+ readonly containerConfig : {
+ get: (...keys: (keyof Dependencies)[]) => unknown[];
+ }
+}
- interface Wrapper {
- readonly client: Client;
- readonly sernEmitter?: SernEmitter;
- readonly defaultPrefix?: string;
- readonly commands: string;
- readonly events?:
- | string
- | { mod: EventModule; absPath: string }[]
- | (() => { mod: EventModule; absPath: string }[]);
-}
```
```diff
+ DefaultLogger
+ DefaultModuleManager
+ SernEmitter
+ DefaultErrorHandling
+ type Singleton<T> = () => T
+ type Transient<T> = () => () => T;
+ type LogPayload<T = unknown> = { message: T }
+ export const single = <T>() => T
+ export const many = <T>() => () => T
```
Including the previous section, some names to symbols and data structures were altered to
be better represented. view [changelog](/404.html)
## Context refactoring
The context data structure has been internally altered to represent its dynamics better.

View File

@@ -28,31 +28,31 @@ custom_edit_url: null
### execute
`Abstract` **execute**: `CommandModuleDefs`[`Type`][``"execute"``]
`Abstract` **execute**: [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`Type`][``"execute"``]
#### Defined in
[src/handler/sern.ts:132](https://github.com/sern-handler/handler/blob/4074274/src/handler/sern.ts#L132)
[src/handler/sern.ts:101](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L101)
___
### onEvent
• **onEvent**: [`EventPlugin`](../modules.md#eventplugin)<`Type`\>[] = `[]`
• **onEvent**: [`EventPlugin`](../interfaces/EventPlugin.md)<`Type`\>[] = `[]`
#### Defined in
[src/handler/sern.ts:131](https://github.com/sern-handler/handler/blob/4074274/src/handler/sern.ts#L131)
[src/handler/sern.ts:100](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L100)
___
### plugins
• **plugins**: [`CommandPlugin`](../modules.md#commandplugin)<`Type`\>[] = `[]`
• **plugins**: [`CommandPlugin`](../interfaces/CommandPlugin.md)<`Type`\>[] = `[]`
#### Defined in
[src/handler/sern.ts:130](https://github.com/sern-handler/handler/blob/4074274/src/handler/sern.ts#L130)
[src/handler/sern.ts:99](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L99)
___
@@ -62,4 +62,4 @@ ___
#### Defined in
[src/handler/sern.ts:129](https://github.com/sern-handler/handler/blob/4074274/src/handler/sern.ts#L129)
[src/handler/sern.ts:98](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L98)

View File

@@ -13,32 +13,31 @@ Message and ChatInputCommandInteraction
### constructor
`Private` **new Context**(`oMsg?`, `oInterac?`)
`Private` **new Context**(`ctx`)
#### Parameters
| Name | Type | Default value |
| :------ | :------ | :------ |
| `oMsg` | `Option`<`Message`<`boolean`\>\> | `None` |
| `oInterac` | `Option`<`ChatInputCommandInteraction`<`CacheType`\>\> | `None` |
| Name | Type |
| :------ | :------ |
| `ctx` | `Result`<`Message`<`boolean`\>, `ChatInputCommandInteraction`<`CacheType`\>\> |
#### Defined in
[src/handler/structures/context.ts:31](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/context.ts#L31)
[src/handler/structures/context.ts:23](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L23)
## Accessors
### channel
`get` **channel**(): [`Nullish`](../modules.md#nullish)<`TextBasedChannel`\>
`get` **channel**(): ``null`` \| `TextBasedChannel`
#### Returns
[`Nullish`](../modules.md#nullish)<`TextBasedChannel`\>
``null`` \| `TextBasedChannel`
#### Defined in
[src/handler/structures/context.ts:63](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/context.ts#L63)
[src/handler/structures/context.ts:51](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L51)
___
@@ -52,7 +51,7 @@ ___
#### Defined in
[src/handler/structures/context.ts:108](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/context.ts#L108)
[src/handler/structures/context.ts:98](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L98)
___
@@ -66,35 +65,35 @@ ___
#### Defined in
[src/handler/structures/context.ts:77](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/context.ts#L77)
[src/handler/structures/context.ts:67](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L67)
___
### guild
`get` **guild**(): `Guild`
• `get` **guild**(): ``null`` \| `Guild`
#### Returns
`Guild`
``null`` \| `Guild`
#### Defined in
[src/handler/structures/context.ts:84](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/context.ts#L84)
[src/handler/structures/context.ts:74](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L74)
___
### guildId
`get` **guildId**(): `string`
• `get` **guildId**(): ``null`` \| `string`
#### Returns
`string`
``null`` \| `string`
#### Defined in
[src/handler/structures/context.ts:91](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/context.ts#L91)
[src/handler/structures/context.ts:81](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L81)
___
@@ -108,7 +107,7 @@ ___
#### Defined in
[src/handler/structures/context.ts:56](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/context.ts#L56)
[src/handler/structures/context.ts:44](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L44)
___
@@ -122,7 +121,7 @@ ___
#### Defined in
[src/handler/structures/context.ts:115](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/context.ts#L115)
[src/handler/structures/context.ts:105](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L105)
___
@@ -140,21 +139,21 @@ Message
#### Defined in
[src/handler/structures/context.ts:52](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/context.ts#L52)
[src/handler/structures/context.ts:40](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L40)
___
### member
`get` **member**(): [`Nullish`](../modules.md#nullish)<`GuildMember` \| `APIGuildMember`\>
• `get` **member**(): ``null`` \| `GuildMember` \| `APIInteractionGuildMember`
#### Returns
[`Nullish`](../modules.md#nullish)<`GuildMember` \| `APIGuildMember`\>
``null`` \| `GuildMember` \| `APIInteractionGuildMember`
#### Defined in
[src/handler/structures/context.ts:101](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/context.ts#L101)
[src/handler/structures/context.ts:91](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L91)
___
@@ -172,7 +171,7 @@ ChatInputCommandInteraction
#### Defined in
[src/handler/structures/context.ts:44](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/context.ts#L44)
[src/handler/structures/context.ts:32](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L32)
___
@@ -180,19 +179,22 @@ ___
• `get` **user**(): `User`
If context is holding a message, message.author
else, interaction.user
#### Returns
`User`
#### Defined in
[src/handler/structures/context.ts:70](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/context.ts#L70)
[src/handler/structures/context.ts:60](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L60)
## Methods
### isEmpty
### isMessage
**isEmpty**(): `boolean`
▸ **isMessage**(): `boolean`
#### Returns
@@ -200,7 +202,21 @@ ___
#### Defined in
[src/handler/structures/context.ts:129](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/context.ts#L129)
[src/handler/structures/context.ts:111](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L111)
___
### isSlash
▸ **isSlash**(): `boolean`
#### Returns
`boolean`
#### Defined in
[src/handler/structures/context.ts:115](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L115)
___
@@ -220,7 +236,7 @@ ___
#### Defined in
[src/handler/structures/context.ts:133](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/context.ts#L133)
[src/handler/structures/context.ts:126](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L126)
___
@@ -240,4 +256,4 @@ ___
#### Defined in
[src/handler/structures/context.ts:122](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/context.ts#L122)
[src/handler/structures/context.ts:119](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L119)

View File

@@ -0,0 +1,85 @@
---
id: "DefaultErrorHandling"
title: "Class: DefaultErrorHandling"
sidebar_label: "DefaultErrorHandling"
sidebar_position: 0
custom_edit_url: null
---
## Implements
- [`ErrorHandling`](../interfaces/ErrorHandling.md)
## Constructors
### constructor
**new DefaultErrorHandling**()
## Properties
### keepAlive
**keepAlive**: `number` = `5`
Number of times the process should throw an error until crashing and exiting
#### Implementation of
[ErrorHandling](../interfaces/ErrorHandling.md).[keepAlive](../interfaces/ErrorHandling.md#keepalive)
#### Defined in
[src/handler/contracts/errorHandling.ts:25](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/errorHandling.ts#L25)
## Methods
### crash
**crash**(`error`): `never`
Utility function to crash
#### Parameters
| Name | Type |
| :------ | :------ |
| `error` | `Error` |
#### Returns
`never`
#### Implementation of
[ErrorHandling](../interfaces/ErrorHandling.md).[crash](../interfaces/ErrorHandling.md#crash)
#### Defined in
[src/handler/contracts/errorHandling.ts:26](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/errorHandling.ts#L26)
___
### updateAlive
**updateAlive**(`e`): `void`
A function that is called on every crash. Updates keepAlive
#### Parameters
| Name | Type |
| :------ | :------ |
| `e` | `Error` |
#### Returns
`void`
#### Implementation of
[ErrorHandling](../interfaces/ErrorHandling.md).[updateAlive](../interfaces/ErrorHandling.md#updatealive)
#### Defined in
[src/handler/contracts/errorHandling.ts:29](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/errorHandling.ts#L29)

View File

@@ -0,0 +1,127 @@
---
id: "DefaultLogging"
title: "Class: DefaultLogging"
sidebar_label: "DefaultLogging"
sidebar_position: 0
custom_edit_url: null
---
## Implements
- [`Logging`](../interfaces/Logging.md)
## Constructors
### constructor
**new DefaultLogging**()
## Methods
### date
`Private` **date**(): `Date`
#### Returns
`Date`
#### Defined in
[src/handler/contracts/logging.ts:11](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L11)
___
### debug
**debug**(`payload`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`LogPayload`](../modules.md#logpayload)<`unknown`\> |
#### Returns
`void`
#### Implementation of
[Logging](../interfaces/Logging.md).[debug](../interfaces/Logging.md#debug)
#### Defined in
[src/handler/contracts/logging.ts:12](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L12)
___
### error
**error**(`payload`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`LogPayload`](../modules.md#logpayload)<`unknown`\> |
#### Returns
`void`
#### Implementation of
[Logging](../interfaces/Logging.md).[error](../interfaces/Logging.md#error)
#### Defined in
[src/handler/contracts/logging.ts:16](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L16)
___
### info
**info**(`payload`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`LogPayload`](../modules.md#logpayload)<`unknown`\> |
#### Returns
`void`
#### Implementation of
[Logging](../interfaces/Logging.md).[info](../interfaces/Logging.md#info)
#### Defined in
[src/handler/contracts/logging.ts:20](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L20)
___
### warning
**warning**(`payload`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`LogPayload`](../modules.md#logpayload)<`unknown`\> |
#### Returns
`void`
#### Implementation of
[Logging](../interfaces/Logging.md).[warning](../interfaces/Logging.md#warning)
#### Defined in
[src/handler/contracts/logging.ts:24](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L24)

View File

@@ -0,0 +1,81 @@
---
id: "DefaultModuleManager"
title: "Class: DefaultModuleManager"
sidebar_label: "DefaultModuleManager"
sidebar_position: 0
custom_edit_url: null
---
## Implements
- [`ModuleManager`](../interfaces/ModuleManager.md)
## Constructors
### constructor
**new DefaultModuleManager**(`moduleStore`)
#### Parameters
| Name | Type |
| :------ | :------ |
| `moduleStore` | [`ModuleStore`](ModuleStore.md) |
#### Defined in
[src/handler/contracts/moduleManager.ts:12](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/moduleManager.ts#L12)
## Methods
### get
**get**<`T`\>(`strat`): `undefined` \| [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends [`CommandType`](../enums/CommandType.md) |
#### Parameters
| Name | Type |
| :------ | :------ |
| `strat` | (`ms`: [`ModuleStore`](ModuleStore.md)) => `undefined` \| [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`] |
#### Returns
`undefined` \| [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]
#### Implementation of
[ModuleManager](../interfaces/ModuleManager.md).[get](../interfaces/ModuleManager.md#get)
#### Defined in
[src/handler/contracts/moduleManager.ts:13](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/moduleManager.ts#L13)
___
### set
**set**(`strat`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `strat` | (`ms`: [`ModuleStore`](ModuleStore.md)) => `void` |
#### Returns
`void`
#### Implementation of
[ModuleManager](../interfaces/ModuleManager.md).[set](../interfaces/ModuleManager.md#set)
#### Defined in
[src/handler/contracts/moduleManager.ts:17](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/moduleManager.ts#L17)

View File

@@ -28,11 +28,11 @@ custom_edit_url: null
### execute
`Abstract` **execute**: `EventModuleDefs`[`Type`][``"execute"``]
`Abstract` **execute**: [`EventModuleDefs`](../modules.md#eventmoduledefs)[`Type`][``"execute"``]
#### Defined in
[src/handler/sern.ts:139](https://github.com/sern-handler/handler/blob/4074274/src/handler/sern.ts#L139)
[src/handler/sern.ts:108](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L108)
___
@@ -42,7 +42,7 @@ ___
#### Defined in
[src/handler/sern.ts:138](https://github.com/sern-handler/handler/blob/4074274/src/handler/sern.ts#L138)
[src/handler/sern.ts:107](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L107)
___
@@ -52,7 +52,7 @@ ___
#### Defined in
[src/handler/sern.ts:137](https://github.com/sern-handler/handler/blob/4074274/src/handler/sern.ts#L137)
[src/handler/sern.ts:106](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L106)
___
@@ -62,4 +62,4 @@ ___
#### Defined in
[src/handler/sern.ts:136](https://github.com/sern-handler/handler/blob/4074274/src/handler/sern.ts#L136)
[src/handler/sern.ts:105](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L105)

View File

@@ -0,0 +1,85 @@
---
id: "ModuleStore"
title: "Class: ModuleStore"
sidebar_label: "ModuleStore"
sidebar_position: 0
custom_edit_url: null
---
Storing all command modules
This dependency is usually injected into ModuleManager
## Constructors
### constructor
**new ModuleStore**()
## Properties
### ApplicationCommands
`Readonly` **ApplicationCommands**: `Object`
#### Type declaration
| Name | Type |
| :------ | :------ |
| `1` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
| `2` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
| `3` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
#### Defined in
[src/handler/structures/moduleStore.ts:10](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/moduleStore.ts#L10)
___
### BothCommands
`Readonly` **BothCommands**: `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\>
#### Defined in
[src/handler/structures/moduleStore.ts:9](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/moduleStore.ts#L9)
___
### InteractionHandlers
`Readonly` **InteractionHandlers**: `Object`
#### Type declaration
| Name | Type |
| :------ | :------ |
| `2` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
| `3` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
| `5` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
| `6` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
| `7` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
| `8` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
#### Defined in
[src/handler/structures/moduleStore.ts:17](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/moduleStore.ts#L17)
___
### ModalSubmit
`Readonly` **ModalSubmit**: `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\>
#### Defined in
[src/handler/structures/moduleStore.ts:15](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/moduleStore.ts#L15)
___
### TextCommands
`Readonly` **TextCommands**: `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\>
#### Defined in
[src/handler/structures/moduleStore.ts:16](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/moduleStore.ts#L16)

View File

@@ -148,7 +148,7 @@ Listening to sern events with on. This event stays on until a crash or a normal
| Name | Type | Description |
| :------ | :------ | :------ |
| `eventName` | `T` | |
| `...args` | [`SernEventsMapping`](../modules.md#serneventsmapping)[`T`] | the arguments for emitting the { eventName } |
| `...args` | [`SernEventsMapping`](../modules.md#serneventsmapping)[`T`] | the arguments for emitting the eventName |
#### Returns
@@ -160,7 +160,7 @@ EventEmitter.emit
#### Defined in
[src/handler/sernEmitter.ts:32](https://github.com/sern-handler/handler/blob/4074274/src/handler/sernEmitter.ts#L32)
[src/handler/sernEmitter.ts:32](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sernEmitter.ts#L32)
___
@@ -355,7 +355,7 @@ EventEmitter.on
#### Defined in
[src/handler/sernEmitter.ts:10](https://github.com/sern-handler/handler/blob/4074274/src/handler/sernEmitter.ts#L10)
[src/handler/sernEmitter.ts:10](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sernEmitter.ts#L10)
___
@@ -388,7 +388,7 @@ EventEmitter.once
#### Defined in
[src/handler/sernEmitter.ts:21](https://github.com/sern-handler/handler/blob/4074274/src/handler/sernEmitter.ts#L21)
[src/handler/sernEmitter.ts:21](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sernEmitter.ts#L21)
___
@@ -888,24 +888,25 @@ EventEmitter.on
node_modules/@types/node/events.d.ts:217
`Static` **on**<`K`\>(`eventEmitter`, `eventName`): `AsyncIterableIterator`<`ClientEvents`[`K`]\>
`Static` **on**<`E`, `K`\>(`eventEmitter`, `eventName`): `AsyncIterableIterator`<`E` extends `Client`<`boolean`\> ? `ClientEvents`[`K`] : `any`\>
#### Type parameters
| Name | Type |
| :------ | :------ |
| `E` | extends `__module` |
| `K` | extends keyof `ClientEvents` |
#### Parameters
| Name | Type |
| :------ | :------ |
| `eventEmitter` | `Client`<`boolean`\> |
| `eventName` | `K` |
| `eventEmitter` | `E` |
| `eventName` | `E` extends `Client`<`boolean`\> ? `K` : `string` |
#### Returns
`AsyncIterableIterator`<`ClientEvents`[`K`]\>
`AsyncIterableIterator`<`E` extends `Client`<`boolean`\> ? `ClientEvents`[`K`] : `any`\>
#### Inherited from
@@ -913,7 +914,7 @@ EventEmitter.on
#### Defined in
node_modules/discord.js/typings/index.d.ts:197
node_modules/discord.js/typings/index.d.ts:222
___
@@ -1047,24 +1048,25 @@ EventEmitter.once
node_modules/@types/node/events.d.ts:158
`Static` **once**<`K`\>(`eventEmitter`, `eventName`): `Promise`<`ClientEvents`[`K`]\>
`Static` **once**<`E`, `K`\>(`eventEmitter`, `eventName`): `Promise`<`E` extends `Client`<`boolean`\> ? `ClientEvents`[`K`] : `any`[]\>
#### Type parameters
| Name | Type |
| :------ | :------ |
| `E` | extends `__module` |
| `K` | extends keyof `ClientEvents` |
#### Parameters
| Name | Type |
| :------ | :------ |
| `eventEmitter` | `Client`<`boolean`\> |
| `eventName` | `K` |
| `eventEmitter` | `E` |
| `eventName` | `E` extends `Client`<`boolean`\> ? `K` : `string` |
#### Returns
`Promise`<`ClientEvents`[`K`]\>
`Promise`<`E` extends `Client`<`boolean`\> ? `ClientEvents`[`K`] : `any`[]\>
#### Inherited from
@@ -1072,7 +1074,7 @@ EventEmitter.once
#### Defined in
node_modules/discord.js/typings/index.d.ts:196
node_modules/discord.js/typings/index.d.ts:218
___

View File

@@ -6,6 +6,8 @@ sidebar_position: 0
custom_edit_url: null
---
A bitfield that discriminates command modules
**`Example`**
```ts
@@ -29,7 +31,7 @@ The CommandType for hybrid commands, text and slash
#### Defined in
[src/handler/structures/enums.ts:27](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/enums.ts#L27)
[src/handler/structures/enums.ts:28](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L28)
___
@@ -41,43 +43,53 @@ The CommandType for ButtonInteraction commands
#### Defined in
[src/handler/structures/enums.ts:39](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/enums.ts#L39)
[src/handler/structures/enums.ts:40](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L40)
___
### MenuMsg
### ChannelSelect
• **MenuMsg** = ``8``
• **ChannelSelect** = ``256``
The CommandType for the other SelectMenuInteractions
#### Defined in
[src/handler/structures/enums.ts:52](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L52)
___
### CtxMsg
• **CtxMsg** = ``8``
The CommandType for MessageContextMenuInteraction commands
#### Defined in
[src/handler/structures/enums.ts:35](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/enums.ts#L35)
[src/handler/structures/enums.ts:36](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L36)
___
### MenuSelect
### CtxUser
• **MenuSelect** = ``32``
The CommandType for SelectMenuInteraction commands
#### Defined in
[src/handler/structures/enums.ts:43](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/enums.ts#L43)
___
### MenuUser
• **MenuUser** = ``4``
• **CtxUser** = ``4``
The CommandType for UserContextMenuInteraction commands
#### Defined in
[src/handler/structures/enums.ts:31](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/enums.ts#L31)
[src/handler/structures/enums.ts:32](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L32)
___
### MentionableSelect
• **MentionableSelect** = ``512``
#### Defined in
[src/handler/structures/enums.ts:53](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L53)
___
@@ -89,7 +101,17 @@ The CommandType for ModalSubmitInteraction commands
#### Defined in
[src/handler/structures/enums.ts:47](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/enums.ts#L47)
[src/handler/structures/enums.ts:48](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L48)
___
### RoleSelect
• **RoleSelect** = ``1024``
#### Defined in
[src/handler/structures/enums.ts:54](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L54)
___
@@ -101,7 +123,19 @@ The CommandType for slash commands
#### Defined in
[src/handler/structures/enums.ts:23](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/enums.ts#L23)
[src/handler/structures/enums.ts:24](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L24)
___
### StringSelect
• **StringSelect** = ``32``
The CommandType for StringSelectMenuInteraction commands
#### Defined in
[src/handler/structures/enums.ts:44](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L44)
___
@@ -113,4 +147,14 @@ The CommandType for text commands
#### Defined in
[src/handler/structures/enums.ts:19](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/enums.ts#L19)
[src/handler/structures/enums.ts:20](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L20)
___
### UserSelect
• **UserSelect** = ``2048``
#### Defined in
[src/handler/structures/enums.ts:55](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L55)

View File

@@ -6,6 +6,8 @@ sidebar_position: 0
custom_edit_url: null
---
A bitfield that discriminates event modules
**`Example`**
```ts
@@ -29,7 +31,7 @@ The EventType for handling discord events
#### Defined in
[src/handler/structures/enums.ts:68](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/enums.ts#L68)
[src/handler/structures/enums.ts:77](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L77)
___
@@ -42,7 +44,7 @@ Could be for example, `process` events, database events
#### Defined in
[src/handler/structures/enums.ts:77](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/enums.ts#L77)
[src/handler/structures/enums.ts:86](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L86)
___
@@ -54,4 +56,4 @@ The EventType for handling sern events
#### Defined in
[src/handler/structures/enums.ts:72](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/enums.ts#L72)
[src/handler/structures/enums.ts:81](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L81)

View File

@@ -16,7 +16,7 @@ The PayloadType for a SernEmitter failure event
#### Defined in
[src/handler/structures/enums.ts:114](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/enums.ts#L114)
[src/handler/structures/enums.ts:124](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L124)
___
@@ -28,7 +28,7 @@ The PayloadType for a SernEmitter success event
#### Defined in
[src/handler/structures/enums.ts:110](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/enums.ts#L110)
[src/handler/structures/enums.ts:120](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L120)
___
@@ -40,4 +40,4 @@ The PayloadType for a SernEmitter warning event
#### Defined in
[src/handler/structures/enums.ts:118](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/enums.ts#L118)
[src/handler/structures/enums.ts:128](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L128)

View File

@@ -6,6 +6,8 @@ sidebar_position: 0
custom_edit_url: null
---
A bitfield that discriminates plugins
**`Example`**
```ts
@@ -28,7 +30,7 @@ The PluginType for CommandPlugins
#### Defined in
[src/handler/structures/enums.ts:97](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/enums.ts#L97)
[src/handler/structures/enums.ts:107](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L107)
___
@@ -40,4 +42,4 @@ The PluginType for EventPlugins
#### Defined in
[src/handler/structures/enums.ts:101](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/enums.ts#L101)
[src/handler/structures/enums.ts:111](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L111)

View File

@@ -0,0 +1,93 @@
---
id: "AutocompleteCommand"
title: "Interface: AutocompleteCommand"
sidebar_label: "AutocompleteCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Module`](Module.md)
**`AutocompleteCommand`**
## Properties
### description
`Optional` **description**: `undefined`
#### Overrides
[Module](Module.md).[description](Module.md#description)
#### Defined in
[src/types/module.ts:132](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L132)
___
### execute
**execute**: (`ctx`: `AutocompleteInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `AutocompleteInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
[Module](Module.md).[execute](Module.md#execute)
#### Defined in
[src/types/module.ts:135](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L135)
___
### name
`Optional` **name**: `undefined`
#### Overrides
[Module](Module.md).[name](Module.md#name)
#### Defined in
[src/types/module.ts:131](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L131)
___
### onEvent
**onEvent**: [`AutocompletePlugin`](AutocompletePlugin.md)[]
#### Defined in
[src/types/module.ts:134](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L134)
___
### type
`Optional` **type**: `undefined`
#### Overrides
[Module](Module.md).[type](Module.md#type)
#### Defined in
[src/types/module.ts:133](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L133)

View File

@@ -0,0 +1,88 @@
---
id: "AutocompletePlugin"
title: "Interface: AutocompletePlugin"
sidebar_label: "AutocompletePlugin"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Plugin`](Plugin.md)
**`AutocompletePlugin`**
## Properties
### description
`Optional` **description**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[description](Plugin.md#description)
#### Defined in
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
___
### execute
**execute**: (`autocmp`: `AutocompleteInteraction`<`CacheType`\>, `controlller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
#### Type declaration
▸ (`autocmp`, `controlller`): `Awaitable`<`Result`<`void`, `void`\>\>
##### Parameters
| Name | Type |
| :------ | :------ |
| `autocmp` | `AutocompleteInteraction`<`CacheType`\> |
| `controlller` | [`Controller`](Controller.md) |
##### Returns
`Awaitable`<`Result`<`void`, `void`\>\>
#### Defined in
[src/handler/plugins/plugin.ts:73](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L73)
___
### name
`Optional` **name**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[name](Plugin.md#name)
#### Defined in
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
___
### type
**type**: [`Event`](../enums/PluginType.md#event)
#### Overrides
[Plugin](Plugin.md).[type](Plugin.md#type)
#### Defined in
[src/handler/plugins/plugin.ts:72](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L72)

View File

@@ -0,0 +1,124 @@
---
id: "BothCommand"
title: "Interface: BothCommand"
sidebar_label: "BothCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Module`](Module.md)
**`BothCommand`**
## Properties
### alias
`Optional` **alias**: `string`[]
#### Defined in
[src/types/module.ts:62](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L62)
___
### description
`Optional` **description**: `string`
#### Inherited from
[Module](Module.md).[description](Module.md#description)
#### Defined in
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
___
### execute
**execute**: (`ctx`: [`Context`](../classes/Context.md), `args`: [`Args`](../modules.md#args)) => `unknown`
#### Type declaration
▸ (`ctx`, `args`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | [`Context`](../classes/Context.md) |
| `args` | [`Args`](../modules.md#args) |
##### Returns
`unknown`
#### Overrides
[Module](Module.md).[execute](Module.md#execute)
#### Defined in
[src/types/module.ts:64](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L64)
___
### name
`Optional` **name**: `string`
#### Inherited from
[Module](Module.md).[name](Module.md#name)
#### Defined in
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
___
### onEvent
**onEvent**: [`EventPlugin`](EventPlugin.md)<[`Both`](../enums/CommandType.md#both)\>[]
#### Defined in
[src/types/module.ts:60](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L60)
___
### options
`Optional` **options**: ([`SernSubCommandData`](SernSubCommandData.md) \| [`SernSubCommandGroupData`](SernSubCommandGroupData.md) \| [`BaseOptions`](../modules.md#baseoptions))[]
#### Defined in
[src/types/module.ts:63](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L63)
___
### plugins
**plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
#### Defined in
[src/types/module.ts:61](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L61)
___
### type
**type**: [`Both`](../enums/CommandType.md#both)
#### Overrides
[Module](Module.md).[type](Module.md#type)
#### Defined in
[src/types/module.ts:59](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L59)

View File

@@ -0,0 +1,103 @@
---
id: "ButtonCommand"
title: "Interface: ButtonCommand"
sidebar_label: "ButtonCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Module`](Module.md)
**`ButtonCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
[Module](Module.md).[description](Module.md#description)
#### Defined in
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
___
### execute
**execute**: (`ctx`: `ButtonInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `ButtonInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
[Module](Module.md).[execute](Module.md#execute)
#### Defined in
[src/types/module.ts:85](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L85)
___
### name
`Optional` **name**: `string`
#### Inherited from
[Module](Module.md).[name](Module.md#name)
#### Defined in
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
___
### onEvent
**onEvent**: [`EventPlugin`](EventPlugin.md)<[`Button`](../enums/CommandType.md#button)\>[]
#### Defined in
[src/types/module.ts:83](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L83)
___
### plugins
**plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
#### Defined in
[src/types/module.ts:84](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L84)
___
### type
**type**: [`Button`](../enums/CommandType.md#button)
#### Overrides
[Module](Module.md).[type](Module.md#type)
#### Defined in
[src/types/module.ts:82](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L82)

View File

@@ -0,0 +1,103 @@
---
id: "ChannelSelectCommand"
title: "Interface: ChannelSelectCommand"
sidebar_label: "ChannelSelectCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Module`](Module.md)
**`ChannelSelectCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
[Module](Module.md).[description](Module.md#description)
#### Defined in
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
___
### execute
**execute**: (`ctx`: `ChannelSelectMenuInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `ChannelSelectMenuInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
[Module](Module.md).[execute](Module.md#execute)
#### Defined in
[src/types/module.ts:99](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L99)
___
### name
`Optional` **name**: `string`
#### Inherited from
[Module](Module.md).[name](Module.md#name)
#### Defined in
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
___
### onEvent
**onEvent**: [`EventPlugin`](EventPlugin.md)<[`ChannelSelect`](../enums/CommandType.md#channelselect)\>[]
#### Defined in
[src/types/module.ts:97](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L97)
___
### plugins
**plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
#### Defined in
[src/types/module.ts:98](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L98)
___
### type
**type**: [`ChannelSelect`](../enums/CommandType.md#channelselect)
#### Overrides
[Module](Module.md).[type](Module.md#type)
#### Defined in
[src/types/module.ts:96](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L96)

View File

@@ -0,0 +1,96 @@
---
id: "CommandPlugin"
title: "Interface: CommandPlugin<T>"
sidebar_label: "CommandPlugin"
sidebar_position: 0
custom_edit_url: null
---
## Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs) = keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs) |
## Hierarchy
- [`Plugin`](Plugin.md)
**`CommandPlugin`**
## Properties
### description
`Optional` **description**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[description](Plugin.md#description)
#### Defined in
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
___
### execute
**execute**: (`payload`: { `absPath`: `string` ; `mod`: [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`] & { `description`: `string` ; `name`: `string` } }, `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
#### Type declaration
▸ (`payload`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
##### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | `Object` |
| `payload.absPath` | `string` |
| `payload.mod` | [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`] & { `description`: `string` ; `name`: `string` } |
| `controller` | [`Controller`](Controller.md) |
##### Returns
`Awaitable`<`Result`<`void`, `void`\>\>
#### Defined in
[src/handler/plugins/plugin.ts:39](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L39)
___
### name
`Optional` **name**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[name](Plugin.md#name)
#### Defined in
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
___
### type
**type**: [`Command`](../enums/PluginType.md#command)
#### Overrides
[Plugin](Plugin.md).[type](Plugin.md#type)
#### Defined in
[src/handler/plugins/plugin.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L38)

View File

@@ -0,0 +1,103 @@
---
id: "ContextMenuMsg"
title: "Interface: ContextMenuMsg"
sidebar_label: "ContextMenuMsg"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Module`](Module.md)
**`ContextMenuMsg`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
[Module](Module.md).[description](Module.md#description)
#### Defined in
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
___
### execute
**execute**: (`ctx`: `MessageContextMenuCommandInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `MessageContextMenuCommandInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
[Module](Module.md).[execute](Module.md#execute)
#### Defined in
[src/types/module.ts:78](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L78)
___
### name
`Optional` **name**: `string`
#### Inherited from
[Module](Module.md).[name](Module.md#name)
#### Defined in
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
___
### onEvent
**onEvent**: [`EventPlugin`](EventPlugin.md)<[`CtxMsg`](../enums/CommandType.md#ctxmsg)\>[]
#### Defined in
[src/types/module.ts:76](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L76)
___
### plugins
**plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
#### Defined in
[src/types/module.ts:77](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L77)
___
### type
**type**: [`CtxMsg`](../enums/CommandType.md#ctxmsg)
#### Overrides
[Module](Module.md).[type](Module.md#type)
#### Defined in
[src/types/module.ts:75](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L75)

View File

@@ -0,0 +1,103 @@
---
id: "ContextMenuUser"
title: "Interface: ContextMenuUser"
sidebar_label: "ContextMenuUser"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Module`](Module.md)
**`ContextMenuUser`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
[Module](Module.md).[description](Module.md#description)
#### Defined in
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
___
### execute
**execute**: (`ctx`: `UserContextMenuCommandInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `UserContextMenuCommandInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
[Module](Module.md).[execute](Module.md#execute)
#### Defined in
[src/types/module.ts:71](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L71)
___
### name
`Optional` **name**: `string`
#### Inherited from
[Module](Module.md).[name](Module.md#name)
#### Defined in
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
___
### onEvent
**onEvent**: [`EventPlugin`](EventPlugin.md)<[`CtxUser`](../enums/CommandType.md#ctxuser)\>[]
#### Defined in
[src/types/module.ts:69](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L69)
___
### plugins
**plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
#### Defined in
[src/types/module.ts:70](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L70)
___
### type
**type**: [`CtxUser`](../enums/CommandType.md#ctxuser)
#### Overrides
[Module](Module.md).[type](Module.md#type)
#### Defined in
[src/types/module.ts:68](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L68)

View File

@@ -22,7 +22,7 @@ custom_edit_url: null
#### Defined in
[src/handler/plugins/plugin.ts:29](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L29)
[src/handler/plugins/plugin.ts:26](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L26)
___
@@ -40,4 +40,4 @@ ___
#### Defined in
[src/handler/plugins/plugin.ts:30](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L30)
[src/handler/plugins/plugin.ts:27](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L27)

View File

@@ -0,0 +1,67 @@
---
id: "Dependencies"
title: "Interface: Dependencies"
sidebar_label: "Dependencies"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### @sern/client
**@sern/client**: [`Singleton`](../modules.md#singleton)<`__module`\>
#### Defined in
[src/types/handler.ts:41](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L41)
___
### @sern/emitter
**@sern/emitter**: [`Singleton`](../modules.md#singleton)<[`SernEmitter`](../classes/SernEmitter.md)\>
#### Defined in
[src/types/handler.ts:43](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L43)
___
### @sern/errors
**@sern/errors**: [`Singleton`](../modules.md#singleton)<[`ErrorHandling`](ErrorHandling.md)\>
#### Defined in
[src/types/handler.ts:46](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L46)
___
### @sern/logger
`Optional` **@sern/logger**: [`Singleton`](../modules.md#singleton)<[`Logging`](Logging.md)<`unknown`\>\>
#### Defined in
[src/types/handler.ts:42](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L42)
___
### @sern/modules
**@sern/modules**: [`Singleton`](../modules.md#singleton)<[`ModuleManager`](ModuleManager.md)\>
#### Defined in
[src/types/handler.ts:45](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L45)
___
### @sern/store
**@sern/store**: [`Singleton`](../modules.md#singleton)<[`ModuleStore`](../classes/ModuleStore.md)\>
#### Defined in
[src/types/handler.ts:44](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L44)

View File

@@ -0,0 +1,90 @@
---
id: "DiscordEmitterPlugin"
title: "Interface: DiscordEmitterPlugin"
sidebar_label: "DiscordEmitterPlugin"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Plugin`](Plugin.md)
**`DiscordEmitterPlugin`**
## Properties
### description
`Optional` **description**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[description](Plugin.md#description)
#### Defined in
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
___
### execute
**execute**: (`payload`: { `absPath`: `string` ; `mod`: `DiscordEventCommand`<keyof `ClientEvents`\> & { `name`: `string` } }, `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
#### Type declaration
▸ (`payload`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
##### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | `Object` |
| `payload.absPath` | `string` |
| `payload.mod` | `DiscordEventCommand`<keyof `ClientEvents`\> & { `name`: `string` } |
| `controller` | [`Controller`](Controller.md) |
##### Returns
`Awaitable`<`Result`<`void`, `void`\>\>
#### Defined in
[src/handler/plugins/plugin.ts:49](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L49)
___
### name
`Optional` **name**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[name](Plugin.md#name)
#### Defined in
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
___
### type
**type**: [`Command`](../enums/PluginType.md#command)
#### Overrides
[Plugin](Plugin.md).[type](Plugin.md#type)
#### Defined in
[src/handler/plugins/plugin.ts:48](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L48)

View File

@@ -0,0 +1,94 @@
---
id: "DiscordEventPlugin"
title: "Interface: DiscordEventPlugin<T>"
sidebar_label: "DiscordEventPlugin"
sidebar_position: 0
custom_edit_url: null
---
## Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends keyof `ClientEvents` = keyof `ClientEvents` |
## Hierarchy
- [`Plugin`](Plugin.md)
**`DiscordEventPlugin`**
## Properties
### description
`Optional` **description**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[description](Plugin.md#description)
#### Defined in
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
___
### execute
**execute**: (`args`: `ClientEvents`[`T`], `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
#### Type declaration
▸ (`args`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
##### Parameters
| Name | Type |
| :------ | :------ |
| `args` | `ClientEvents`[`T`] |
| `controller` | [`Controller`](Controller.md) |
##### Returns
`Awaitable`<`Result`<`void`, `void`\>\>
#### Defined in
[src/handler/plugins/plugin.ts:105](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L105)
___
### name
`Optional` **name**: `T`
**`Deprecated`**
will be removed in the next update
#### Overrides
[Plugin](Plugin.md).[name](Plugin.md#name)
#### Defined in
[src/handler/plugins/plugin.ts:103](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L103)
___
### type
**type**: [`Event`](../enums/PluginType.md#event)
#### Overrides
[Plugin](Plugin.md).[type](Plugin.md#type)
#### Defined in
[src/handler/plugins/plugin.ts:104](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L104)

View File

@@ -0,0 +1,67 @@
---
id: "ErrorHandling"
title: "Interface: ErrorHandling"
sidebar_label: "ErrorHandling"
sidebar_position: 0
custom_edit_url: null
---
## Implemented by
- [`DefaultErrorHandling`](../classes/DefaultErrorHandling.md)
## Properties
### keepAlive
**keepAlive**: `number`
Number of times the process should throw an error until crashing and exiting
#### Defined in
[src/handler/contracts/errorHandling.ts:9](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/errorHandling.ts#L9)
## Methods
### crash
**crash**(`error`): `never`
Utility function to crash
#### Parameters
| Name | Type |
| :------ | :------ |
| `error` | `Error` |
#### Returns
`never`
#### Defined in
[src/handler/contracts/errorHandling.ts:15](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/errorHandling.ts#L15)
___
### updateAlive
**updateAlive**(`error`): `void`
A function that is called on every crash. Updates keepAlive
#### Parameters
| Name | Type |
| :------ | :------ |
| `error` | `Error` |
#### Returns
`void`
#### Defined in
[src/handler/contracts/errorHandling.ts:21](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/errorHandling.ts#L21)

View File

@@ -0,0 +1,94 @@
---
id: "EventPlugin"
title: "Interface: EventPlugin<K>"
sidebar_label: "EventPlugin"
sidebar_position: 0
custom_edit_url: null
---
## Type parameters
| Name | Type |
| :------ | :------ |
| `K` | extends keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs) = keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs) |
## Hierarchy
- [`Plugin`](Plugin.md)
**`EventPlugin`**
## Properties
### description
`Optional` **description**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[description](Plugin.md#description)
#### Defined in
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
___
### execute
**execute**: (`event`: `Parameters`<[`CommandModuleDefs`](../modules.md#commandmoduledefs)[`K`][``"execute"``]\>, `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
#### Type declaration
▸ (`event`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
##### Parameters
| Name | Type |
| :------ | :------ |
| `event` | `Parameters`<[`CommandModuleDefs`](../modules.md#commandmoduledefs)[`K`][``"execute"``]\> |
| `controller` | [`Controller`](Controller.md) |
##### Returns
`Awaitable`<`Result`<`void`, `void`\>\>
#### Defined in
[src/handler/plugins/plugin.ts:82](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L82)
___
### name
• `Optional` **name**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[name](Plugin.md#name)
#### Defined in
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
___
### type
• **type**: [`Event`](../enums/PluginType.md#event)
#### Overrides
[Plugin](Plugin.md).[type](Plugin.md#type)
#### Defined in
[src/handler/plugins/plugin.ts:81](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L81)

View File

@@ -0,0 +1,90 @@
---
id: "ExternalEmitterPlugin"
title: "Interface: ExternalEmitterPlugin"
sidebar_label: "ExternalEmitterPlugin"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Plugin`](Plugin.md)
**`ExternalEmitterPlugin`**
## Properties
### description
`Optional` **description**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[description](Plugin.md#description)
#### Defined in
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
___
### execute
**execute**: (`payload`: { `absPath`: `string` ; `mod`: `ExternalEventCommand` & { `name`: `string` } }, `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
#### Type declaration
▸ (`payload`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
##### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | `Object` |
| `payload.absPath` | `string` |
| `payload.mod` | `ExternalEventCommand` & { `name`: `string` } |
| `controller` | [`Controller`](Controller.md) |
##### Returns
`Awaitable`<`Result`<`void`, `void`\>\>
#### Defined in
[src/handler/plugins/plugin.ts:57](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L57)
___
### name
`Optional` **name**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[name](Plugin.md#name)
#### Defined in
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
___
### type
**type**: [`Command`](../enums/PluginType.md#command)
#### Overrides
[Plugin](Plugin.md).[type](Plugin.md#type)
#### Defined in
[src/handler/plugins/plugin.ts:56](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L56)

View File

@@ -0,0 +1,88 @@
---
id: "ExternalEventPlugin"
title: "Interface: ExternalEventPlugin"
sidebar_label: "ExternalEventPlugin"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Plugin`](Plugin.md)
**`ExternalEventPlugin`**
## Properties
### description
`Optional` **description**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[description](Plugin.md#description)
#### Defined in
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
___
### execute
**execute**: (`args`: `unknown`[], `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
#### Type declaration
▸ (`args`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
##### Parameters
| Name | Type |
| :------ | :------ |
| `args` | `unknown`[] |
| `controller` | [`Controller`](Controller.md) |
##### Returns
`Awaitable`<`Result`<`void`, `void`\>\>
#### Defined in
[src/handler/plugins/plugin.ts:99](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L99)
___
### name
`Optional` **name**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[name](Plugin.md#name)
#### Defined in
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
___
### type
**type**: [`Event`](../enums/PluginType.md#event)
#### Overrides
[Plugin](Plugin.md).[type](Plugin.md#type)
#### Defined in
[src/handler/plugins/plugin.ts:98](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L98)

View File

@@ -0,0 +1,97 @@
---
id: "Logging"
title: "Interface: Logging<T>"
sidebar_label: "Logging"
sidebar_position: 0
custom_edit_url: null
---
## Type parameters
| Name | Type |
| :------ | :------ |
| `T` | `unknown` |
## Implemented by
- [`DefaultLogging`](../classes/DefaultLogging.md)
## Methods
### debug
**debug**(`payload`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`LogPayload`](../modules.md#logpayload)<`T`\> |
#### Returns
`void`
#### Defined in
[src/handler/contracts/logging.ts:7](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L7)
___
### error
**error**(`payload`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`LogPayload`](../modules.md#logpayload)<`T`\> |
#### Returns
`void`
#### Defined in
[src/handler/contracts/logging.ts:4](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L4)
___
### info
**info**(`payload`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`LogPayload`](../modules.md#logpayload)<`T`\> |
#### Returns
`void`
#### Defined in
[src/handler/contracts/logging.ts:6](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L6)
___
### warning
**warning**(`payload`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`LogPayload`](../modules.md#logpayload)<`T`\> |
#### Returns
`void`
#### Defined in
[src/handler/contracts/logging.ts:5](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L5)

View File

@@ -0,0 +1,103 @@
---
id: "MentionableSelectCommand"
title: "Interface: MentionableSelectCommand"
sidebar_label: "MentionableSelectCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Module`](Module.md)
**`MentionableSelectCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
[Module](Module.md).[description](Module.md#description)
#### Defined in
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
___
### execute
**execute**: (`ctx`: `MentionableSelectMenuInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `MentionableSelectMenuInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
[Module](Module.md).[execute](Module.md#execute)
#### Defined in
[src/types/module.ts:113](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L113)
___
### name
`Optional` **name**: `string`
#### Inherited from
[Module](Module.md).[name](Module.md#name)
#### Defined in
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
___
### onEvent
**onEvent**: [`EventPlugin`](EventPlugin.md)<[`MentionableSelect`](../enums/CommandType.md#mentionableselect)\>[]
#### Defined in
[src/types/module.ts:111](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L111)
___
### plugins
**plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
#### Defined in
[src/types/module.ts:112](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L112)
___
### type
**type**: [`MentionableSelect`](../enums/CommandType.md#mentionableselect)
#### Overrides
[Module](Module.md).[type](Module.md#type)
#### Defined in
[src/types/module.ts:110](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L110)

View File

@@ -0,0 +1,103 @@
---
id: "ModalSubmitCommand"
title: "Interface: ModalSubmitCommand"
sidebar_label: "ModalSubmitCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Module`](Module.md)
**`ModalSubmitCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
[Module](Module.md).[description](Module.md#description)
#### Defined in
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
___
### execute
**execute**: (`ctx`: `ModalSubmitInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `ModalSubmitInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
[Module](Module.md).[execute](Module.md#execute)
#### Defined in
[src/types/module.ts:127](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L127)
___
### name
`Optional` **name**: `string`
#### Inherited from
[Module](Module.md).[name](Module.md#name)
#### Defined in
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
___
### onEvent
**onEvent**: [`EventPlugin`](EventPlugin.md)<[`Modal`](../enums/CommandType.md#modal)\>[]
#### Defined in
[src/types/module.ts:125](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L125)
___
### plugins
**plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
#### Defined in
[src/types/module.ts:126](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L126)
___
### type
**type**: [`Modal`](../enums/CommandType.md#modal)
#### Overrides
[Module](Module.md).[type](Module.md#type)
#### Defined in
[src/types/module.ts:124](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L124)

View File

@@ -0,0 +1,91 @@
---
id: "Module"
title: "Interface: Module"
sidebar_label: "Module"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- **`Module`**
↳ [`TextCommand`](TextCommand.md)
↳ [`SlashCommand`](SlashCommand.md)
↳ [`BothCommand`](BothCommand.md)
↳ [`ContextMenuUser`](ContextMenuUser.md)
↳ [`ContextMenuMsg`](ContextMenuMsg.md)
↳ [`ButtonCommand`](ButtonCommand.md)
↳ [`StringSelectCommand`](StringSelectCommand.md)
↳ [`ChannelSelectCommand`](ChannelSelectCommand.md)
↳ [`RoleSelectCommand`](RoleSelectCommand.md)
↳ [`MentionableSelectCommand`](MentionableSelectCommand.md)
↳ [`UserSelectCommand`](UserSelectCommand.md)
↳ [`ModalSubmitCommand`](ModalSubmitCommand.md)
↳ [`AutocompleteCommand`](AutocompleteCommand.md)
## Properties
### description
`Optional` **description**: `string`
#### Defined in
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
___
### execute
**execute**: (...`args`: `any`[]) => `any`
#### Type declaration
▸ (...`args`): `any`
##### Parameters
| Name | Type |
| :------ | :------ |
| `...args` | `any`[] |
##### Returns
`any`
#### Defined in
[src/types/module.ts:39](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L39)
___
### name
`Optional` **name**: `string`
#### Defined in
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
___
### type
`Optional` **type**: [`CommandType`](../enums/CommandType.md) \| [`EventType`](../enums/EventType.md)
#### Defined in
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L36)

View File

@@ -0,0 +1,57 @@
---
id: "ModuleManager"
title: "Interface: ModuleManager"
sidebar_label: "ModuleManager"
sidebar_position: 0
custom_edit_url: null
---
## Implemented by
- [`DefaultModuleManager`](../classes/DefaultModuleManager.md)
## Methods
### get
**get**<`T`\>(`strat`): `undefined` \| [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends [`CommandType`](../enums/CommandType.md) |
#### Parameters
| Name | Type |
| :------ | :------ |
| `strat` | (`ms`: [`ModuleStore`](../classes/ModuleStore.md)) => `undefined` \| [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`] |
#### Returns
`undefined` \| [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]
#### Defined in
[src/handler/contracts/moduleManager.ts:7](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/moduleManager.ts#L7)
___
### set
**set**(`strat`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `strat` | (`ms`: [`ModuleStore`](../classes/ModuleStore.md)) => `void` |
#### Returns
`void`
#### Defined in
[src/handler/contracts/moduleManager.ts:8](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/moduleManager.ts#L8)

View File

@@ -0,0 +1,67 @@
---
id: "Plugin"
title: "Interface: Plugin"
sidebar_label: "Plugin"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- **`Plugin`**
↳ [`CommandPlugin`](CommandPlugin.md)
↳ [`DiscordEmitterPlugin`](DiscordEmitterPlugin.md)
↳ [`ExternalEmitterPlugin`](ExternalEmitterPlugin.md)
↳ [`SernEmitterPlugin`](SernEmitterPlugin.md)
↳ [`AutocompletePlugin`](AutocompletePlugin.md)
↳ [`EventPlugin`](EventPlugin.md)
↳ [`SernEventPlugin`](SernEventPlugin.md)
↳ [`ExternalEventPlugin`](ExternalEventPlugin.md)
↳ [`DiscordEventPlugin`](DiscordEventPlugin.md)
## Properties
### description
`Optional` **description**: `string`
**`Deprecated`**
will be removed in the next update
#### Defined in
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
___
### name
`Optional` **name**: `string`
**`Deprecated`**
will be removed in the next update
#### Defined in
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
___
### type
**type**: [`PluginType`](../enums/PluginType.md)
#### Defined in
[src/handler/plugins/plugin.ts:34](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L34)

View File

@@ -0,0 +1,103 @@
---
id: "RoleSelectCommand"
title: "Interface: RoleSelectCommand"
sidebar_label: "RoleSelectCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Module`](Module.md)
**`RoleSelectCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
[Module](Module.md).[description](Module.md#description)
#### Defined in
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
___
### execute
**execute**: (`ctx`: `RoleSelectMenuInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `RoleSelectMenuInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
[Module](Module.md).[execute](Module.md#execute)
#### Defined in
[src/types/module.ts:106](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L106)
___
### name
`Optional` **name**: `string`
#### Inherited from
[Module](Module.md).[name](Module.md#name)
#### Defined in
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
___
### onEvent
**onEvent**: [`EventPlugin`](EventPlugin.md)<[`RoleSelect`](../enums/CommandType.md#roleselect)\>[]
#### Defined in
[src/types/module.ts:104](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L104)
___
### plugins
**plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
#### Defined in
[src/types/module.ts:105](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L105)
___
### type
**type**: [`RoleSelect`](../enums/CommandType.md#roleselect)
#### Overrides
[Module](Module.md).[type](Module.md#type)
#### Defined in
[src/types/module.ts:103](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L103)

View File

@@ -0,0 +1,113 @@
---
id: "SernAutocompleteData"
title: "Interface: SernAutocompleteData"
sidebar_label: "SernAutocompleteData"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `Omit`<`BaseApplicationCommandOptionsData`, ``"autocomplete"``\>
**`SernAutocompleteData`**
## Properties
### autocomplete
**autocomplete**: ``true``
#### Defined in
[src/types/module.ts:179](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L179)
___
### command
• **command**: [`AutocompleteCommand`](AutocompleteCommand.md)
#### Defined in
[src/types/module.ts:184](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L184)
___
### description
• **description**: `string`
#### Inherited from
Omit.description
#### Defined in
node_modules/discord.js/typings/index.d.ts:4200
___
### descriptionLocalizations
• `Optional` **descriptionLocalizations**: `Partial`<`Record`<``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
#### Inherited from
Omit.descriptionLocalizations
#### Defined in
node_modules/discord.js/typings/index.d.ts:4201
___
### name
• **name**: `string`
#### Inherited from
Omit.name
#### Defined in
node_modules/discord.js/typings/index.d.ts:4198
___
### nameLocalizations
• `Optional` **nameLocalizations**: `Partial`<`Record`<``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
#### Inherited from
Omit.nameLocalizations
#### Defined in
node_modules/discord.js/typings/index.d.ts:4199
___
### required
• `Optional` **required**: `boolean`
#### Inherited from
Omit.required
#### Defined in
node_modules/discord.js/typings/index.d.ts:4202
___
### type
• **type**: `String` \| `Integer` \| `Number`
#### Defined in
[src/types/module.ts:180](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L180)

View File

@@ -0,0 +1,90 @@
---
id: "SernEmitterPlugin"
title: "Interface: SernEmitterPlugin"
sidebar_label: "SernEmitterPlugin"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Plugin`](Plugin.md)
**`SernEmitterPlugin`**
## Properties
### description
`Optional` **description**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[description](Plugin.md#description)
#### Defined in
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
___
### execute
**execute**: (`payload`: { `absPath`: `string` ; `mod`: `SernEventCommand`<keyof [`SernEventsMapping`](../modules.md#serneventsmapping)\> & { `name`: `string` } }, `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
#### Type declaration
▸ (`payload`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
##### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | `Object` |
| `payload.absPath` | `string` |
| `payload.mod` | `SernEventCommand`<keyof [`SernEventsMapping`](../modules.md#serneventsmapping)\> & { `name`: `string` } |
| `controller` | [`Controller`](Controller.md) |
##### Returns
`Awaitable`<`Result`<`void`, `void`\>\>
#### Defined in
[src/handler/plugins/plugin.ts:65](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L65)
___
### name
`Optional` **name**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[name](Plugin.md#name)
#### Defined in
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
___
### type
**type**: [`Command`](../enums/PluginType.md#command)
#### Overrides
[Plugin](Plugin.md).[type](Plugin.md#type)
#### Defined in
[src/handler/plugins/plugin.ts:64](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L64)

View File

@@ -0,0 +1,94 @@
---
id: "SernEventPlugin"
title: "Interface: SernEventPlugin<T>"
sidebar_label: "SernEventPlugin"
sidebar_position: 0
custom_edit_url: null
---
## Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends keyof [`SernEventsMapping`](../modules.md#serneventsmapping) = keyof [`SernEventsMapping`](../modules.md#serneventsmapping) |
## Hierarchy
- [`Plugin`](Plugin.md)
**`SernEventPlugin`**
## Properties
### description
`Optional` **description**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[description](Plugin.md#description)
#### Defined in
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
___
### execute
**execute**: (`args`: [`SernEventsMapping`](../modules.md#serneventsmapping)[`T`], `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
#### Type declaration
▸ (`args`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
##### Parameters
| Name | Type |
| :------ | :------ |
| `args` | [`SernEventsMapping`](../modules.md#serneventsmapping)[`T`] |
| `controller` | [`Controller`](Controller.md) |
##### Returns
`Awaitable`<`Result`<`void`, `void`\>\>
#### Defined in
[src/handler/plugins/plugin.ts:91](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L91)
___
### name
`Optional` **name**: `T`
**`Deprecated`**
will be removed in the next update
#### Overrides
[Plugin](Plugin.md).[name](Plugin.md#name)
#### Defined in
[src/handler/plugins/plugin.ts:89](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L89)
___
### type
**type**: [`Event`](../enums/PluginType.md#event)
#### Overrides
[Plugin](Plugin.md).[type](Plugin.md#type)
#### Defined in
[src/handler/plugins/plugin.ts:90](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L90)

View File

@@ -0,0 +1,117 @@
---
id: "SernSubCommandData"
title: "Interface: SernSubCommandData"
sidebar_label: "SernSubCommandData"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `BaseApplicationCommandOptionsData`
**`SernSubCommandData`**
## Properties
### autocomplete
`Optional` **autocomplete**: `undefined`
#### Inherited from
BaseApplicationCommandOptionsData.autocomplete
#### Defined in
node_modules/discord.js/typings/index.d.ts:4203
___
### description
**description**: `string`
#### Inherited from
BaseApplicationCommandOptionsData.description
#### Defined in
node_modules/discord.js/typings/index.d.ts:4200
___
### descriptionLocalizations
`Optional` **descriptionLocalizations**: `Partial`<`Record`<``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
#### Inherited from
BaseApplicationCommandOptionsData.descriptionLocalizations
#### Defined in
node_modules/discord.js/typings/index.d.ts:4201
___
### name
• **name**: `string`
#### Inherited from
BaseApplicationCommandOptionsData.name
#### Defined in
node_modules/discord.js/typings/index.d.ts:4198
___
### nameLocalizations
• `Optional` **nameLocalizations**: `Partial`<`Record`<``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
#### Inherited from
BaseApplicationCommandOptionsData.nameLocalizations
#### Defined in
node_modules/discord.js/typings/index.d.ts:4199
___
### options
• `Optional` **options**: [`BaseOptions`](../modules.md#baseoptions)[]
#### Defined in
[src/types/module.ts:201](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L201)
___
### required
• `Optional` **required**: `undefined`
#### Overrides
BaseApplicationCommandOptionsData.required
#### Defined in
[src/types/module.ts:200](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L200)
___
### type
• **type**: `Subcommand`
#### Defined in
[src/types/module.ts:199](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L199)

View File

@@ -0,0 +1,117 @@
---
id: "SernSubCommandGroupData"
title: "Interface: SernSubCommandGroupData"
sidebar_label: "SernSubCommandGroupData"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `BaseApplicationCommandOptionsData`
**`SernSubCommandGroupData`**
## Properties
### autocomplete
`Optional` **autocomplete**: `undefined`
#### Inherited from
BaseApplicationCommandOptionsData.autocomplete
#### Defined in
node_modules/discord.js/typings/index.d.ts:4203
___
### description
**description**: `string`
#### Inherited from
BaseApplicationCommandOptionsData.description
#### Defined in
node_modules/discord.js/typings/index.d.ts:4200
___
### descriptionLocalizations
`Optional` **descriptionLocalizations**: `Partial`<`Record`<``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
#### Inherited from
BaseApplicationCommandOptionsData.descriptionLocalizations
#### Defined in
node_modules/discord.js/typings/index.d.ts:4201
___
### name
• **name**: `string`
#### Inherited from
BaseApplicationCommandOptionsData.name
#### Defined in
node_modules/discord.js/typings/index.d.ts:4198
___
### nameLocalizations
• `Optional` **nameLocalizations**: `Partial`<`Record`<``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
#### Inherited from
BaseApplicationCommandOptionsData.nameLocalizations
#### Defined in
node_modules/discord.js/typings/index.d.ts:4199
___
### options
• `Optional` **options**: [`SernSubCommandData`](SernSubCommandData.md)[]
#### Defined in
[src/types/module.ts:207](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L207)
___
### required
• `Optional` **required**: `undefined`
#### Overrides
BaseApplicationCommandOptionsData.required
#### Defined in
[src/types/module.ts:206](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L206)
___
### type
• **type**: `SubcommandGroup`
#### Defined in
[src/types/module.ts:205](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L205)

View File

@@ -0,0 +1,114 @@
---
id: "SlashCommand"
title: "Interface: SlashCommand"
sidebar_label: "SlashCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Module`](Module.md)
**`SlashCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
[Module](Module.md).[description](Module.md#description)
#### Defined in
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
___
### execute
**execute**: (`ctx`: [`Context`](../classes/Context.md), `args`: [``"slash"``, [`SlashOptions`](../modules.md#slashoptions)]) => `unknown`
#### Type declaration
▸ (`ctx`, `args`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | [`Context`](../classes/Context.md) |
| `args` | [``"slash"``, [`SlashOptions`](../modules.md#slashoptions)] |
##### Returns
`unknown`
#### Overrides
[Module](Module.md).[execute](Module.md#execute)
#### Defined in
[src/types/module.ts:55](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L55)
___
### name
`Optional` **name**: `string`
#### Inherited from
[Module](Module.md).[name](Module.md#name)
#### Defined in
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
___
### onEvent
**onEvent**: [`EventPlugin`](EventPlugin.md)<[`Slash`](../enums/CommandType.md#slash)\>[]
#### Defined in
[src/types/module.ts:52](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L52)
___
### options
`Optional` **options**: ([`SernSubCommandData`](SernSubCommandData.md) \| [`SernSubCommandGroupData`](SernSubCommandGroupData.md) \| [`BaseOptions`](../modules.md#baseoptions))[]
#### Defined in
[src/types/module.ts:54](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L54)
___
### plugins
**plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
#### Defined in
[src/types/module.ts:53](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L53)
___
### type
**type**: [`Slash`](../enums/CommandType.md#slash)
#### Overrides
[Module](Module.md).[type](Module.md#type)
#### Defined in
[src/types/module.ts:51](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L51)

View File

@@ -0,0 +1,103 @@
---
id: "StringSelectCommand"
title: "Interface: StringSelectCommand"
sidebar_label: "StringSelectCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Module`](Module.md)
**`StringSelectCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
[Module](Module.md).[description](Module.md#description)
#### Defined in
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
___
### execute
**execute**: (`ctx`: `StringSelectMenuInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `StringSelectMenuInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
[Module](Module.md).[execute](Module.md#execute)
#### Defined in
[src/types/module.ts:92](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L92)
___
### name
`Optional` **name**: `string`
#### Inherited from
[Module](Module.md).[name](Module.md#name)
#### Defined in
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
___
### onEvent
**onEvent**: [`EventPlugin`](EventPlugin.md)<[`StringSelect`](../enums/CommandType.md#stringselect)\>[]
#### Defined in
[src/types/module.ts:90](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L90)
___
### plugins
**plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
#### Defined in
[src/types/module.ts:91](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L91)
___
### type
**type**: [`StringSelect`](../enums/CommandType.md#stringselect)
#### Overrides
[Module](Module.md).[type](Module.md#type)
#### Defined in
[src/types/module.ts:89](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L89)

View File

@@ -0,0 +1,114 @@
---
id: "TextCommand"
title: "Interface: TextCommand"
sidebar_label: "TextCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Module`](Module.md)
**`TextCommand`**
## Properties
### alias
`Optional` **alias**: `string`[]
#### Defined in
[src/types/module.ts:46](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L46)
___
### description
`Optional` **description**: `string`
#### Inherited from
[Module](Module.md).[description](Module.md#description)
#### Defined in
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
___
### execute
**execute**: (`ctx`: [`Context`](../classes/Context.md), `args`: [``"text"``, `string`[]]) => `unknown`
#### Type declaration
▸ (`ctx`, `args`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | [`Context`](../classes/Context.md) |
| `args` | [``"text"``, `string`[]] |
##### Returns
`unknown`
#### Overrides
[Module](Module.md).[execute](Module.md#execute)
#### Defined in
[src/types/module.ts:47](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L47)
___
### name
• `Optional` **name**: `string`
#### Inherited from
[Module](Module.md).[name](Module.md#name)
#### Defined in
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
___
### onEvent
• **onEvent**: [`EventPlugin`](EventPlugin.md)<[`Text`](../enums/CommandType.md#text)\>[]
#### Defined in
[src/types/module.ts:44](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L44)
___
### plugins
• **plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
#### Defined in
[src/types/module.ts:45](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L45)
___
### type
• **type**: [`Text`](../enums/CommandType.md#text)
#### Overrides
[Module](Module.md).[type](Module.md#type)
#### Defined in
[src/types/module.ts:43](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L43)

View File

@@ -0,0 +1,103 @@
---
id: "UserSelectCommand"
title: "Interface: UserSelectCommand"
sidebar_label: "UserSelectCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Module`](Module.md)
**`UserSelectCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
[Module](Module.md).[description](Module.md#description)
#### Defined in
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
___
### execute
**execute**: (`ctx`: `UserSelectMenuInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `UserSelectMenuInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
[Module](Module.md).[execute](Module.md#execute)
#### Defined in
[src/types/module.ts:120](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L120)
___
### name
`Optional` **name**: `string`
#### Inherited from
[Module](Module.md).[name](Module.md#name)
#### Defined in
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
___
### onEvent
**onEvent**: [`EventPlugin`](EventPlugin.md)<[`UserSelect`](../enums/CommandType.md#userselect)\>[]
#### Defined in
[src/types/module.ts:118](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L118)
___
### plugins
**plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
#### Defined in
[src/types/module.ts:119](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L119)
___
### type
**type**: [`UserSelect`](../enums/CommandType.md#userselect)
#### Overrides
[Module](Module.md).[type](Module.md#type)
#### Defined in
[src/types/module.ts:117](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L117)

View File

@@ -10,23 +10,29 @@ An object to be passed into Sern#init() function.
## Properties
### client
`Readonly` **client**: `Client`<`boolean`\>
#### Defined in
[src/handler/structures/wrapper.ts:11](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/wrapper.ts#L11)
___
### commands
`Readonly` **commands**: `string`
#### Defined in
[src/handler/structures/wrapper.ts:15](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/wrapper.ts#L15)
[src/handler/structures/wrapper.ts:9](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/wrapper.ts#L9)
___
### containerConfig
`Readonly` **containerConfig**: `Object`
#### Type declaration
| Name | Type |
| :------ | :------ |
| `get` | (...`keys`: keyof [`Dependencies`](Dependencies.md)[]) => `unknown`[] |
#### Defined in
[src/handler/structures/wrapper.ts:11](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/wrapper.ts#L11)
___
@@ -36,24 +42,14 @@ ___
#### Defined in
[src/handler/structures/wrapper.ts:14](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/wrapper.ts#L14)
[src/handler/structures/wrapper.ts:8](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/wrapper.ts#L8)
___
### events
`Optional` `Readonly` **events**: `string` \| { `absPath`: `string` ; `mod`: `EventModule` }[] \| () => { `absPath`: `string` ; `mod`: `EventModule` }[]
`Optional` `Readonly` **events**: `string`
#### Defined in
[src/handler/structures/wrapper.ts:16](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/wrapper.ts#L16)
___
### sernEmitter
`Optional` `Readonly` **sernEmitter**: [`SernEmitter`](../classes/SernEmitter.md)
#### Defined in
[src/handler/structures/wrapper.ts:13](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/wrapper.ts#L13)
[src/handler/structures/wrapper.ts:10](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/wrapper.ts#L10)

View File

@@ -21,55 +21,127 @@ custom_edit_url: null
- [CommandExecutable](classes/CommandExecutable.md)
- [Context](classes/Context.md)
- [DefaultErrorHandling](classes/DefaultErrorHandling.md)
- [DefaultLogging](classes/DefaultLogging.md)
- [DefaultModuleManager](classes/DefaultModuleManager.md)
- [EventExecutable](classes/EventExecutable.md)
- [ModuleStore](classes/ModuleStore.md)
- [SernEmitter](classes/SernEmitter.md)
## Interfaces
- [AutocompleteCommand](interfaces/AutocompleteCommand.md)
- [AutocompletePlugin](interfaces/AutocompletePlugin.md)
- [BothCommand](interfaces/BothCommand.md)
- [ButtonCommand](interfaces/ButtonCommand.md)
- [ChannelSelectCommand](interfaces/ChannelSelectCommand.md)
- [CommandPlugin](interfaces/CommandPlugin.md)
- [ContextMenuMsg](interfaces/ContextMenuMsg.md)
- [ContextMenuUser](interfaces/ContextMenuUser.md)
- [Controller](interfaces/Controller.md)
- [Dependencies](interfaces/Dependencies.md)
- [DiscordEmitterPlugin](interfaces/DiscordEmitterPlugin.md)
- [DiscordEventPlugin](interfaces/DiscordEventPlugin.md)
- [ErrorHandling](interfaces/ErrorHandling.md)
- [EventPlugin](interfaces/EventPlugin.md)
- [ExternalEmitterPlugin](interfaces/ExternalEmitterPlugin.md)
- [ExternalEventPlugin](interfaces/ExternalEventPlugin.md)
- [Logging](interfaces/Logging.md)
- [MentionableSelectCommand](interfaces/MentionableSelectCommand.md)
- [ModalSubmitCommand](interfaces/ModalSubmitCommand.md)
- [Module](interfaces/Module.md)
- [ModuleManager](interfaces/ModuleManager.md)
- [Plugin](interfaces/Plugin.md)
- [RoleSelectCommand](interfaces/RoleSelectCommand.md)
- [SernAutocompleteData](interfaces/SernAutocompleteData.md)
- [SernEmitterPlugin](interfaces/SernEmitterPlugin.md)
- [SernEventPlugin](interfaces/SernEventPlugin.md)
- [SernSubCommandData](interfaces/SernSubCommandData.md)
- [SernSubCommandGroupData](interfaces/SernSubCommandGroupData.md)
- [SlashCommand](interfaces/SlashCommand.md)
- [StringSelectCommand](interfaces/StringSelectCommand.md)
- [TextCommand](interfaces/TextCommand.md)
- [UserSelectCommand](interfaces/UserSelectCommand.md)
- [Wrapper](interfaces/Wrapper.md)
## Type Aliases
### AnyDefinedModule
Ƭ **AnyDefinedModule**: [`DefinedCommandModule`](modules.md#definedcommandmodule) \| [`DefinedEventModule`](modules.md#definedeventmodule)
#### Defined in
[src/types/handler.ts:25](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L25)
___
### AnyModule
Ƭ **AnyModule**: [`CommandModule`](modules.md#commandmodule) \| [`EventModule`](modules.md#eventmodule)
#### Defined in
[src/types/module.ts:153](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L153)
___
### Args
Ƭ **Args**: [`ParseType`](modules.md#parsetype)<{ `slash`: [`SlashOptions`](modules.md#slashoptions) ; `text`: `string`[] }\>
#### Defined in
[src/types/handler.ts:12](https://github.com/sern-handler/handler/blob/4074274/src/types/handler.ts#L12)
___
### AutocompletePlugin
Ƭ **AutocompletePlugin**: [`Override`](modules.md#override)<`BaseModule`, { `execute`: (`autocmp`: `AutocompleteInteraction`, `controlller`: [`Controller`](interfaces/Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\> ; `type`: [`Event`](enums/PluginType.md#event) }\>
#### Defined in
[src/handler/plugins/plugin.ts:92](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L92)
[src/types/handler.ts:15](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L15)
___
### BaseOptions
Ƭ **BaseOptions**: `ApplicationCommandChoicesData` \| `ApplicationCommandNonOptionsData` \| `ApplicationCommandChannelOptionData` \| `ApplicationCommandNumericOptionData` \| `ApplicationCommandAttachmentOption` \| [`SernAutocompleteData`](modules.md#sernautocompletedata)
Ƭ **BaseOptions**: `ApplicationCommandChoicesData` \| `ApplicationCommandNonOptionsData` \| `ApplicationCommandChannelOptionData` \| `ApplicationCommandNumericOptionData` \| `ApplicationCommandAttachmentOption` \| [`SernAutocompleteData`](interfaces/SernAutocompleteData.md)
Type that replaces autocomplete with [SernAutocompleteData](modules.md#sernautocompletedata)
Type that replaces autocomplete with [SernAutocompleteData](interfaces/SernAutocompleteData.md)
#### Defined in
[src/handler/structures/module.ts:181](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/module.ts#L181)
[src/types/module.ts:190](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L190)
___
### BothCommand
### CommandModule
Ƭ **BothCommand**: [`Override`](modules.md#override)<`BaseModule`, { `alias?`: `string`[] ; `execute`: (`ctx`: [`Context`](classes/Context.md), `args`: [`Args`](modules.md#args)) => `Awaitable`<`void` \| `unknown`\> ; `onEvent`: [`EventPlugin`](modules.md#eventplugin)<[`Both`](enums/CommandType.md#both)\>[] ; `options?`: [`SernOptionsData`](modules.md#sernoptionsdata)[] ; `plugins`: [`CommandPlugin`](modules.md#commandplugin)[] ; `type`: [`Both`](enums/CommandType.md#both) }\>
Ƭ **CommandModule**: [`TextCommand`](interfaces/TextCommand.md) \| [`SlashCommand`](interfaces/SlashCommand.md) \| [`BothCommand`](interfaces/BothCommand.md) \| [`ContextMenuUser`](interfaces/ContextMenuUser.md) \| [`ContextMenuMsg`](interfaces/ContextMenuMsg.md) \| [`ButtonCommand`](interfaces/ButtonCommand.md) \| [`StringSelectCommand`](interfaces/StringSelectCommand.md) \| [`MentionableSelectCommand`](interfaces/MentionableSelectCommand.md) \| [`UserSelectCommand`](interfaces/UserSelectCommand.md) \| [`ChannelSelectCommand`](interfaces/ChannelSelectCommand.md) \| [`RoleSelectCommand`](interfaces/RoleSelectCommand.md) \| [`ModalSubmitCommand`](interfaces/ModalSubmitCommand.md)
#### Defined in
[src/handler/structures/module.ts:55](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/module.ts#L55)
[src/types/module.ts:139](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L139)
___
### CommandModuleDefs
Ƭ **CommandModuleDefs**: `Object`
#### Type declaration
| Name | Type |
| :------ | :------ |
| `1` | [`TextCommand`](interfaces/TextCommand.md) |
| `1024` | [`RoleSelectCommand`](interfaces/RoleSelectCommand.md) |
| `16` | [`ButtonCommand`](interfaces/ButtonCommand.md) |
| `2` | [`SlashCommand`](interfaces/SlashCommand.md) |
| `2048` | [`UserSelectCommand`](interfaces/UserSelectCommand.md) |
| `256` | [`ChannelSelectCommand`](interfaces/ChannelSelectCommand.md) |
| `3` | [`BothCommand`](interfaces/BothCommand.md) |
| `32` | [`StringSelectCommand`](interfaces/StringSelectCommand.md) |
| `4` | [`ContextMenuUser`](interfaces/ContextMenuUser.md) |
| `512` | [`MentionableSelectCommand`](interfaces/MentionableSelectCommand.md) |
| `64` | [`ModalSubmitCommand`](interfaces/ModalSubmitCommand.md) |
| `8` | [`ContextMenuMsg`](interfaces/ContextMenuMsg.md) |
#### Defined in
[src/types/module.ts:157](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L157)
___
@@ -79,13 +151,13 @@ ___
#### Defined in
[src/handler/plugins/plugin.ts:145](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L145)
[src/handler/plugins/plugin.ts:108](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L108)
___
### CommandModulePlugin
Ƭ **CommandModulePlugin**<`T`\>: [`EventPlugin`](modules.md#eventplugin)<`T`\> \| [`CommandPlugin`](modules.md#commandplugin)<`T`\>
Ƭ **CommandModulePlugin**<`T`\>: [`EventPlugin`](interfaces/EventPlugin.md)<`T`\> \| [`CommandPlugin`](interfaces/CommandPlugin.md)<`T`\>
#### Type parameters
@@ -95,109 +167,40 @@ ___
#### Defined in
[src/handler/plugins/plugin.ts:173](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L173)
___
### CommandPlugin
Ƭ **CommandPlugin**<`T`\>: { [K in T]: Override<BasePlugin, Object\> }[`T`]
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends keyof `CommandModuleDefs` = keyof `CommandModuleDefs` |
#### Defined in
[src/handler/plugins/plugin.ts:40](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L40)
[src/handler/plugins/plugin.ts:136](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L136)
___
### DefinedCommandModule
Ƭ **DefinedCommandModule**: [`DefinitelyDefined`](modules.md#definitelydefined)<`CommandModule`, ``"name"`` \| ``"description"``\>
#### Defined in
[src/types/handler.ts:43](https://github.com/sern-handler/handler/blob/4074274/src/types/handler.ts#L43)
___
### DefinedEventModule
Ƭ **DefinedEventModule**: [`DefinitelyDefined`](modules.md#definitelydefined)<`EventModule`, ``"name"`` \| ``"description"``\>
#### Defined in
[src/types/handler.ts:44](https://github.com/sern-handler/handler/blob/4074274/src/types/handler.ts#L44)
___
### DefinedModule
Ƭ **DefinedModule**: [`DefinitelyDefined`](modules.md#definitelydefined)<[`Module`](modules.md#module), ``"name"`` \| ``"description"``\>
Ƭ **DefinedCommandModule**: [`CommandModule`](modules.md#commandmodule) & { `description`: `string` ; `name`: `string` }
After modules are transformed, name and description are given default values if none
are provided to Module. This type represents that transformation
#### Defined in
[src/types/handler.ts:42](https://github.com/sern-handler/handler/blob/4074274/src/types/handler.ts#L42)
[src/types/handler.ts:23](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L23)
___
### DefinitelyDefined
### DefinedEventModule
Ƭ **DefinitelyDefined**<`T`, `K`\>: { [L in K]-?: T[L] extends Record<string, unknown\> ? DefinitelyDefined<T[L], keyof T[L]\> : Required<T\>[L] } & `T`
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | `T` |
| `K` | extends keyof `T` = keyof `T` |
Ƭ **DefinedEventModule**: [`EventModule`](modules.md#eventmodule) & { `name`: `string` }
#### Defined in
[src/types/handler.ts:19](https://github.com/sern-handler/handler/blob/4074274/src/types/handler.ts#L19)
[src/types/handler.ts:24](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L24)
___
### DiscordEmitterPlugin
### EventModule
Ƭ **DiscordEmitterPlugin**: [`Override`](modules.md#override)<`BasePlugin`, { `execute`: (`wrapper`: `Client`, `module`: [`DefinitelyDefined`](modules.md#definitelydefined)<`DiscordEventCommand`, ``"name"`` \| ``"description"``\>, `controller`: [`Controller`](interfaces/Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\> ; `type`: [`Command`](enums/PluginType.md#command) }\>
Ƭ **EventModule**: `DiscordEventCommand` \| `SernEventCommand` \| `ExternalEventCommand`
#### Defined in
[src/handler/plugins/plugin.ts:57](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L57)
___
### DiscordEventPlugin
Ƭ **DiscordEventPlugin**<`T`\>: [`Override`](modules.md#override)<`BasePlugin`, { `execute`: (`args`: `ClientEvents`[`T`], `controller`: [`Controller`](interfaces/Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\> ; `name?`: `T` ; `type`: [`Event`](enums/PluginType.md#event) }\>
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends keyof `ClientEvents` = keyof `ClientEvents` |
#### Defined in
[src/handler/plugins/plugin.ts:136](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L136)
___
### EventInput
Ƭ **EventInput**: `string` \| { `absPath`: `string` ; `mod`: `EventModule` }[] \| () => { `absPath`: `string` ; `mod`: `EventModule` }[]
#### Defined in
[src/types/handler.ts:25](https://github.com/sern-handler/handler/blob/4074274/src/types/handler.ts#L25)
[src/types/module.ts:138](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L138)
___
@@ -211,13 +214,31 @@ Event Module Command Plugins
| Name | Type |
| :------ | :------ |
| `1` | [`DiscordEmitterPlugin`](modules.md#discordemitterplugin) |
| `2` | [`SernEmitterPlugin`](modules.md#sernemitterplugin) |
| `3` | [`ExternalEmitterPlugin`](modules.md#externalemitterplugin) |
| `1` | [`DiscordEmitterPlugin`](interfaces/DiscordEmitterPlugin.md) |
| `2` | [`SernEmitterPlugin`](interfaces/SernEmitterPlugin.md) |
| `3` | [`ExternalEmitterPlugin`](interfaces/ExternalEmitterPlugin.md) |
#### Defined in
[src/handler/plugins/plugin.ts:163](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L163)
[src/handler/plugins/plugin.ts:126](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L126)
___
### EventModuleDefs
Ƭ **EventModuleDefs**: `Object`
#### Type declaration
| Name | Type |
| :------ | :------ |
| `1` | `DiscordEventCommand` |
| `2` | `SernEventCommand` |
| `3` | `ExternalEventCommand` |
#### Defined in
[src/types/module.ts:172](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L172)
___
@@ -231,13 +252,13 @@ Event Module Event Plugins
| Name | Type |
| :------ | :------ |
| `1` | [`DiscordEventPlugin`](modules.md#discordeventplugin) |
| `2` | [`SernEventPlugin`](modules.md#serneventplugin) |
| `3` | [`ExternalEventPlugin`](modules.md#externaleventplugin) |
| `1` | [`DiscordEventPlugin`](interfaces/DiscordEventPlugin.md) |
| `2` | [`SernEventPlugin`](interfaces/SernEventPlugin.md) |
| `3` | [`ExternalEventPlugin`](interfaces/ExternalEventPlugin.md) |
#### Defined in
[src/handler/plugins/plugin.ts:154](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L154)
[src/handler/plugins/plugin.ts:117](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L117)
___
@@ -253,7 +274,7 @@ ___
#### Defined in
[src/handler/plugins/plugin.ts:169](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L169)
[src/handler/plugins/plugin.ts:132](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L132)
___
@@ -263,49 +284,7 @@ ___
#### Defined in
[src/handler/plugins/plugin.ts:148](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L148)
___
### EventPlugin
Ƭ **EventPlugin**<`T`\>: { [K in T]: Override<BasePlugin, Object\> }[`T`]
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends keyof `CommandModuleDefs` = keyof `CommandModuleDefs` |
#### Defined in
[src/handler/plugins/plugin.ts:103](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L103)
___
### ExternalEmitterPlugin
Ƭ **ExternalEmitterPlugin**<`T`\>: [`Override`](modules.md#override)<`BasePlugin`, { `execute`: (`wrapper`: `T`, `module`: [`DefinitelyDefined`](modules.md#definitelydefined)<`ExternalEventCommand`, ``"name"`` \| ``"description"``\>, `controller`: [`Controller`](interfaces/Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\> ; `type`: [`Command`](enums/PluginType.md#command) }\>
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends `EventEmitter` = `EventEmitter` |
#### Defined in
[src/handler/plugins/plugin.ts:68](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L68)
___
### ExternalEventPlugin
Ƭ **ExternalEventPlugin**: [`Override`](modules.md#override)<`BasePlugin`, { `execute`: (`args`: `unknown`[], `controller`: [`Controller`](interfaces/Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\> ; `type`: [`Event`](enums/PluginType.md#event) }\>
#### Defined in
[src/handler/plugins/plugin.ts:128](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L128)
[src/handler/plugins/plugin.ts:111](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L111)
___
@@ -317,7 +296,7 @@ User inputs this type. Sern processes behind the scenes for better usage
#### Defined in
[src/handler/plugins/plugin.ts:178](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L178)
[src/handler/plugins/plugin.ts:141](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L141)
___
@@ -327,50 +306,56 @@ ___
#### Defined in
[src/handler/plugins/plugin.ts:182](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L182)
[src/handler/plugins/plugin.ts:145](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L145)
___
### Module
### LogPayload
Ƭ **Module**: `CommandModule` \| `EventModule`
#### Defined in
[src/handler/structures/module.ts:141](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/module.ts#L141)
___
### Nullish
Ƭ **Nullish**<`T`\>: `T` \| `undefined` \| ``null``
Ƭ **LogPayload**<`T`\>: `Object`
#### Type parameters
| Name |
| :------ |
| `T` |
| Name | Type |
| :------ | :------ |
| `T` | `unknown` |
#### Type declaration
| Name | Type |
| :------ | :------ |
| `message` | `T` |
#### Defined in
[src/types/handler.ts:5](https://github.com/sern-handler/handler/blob/4074274/src/types/handler.ts#L5)
[src/types/handler.ts:36](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L36)
___
### Override
### MapDeps
Ƭ **Override**<`T1`, `T2`\>: `Omit`<`T1`, keyof `T2`\> & `T2`
Ƭ **MapDeps**<`Deps`, `T`\>: `T` extends [infer First, ...(infer Rest extends readonly unknown[])] ? [`UnpackFunction`<`Deps`[`First`]\>, ...(MapDeps<Deps, Rest\> extends [never] ? [] : MapDeps<Deps, Rest\>)] : [`never`]
#### Type parameters
| Name |
| :------ |
| `T1` |
| `T2` |
| Name | Type |
| :------ | :------ |
| `Deps` | extends [`Dependencies`](interfaces/Dependencies.md) |
| `T` | extends readonly `unknown`[] |
#### Defined in
[src/types/handler.ts:17](https://github.com/sern-handler/handler/blob/4074274/src/types/handler.ts#L17)
[src/types/handler.ts:51](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L51)
___
### OptionalDependencies
Ƭ **OptionalDependencies**: ``"@sern/logger"``
#### Defined in
[src/types/handler.ts:57](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L57)
___
@@ -386,17 +371,17 @@ ___
#### Defined in
[src/types/handler.ts:8](https://github.com/sern-handler/handler/blob/4074274/src/types/handler.ts#L8)
[src/types/handler.ts:11](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L11)
___
### Payload
Ƭ **Payload**: { `module`: [`Module`](modules.md#module) ; `type`: [`Success`](enums/PayloadType.md#success) } \| { `module?`: [`Module`](modules.md#module) ; `reason`: `string` \| `Error` ; `type`: [`Failure`](enums/PayloadType.md#failure) }
Ƭ **Payload**: { `module`: [`AnyModule`](modules.md#anymodule) ; `type`: [`Success`](enums/PayloadType.md#success) } \| { `module?`: [`AnyModule`](modules.md#anymodule) ; `reason`: `string` \| `Error` ; `type`: [`Failure`](enums/PayloadType.md#failure) } \| { `reason`: `string` ; `type`: [`Warning`](enums/PayloadType.md#warning) }
#### Defined in
[src/types/handler.ts:45](https://github.com/sern-handler/handler/blob/4074274/src/types/handler.ts#L45)
[src/types/handler.ts:26](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L26)
___
@@ -406,43 +391,7 @@ ___
#### Defined in
[src/types/handler.ts:55](https://github.com/sern-handler/handler/blob/4074274/src/types/handler.ts#L55)
___
### SernAutocompleteData
Ƭ **SernAutocompleteData**: [`Override`](modules.md#override)<`BaseApplicationCommandOptionsData`, { `autocomplete`: ``true`` ; `command`: `AutocompleteCommand` ; `type`: `ApplicationCommandOptionType.String` \| `ApplicationCommandOptionType.Number` \| `ApplicationCommandOptionType.Integer` }\>
#### Defined in
[src/handler/structures/module.ts:166](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/module.ts#L166)
___
### SernEmitterPlugin
Ƭ **SernEmitterPlugin**: [`Override`](modules.md#override)<`BasePlugin`, { `execute`: (`wrapper`: [`SernEmitter`](classes/SernEmitter.md), `module`: [`DefinitelyDefined`](modules.md#definitelydefined)<`SernEventCommand`, ``"name"`` \| ``"description"``\>, `controller`: [`Controller`](interfaces/Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\> ; `type`: [`Command`](enums/PluginType.md#command) }\>
#### Defined in
[src/handler/plugins/plugin.ts:80](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L80)
___
### SernEventPlugin
Ƭ **SernEventPlugin**<`T`\>: [`Override`](modules.md#override)<`BasePlugin`, { `execute`: (`args`: [`SernEventsMapping`](modules.md#serneventsmapping)[`T`], `controller`: [`Controller`](interfaces/Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\> ; `name?`: `T` ; `type`: [`Event`](enums/PluginType.md#event) }\>
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends keyof [`SernEventsMapping`](modules.md#serneventsmapping) = keyof [`SernEventsMapping`](modules.md#serneventsmapping) |
#### Defined in
[src/handler/plugins/plugin.ts:116](https://github.com/sern-handler/handler/blob/4074274/src/handler/plugins/plugin.ts#L116)
[src/types/handler.ts:49](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L49)
___
@@ -457,17 +406,17 @@ ___
| `error` | [[`Payload`](modules.md#payload)] |
| `module.activate` | [[`Payload`](modules.md#payload)] |
| `module.register` | [[`Payload`](modules.md#payload)] |
| `warning` | [`string`] |
| `warning` | [[`Payload`](modules.md#payload)] |
#### Defined in
[src/types/handler.ts:48](https://github.com/sern-handler/handler/blob/4074274/src/types/handler.ts#L48)
[src/types/handler.ts:30](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L30)
___
### SernOptionsData
Ƭ **SernOptionsData**<`U`\>: `U` extends `ApplicationCommandSubCommandData` ? [`SernSubCommandData`](modules.md#sernsubcommanddata) : `U` extends `ApplicationCommandSubGroupData` ? [`SernSubCommandGroupData`](modules.md#sernsubcommandgroupdata) : [`BaseOptions`](modules.md#baseoptions)
Ƭ **SernOptionsData**<`U`\>: `U` extends `ApplicationCommandSubCommandData` ? [`SernSubCommandData`](interfaces/SernSubCommandData.md) : `U` extends `ApplicationCommandSubGroupData` ? [`SernSubCommandGroupData`](interfaces/SernSubCommandGroupData.md) : [`BaseOptions`](modules.md#baseoptions)
#### Type parameters
@@ -477,37 +426,31 @@ ___
#### Defined in
[src/handler/structures/module.ts:205](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/module.ts#L205)
[src/types/module.ts:210](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L210)
___
### SernSubCommandData
### Singleton
Ƭ **SernSubCommandData**: [`Override`](modules.md#override)<`Omit`<`BaseApplicationCommandOptionsData`, ``"required"``\>, { `options?`: [`BaseOptions`](modules.md#baseoptions)[] ; `type`: `ApplicationCommandOptionType.Subcommand` }\>
Ƭ **Singleton**<`T`\>: () => `T`
#### Type parameters
| Name |
| :------ |
| `T` |
#### Type declaration
▸ (): `T`
##### Returns
`T`
#### Defined in
[src/handler/structures/module.ts:189](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/module.ts#L189)
___
### SernSubCommandGroupData
Ƭ **SernSubCommandGroupData**: [`Override`](modules.md#override)<`Omit`<`BaseApplicationCommandOptionsData`, ``"required"``\>, { `options?`: [`SernSubCommandData`](modules.md#sernsubcommanddata)[] ; `type`: `ApplicationCommandOptionType.SubcommandGroup` }\>
#### Defined in
[src/handler/structures/module.ts:197](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/module.ts#L197)
___
### SlashCommand
Ƭ **SlashCommand**: [`Override`](modules.md#override)<`BaseModule`, { `execute`: (`ctx`: [`Context`](classes/Context.md), `args`: [``"slash"``, [`SlashOptions`](modules.md#slashoptions)]) => `Awaitable`<`void` \| `unknown`\> ; `onEvent`: [`EventPlugin`](modules.md#eventplugin)<[`Slash`](enums/CommandType.md#slash)\>[] ; `options?`: [`SernOptionsData`](modules.md#sernoptionsdata)[] ; `plugins`: [`CommandPlugin`](modules.md#commandplugin)[] ; `type`: [`Slash`](enums/CommandType.md#slash) }\>
#### Defined in
[src/handler/structures/module.ts:44](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/module.ts#L44)
[src/types/handler.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L37)
___
@@ -517,56 +460,43 @@ ___
#### Defined in
[src/types/handler.ts:14](https://github.com/sern-handler/handler/blob/4074274/src/types/handler.ts#L14)
[src/types/handler.ts:17](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L17)
___
### SpreadParams
### Transient
Ƭ **SpreadParams**<`T`\>: (`args`: `Parameters`<`T`\>[`number`]) => `unknown`
Ƭ **Transient**<`T`\>: () => () => `T`
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends (...`args`: `never`) => `unknown` |
| Name |
| :------ |
| `T` |
#### Type declaration
▸ (`args`): `unknown`
Turns a function with a union of array of args into a single union
[ T , V , B ] | [ A ] => T | V | B | A
##### Parameters
| Name | Type |
| :------ | :------ |
| `args` | `Parameters`<`T`\>[`number`] |
▸ (): () => `T`
##### Returns
`unknown`
`fn`
▸ (): `T`
##### Returns
`T`
#### Defined in
[src/types/handler.ts:34](https://github.com/sern-handler/handler/blob/4074274/src/types/handler.ts#L34)
___
### TextCommand
Ƭ **TextCommand**: [`Override`](modules.md#override)<`BaseModule`, { `alias?`: `string`[] ; `execute`: (`ctx`: [`Context`](classes/Context.md), `args`: [``"text"``, `string`[]]) => `Awaitable`<`void` \| `unknown`\> ; `onEvent`: [`EventPlugin`](modules.md#eventplugin)<[`Text`](enums/CommandType.md#text)\>[] ; `plugins`: [`CommandPlugin`](modules.md#commandplugin)[] ; `type`: [`Text`](enums/CommandType.md#text) }\>
#### Defined in
[src/handler/structures/module.ts:33](https://github.com/sern-handler/handler/blob/4074274/src/handler/structures/module.ts#L33)
[src/types/handler.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L38)
## Functions
### commandModule
▸ **commandModule**(`mod`): `CommandModule`
▸ **commandModule**(`mod`): [`CommandModule`](modules.md#commandmodule)
The wrapper function to define command modules for sern
@@ -578,17 +508,17 @@ The wrapper function to define command modules for sern
#### Returns
`CommandModule`
[`CommandModule`](modules.md#commandmodule)
#### Defined in
[src/handler/sern.ts:91](https://github.com/sern-handler/handler/blob/4074274/src/handler/sern.ts#L91)
[src/handler/sern.ts:64](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L64)
___
### eventModule
▸ **eventModule**(`mod`): `EventModule`
▸ **eventModule**(`mod`): [`EventModule`](modules.md#eventmodule)
The wrapper function to define event modules for sern
@@ -600,8 +530,101 @@ The wrapper function to define event modules for sern
#### Returns
`EventModule`
[`EventModule`](modules.md#eventmodule)
#### Defined in
[src/handler/sern.ts:112](https://github.com/sern-handler/handler/blob/4074274/src/handler/sern.ts#L112)
[src/handler/sern.ts:76](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L76)
___
### many
▸ **many**<`T`\>(`value`): () => () => `T`
A function that returns another function
Used for transient in iti
#### Type parameters
| Name |
| :------ |
| `T` |
#### Parameters
| Name | Type |
| :------ | :------ |
| `value` | `T` |
#### Returns
`fn`
▸ (): () => `T`
##### Returns
`fn`
▸ (): `T`
##### Returns
`T`
#### Defined in
[src/handler/utilities/functions.ts:16](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/utilities/functions.ts#L16)
___
### single
▸ **single**<`T`\>(`value`): () => `T`
A function that returns whatever value is provided.
Used for singleton in iti
#### Type parameters
| Name |
| :------ |
| `T` |
#### Parameters
| Name | Type |
| :------ | :------ |
| `value` | `T` |
#### Returns
`fn`
▸ (): `T`
##### Returns
`T`
#### Defined in
[src/handler/utilities/functions.ts:10](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/utilities/functions.ts#L10)
___
### useContainerRaw
▸ **useContainerRaw**(): ``null`` \| `Container`<[`Dependencies`](interfaces/Dependencies.md), `Partial`<[`Dependencies`](interfaces/Dependencies.md)\>\>
Returns the underlying data structure holding all dependencies.
Exposes some methods from iti
#### Returns
``null`` \| `Container`<[`Dependencies`](interfaces/Dependencies.md), `Partial`<[`Dependencies`](interfaces/Dependencies.md)\>\>
#### Defined in
[src/handler/dependencies/provider.ts:74](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/dependencies/provider.ts#L74)

View File

@@ -22,13 +22,13 @@ ___
### commandModule
Re-exports [commandModule](../modules.md#commandmodule)
Re-exports [commandModule](../modules.md#commandmodule-1)
___
### eventModule
Re-exports [eventModule](../modules.md#eventmodule)
Re-exports [eventModule](../modules.md#eventmodule-1)
## Variables
@@ -47,60 +47,10 @@ The object passed into every plugin to control a command's behavior
#### Defined in
[src/handler/sern.ts:82](https://github.com/sern-handler/handler/blob/4074274/src/handler/sern.ts#L82)
[src/handler/sern.ts:55](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L55)
## Functions
### addExternal
**addExternal**<`T`\>(`emitter`): `void`
**`Deprecated`**
- use Sern#makeDependencies instead
**`Example`**
```ts title="src/index.ts"
//Add this before initiating Sern!
Sern.addExternal(new Level())
```
**`Example`**
```ts title="events/level.ts"
export default eventModule({
emitter: 'Level',
type : EventType.External,
name: 'error',
execute(args) {
console.log(args)
}
})
```
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends `__module` |
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `emitter` | `T` | Any external event emitter. The object will be stored in a map, and then fetched by the name of the instance's class. As there are infinite possibilities to adding external event emitters, Most types aren't provided and are as narrow as possibly can. |
#### Returns
`void`
#### Defined in
[src/handler/sern.ts:72](https://github.com/sern-handler/handler/blob/4074274/src/handler/sern.ts#L72)
___
### init
**init**(`wrapper`): `void`
@@ -109,9 +59,12 @@ ___
```ts title="src/index.ts"
Sern.init({
client,
defaultPrefix: '!',
commands: 'dist/commands',
events: 'dist/events',
containerConfig : {
get: useContainer
}
})
```
@@ -119,7 +72,7 @@ Sern.init({
| Name | Type | Description |
| :------ | :------ | :------ |
| `wrapper` | [`Wrapper`](../interfaces/Wrapper.md) | Options to pass into sern. Function to start the handler up |
| `wrapper` | [`Wrapper`](../interfaces/Wrapper.md) | Options to pass into sern. Function to start the handler up |
#### Returns
@@ -127,4 +80,50 @@ Sern.init({
#### Defined in
[src/handler/sern.ts:39](https://github.com/sern-handler/handler/blob/4074274/src/handler/sern.ts#L39)
[src/handler/sern.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L38)
___
### makeDependencies
▸ **makeDependencies**<`T`\>(`conf`): <V\>(...`keys`: [...V[]]) => [`MapDeps`](../modules.md#mapdeps)<`T`, `V`\>
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends [`Dependencies`](../interfaces/Dependencies.md) |
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `conf` | `Object` | a configuration for creating your project dependencies |
| `conf.build` | (`root`: `Container`<`Record`<`string`, `unknown`\>, {}\>) => `Container`<`Partial`<`T`\>, {}\> | - |
| `conf.exclude?` | `Set`<``"@sern/logger"``\> | - |
#### Returns
`fn`
▸ <`V`\>(...`keys`): [`MapDeps`](../modules.md#mapdeps)<`T`, `V`\>
##### Type parameters
| Name | Type |
| :------ | :------ |
| `V` | extends keyof `T`[] |
##### Parameters
| Name | Type |
| :------ | :------ |
| `...keys` | [...V[]] |
##### Returns
[`MapDeps`](../modules.md#mapdeps)<`T`, `V`\>
#### Defined in
[src/handler/sern.ts:87](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L87)

View File

@@ -4,3 +4,8 @@
After installing and IDE you need to install node.
You can download the LTS version of node right [here](https://nodejs.org/en/download/)
Install discord.js with
```shell
npm install discord.js@latest
```

View File

@@ -5,4 +5,4 @@ sidebar_position: 8
# Conclusion
If you reached this far, thank you for reading! We hope you have learned the necessities you need
to create a bot with the sern framework. If you have any other questions, bugs, feature requests, concerns, please join our
[community server](https://discord.gg/QgnfxWzrcj), and we'll be glad to answer your questions.
[community server](https://sern.dev/discord), and we'll be glad to answer your questions.

View File

@@ -34,10 +34,10 @@ exports.default = commandModule({
},
})
```
To view what each of these properties mean in depth, visit the [official documentation](https://sern-handler.js.org/docs/api/enums/CommandType).
To view what each of these properties mean in depth, visit the [official documentation](https://sern.dev/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/api/enums/CommandType)!
All the command types can be found in the [official documentation](https://sern.dev/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.

View File

@@ -27,9 +27,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/api/enums/EventType).
can be found [here](https://sern.dev/docs/api/enums/EventType).
To view what each of these properties mean in depth, visit the [official documentation](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.dev/docs/api/enums/EventType).
<br />
Event modules are laid out similarly to command modules. These listen to any and all event you provide.
@@ -41,7 +41,7 @@ Typescript:
```typescript
export default eventModule({
type: EventType.Discord,
plugins : [], //NOT SUPPORTED YET!!
plugins : [],
name: 'guildMemberAdd', //name of event.
async execute(member: GuildMember) {
(await member.guild.channels.fetch('channel-id') as TextChannel).send(`Welcome, ${member}`);

View File

@@ -53,7 +53,7 @@ Plugins modify and add new behavior to standard modules, extending customizabili
## Command Plugins
All modules are registered into sern's system. With command plugins, you can modify how commands are loaded,
or do some kind of preprocessing before they are loaded into sern.
or do some kind of preprocessing before they are loaded.
### The controller object
```typescript
export interface Controller {

View File

@@ -6,8 +6,9 @@ sidebar_position: 6
You're shipped with the SernEmitter. This EventEmitter listens to
- command modules executing and its status, the `module.activate` event
- command modules registered and its status, the `module.register` event
- On default, sern creates a single SernEmitter for your bot process.
- any error that occurs, the `error` event
- `warn` events, where it is possible to throw errors
You can put these and other event listeners into [event modules](./first-event.md)!
<br/>View all <a href="https://sern-handler.js.org/docs/api/modules#serneventsmapping">events</a>
<br/>View all <a href="https://sern.dev/docs/api/modules#serneventsmapping">events</a>

View File

@@ -12,5 +12,5 @@ sidebar_position: 0
This site is open source! Please do contribute if you find any bugs, typos, or sections in need of improvements.
:::
:::tip
If you have problems, join the discord server [here](https://sern-handler.js.org/discord)
If you have problems, join the discord server [here](https://sern.dev/discord)
:::

View File

@@ -144,14 +144,14 @@ const config = {
{ name: 'og:title', content: 'sern - Handlers. Redefined.' },
{ name: 'og:description', content: 'A customizable, batteries-included, powerful discord.js framework to automate and streamline bot development' },
{ name: 'og:image', content: 'https://i.imgur.com/rr8nqDP.png' },
{ name: 'og:url', content: 'https://sern-handler.js.org' },
{ name: 'og:url', content: 'https://sern.dev' },
{ name: 'og:type', content: 'website' },
{ name: 'twitter:card', content: 'summary_large_image' },
{ name: 'twitter:site', content: '@sern-handler' },
{ name: 'twitter:title', content: 'sern - Handlers. Redefined.' },
{ name: 'twitter:description', content: 'A customizable, batteries-included, powerful discord.js framework to automate and streamline bot development' },
{ name: 'twitter:image', content: './assets/images/logo.png' },
{ name: 'twitter:url', content: 'https://sern-handler.js.org' },
{ name: 'twitter:url', content: 'https://sern.dev' },
{ name: 'theme-color', content: '#cb547c' }
],
prism: {