mirror of
https://github.com/SrIzan10/sern-website.git
synced 2026-05-01 11:05:20 +00:00
docs: add new plugins docs
This commit is contained in:
104
docs/api/enums/SernError.md
Normal file
104
docs/api/enums/SernError.md
Normal file
@@ -0,0 +1,104 @@
|
||||
---
|
||||
id: "SernError"
|
||||
title: "Enumeration: SernError"
|
||||
sidebar_label: "SernError"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### InvalidModuleType
|
||||
|
||||
• **InvalidModuleType** = ``"Detected an unknown module type"``
|
||||
|
||||
Throws when registering an invalid module.
|
||||
This means it is undefined or an invalid command type was provided
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:9](https://github.com/sern-handler/handler/blob/b641472/src/handler/structures/errors.ts#L9)
|
||||
|
||||
___
|
||||
|
||||
### MismatchEvent
|
||||
|
||||
• **MismatchEvent** = ``"You cannot use message when an interaction fired or vice versa"``
|
||||
|
||||
A crash that occurs when accessing an invalid property of Context
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:29](https://github.com/sern-handler/handler/blob/b641472/src/handler/structures/errors.ts#L29)
|
||||
|
||||
___
|
||||
|
||||
### MismatchModule
|
||||
|
||||
• **MismatchModule** = ``"A module type mismatched with event emitted!"``
|
||||
|
||||
Attempted to lookup module in command module store. Nothing was found!
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:17](https://github.com/sern-handler/handler/blob/b641472/src/handler/structures/errors.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
### MissingRequired
|
||||
|
||||
• **MissingRequired** = ``"@sern/client is required but was not found"``
|
||||
|
||||
Required Dependency not found
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:37](https://github.com/sern-handler/handler/blob/b641472/src/handler/structures/errors.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### NotSupportedInteraction
|
||||
|
||||
• **NotSupportedInteraction** = ``"This interaction is not supported."``
|
||||
|
||||
Unsupported interaction at this moment.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:21](https://github.com/sern-handler/handler/blob/b641472/src/handler/structures/errors.ts#L21)
|
||||
|
||||
___
|
||||
|
||||
### NotSupportedYet
|
||||
|
||||
• **NotSupportedYet** = ``"This feature is not supported yet"``
|
||||
|
||||
Unsupported feature attempted to access at this time
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:33](https://github.com/sern-handler/handler/blob/b641472/src/handler/structures/errors.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### PluginFailure
|
||||
|
||||
• **PluginFailure** = ``"A plugin failed to call controller.next()"``
|
||||
|
||||
One plugin called `controller.stop()` (end command execution / loading)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:25](https://github.com/sern-handler/handler/blob/b641472/src/handler/structures/errors.ts#L25)
|
||||
|
||||
___
|
||||
|
||||
### UndefinedModule
|
||||
|
||||
• **UndefinedModule** = ``"A module could not be detected"``
|
||||
|
||||
Attempted to lookup module in command module store. Nothing was found!
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:13](https://github.com/sern-handler/handler/blob/b641472/src/handler/structures/errors.ts#L13)
|
||||
47
docs/api/interfaces/ControlPlugin.md
Normal file
47
docs/api/interfaces/ControlPlugin.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
id: "ControlPlugin"
|
||||
title: "Interface: ControlPlugin<Args>"
|
||||
sidebar_label: "ControlPlugin"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `Args` | extends `any`[] = `any`[] |
|
||||
|
||||
## Properties
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (...`args`: `Args`) => [`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (...`args`): [`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...args` | `Args` |
|
||||
|
||||
##### Returns
|
||||
|
||||
[`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:39](https://github.com/sern-handler/handler/blob/b641472/src/types/plugin.ts#L39)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Event`](../enums/PluginType.md#event)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:38](https://github.com/sern-handler/handler/blob/b641472/src/types/plugin.ts#L38)
|
||||
47
docs/api/interfaces/DependencyConfiguration.md
Normal file
47
docs/api/interfaces/DependencyConfiguration.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
id: "DependencyConfiguration"
|
||||
title: "Interface: DependencyConfiguration<T>"
|
||||
sidebar_label: "DependencyConfiguration"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends [`Dependencies`](Dependencies.md) |
|
||||
|
||||
## Properties
|
||||
|
||||
### build
|
||||
|
||||
• **build**: (`root`: `Container`<`Omit`<[`Dependencies`](Dependencies.md), ``"@sern/client"``\>, {}\>) => `Container`<`T`, {}\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`root`): `Container`<`T`, {}\>
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `root` | `Container`<`Omit`<[`Dependencies`](Dependencies.md), ``"@sern/client"``\>, {}\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`Container`<`T`, {}\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:68](https://github.com/sern-handler/handler/blob/b641472/src/types/handler.ts#L68)
|
||||
|
||||
___
|
||||
|
||||
### exclude
|
||||
|
||||
• `Optional` **exclude**: `Set`<``"@sern/logger"``\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:67](https://github.com/sern-handler/handler/blob/b641472/src/types/handler.ts#L67)
|
||||
113
docs/api/interfaces/DiscordEventCommand.md
Normal file
113
docs/api/interfaces/DiscordEventCommand.md
Normal file
@@ -0,0 +1,113 @@
|
||||
---
|
||||
id: "DiscordEventCommand"
|
||||
title: "Interface: DiscordEventCommand<T>"
|
||||
sidebar_label: "DiscordEventCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends keyof `ClientEvents` = keyof `ClientEvents` |
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`DiscordEventCommand`**
|
||||
|
||||
## 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/b641472/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `T`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:123](https://github.com/sern-handler/handler/blob/b641472/src/types/module.ts#L123)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/b641472/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/b641472/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Discord`](../enums/EventType.md#discord)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:124](https://github.com/sern-handler/handler/blob/b641472/src/types/module.ts#L124)
|
||||
|
||||
## Methods
|
||||
|
||||
### execute
|
||||
|
||||
▸ **execute**(...`args`): `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...args` | `ClientEvents`[`T`] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:125](https://github.com/sern-handler/handler/blob/b641472/src/types/module.ts#L125)
|
||||
117
docs/api/interfaces/ExternalEventCommand.md
Normal file
117
docs/api/interfaces/ExternalEventCommand.md
Normal file
@@ -0,0 +1,117 @@
|
||||
---
|
||||
id: "ExternalEventCommand"
|
||||
title: "Interface: ExternalEventCommand"
|
||||
sidebar_label: "ExternalEventCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`ExternalEventCommand`**
|
||||
|
||||
## 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/b641472/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### emitter
|
||||
|
||||
• **emitter**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:130](https://github.com/sern-handler/handler/blob/b641472/src/types/module.ts#L130)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:129](https://github.com/sern-handler/handler/blob/b641472/src/types/module.ts#L129)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/b641472/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/b641472/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`External`](../enums/EventType.md#external)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:131](https://github.com/sern-handler/handler/blob/b641472/src/types/module.ts#L131)
|
||||
|
||||
## Methods
|
||||
|
||||
### execute
|
||||
|
||||
▸ **execute**(...`args`): `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...args` | `unknown`[] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:132](https://github.com/sern-handler/handler/blob/b641472/src/types/module.ts#L132)
|
||||
33
docs/api/interfaces/InitArgs.md
Normal file
33
docs/api/interfaces/InitArgs.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
id: "InitArgs"
|
||||
title: "Interface: InitArgs<T>"
|
||||
sidebar_label: "InitArgs"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends [`Processed`](../modules.md#processed)<[`Module`](Module.md)\> |
|
||||
|
||||
## Properties
|
||||
|
||||
### absPath
|
||||
|
||||
• **absPath**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/args.ts:106](https://github.com/sern-handler/handler/blob/b641472/src/handler/plugins/args.ts#L106)
|
||||
|
||||
___
|
||||
|
||||
### module
|
||||
|
||||
• **module**: `T`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/args.ts:105](https://github.com/sern-handler/handler/blob/b641472/src/handler/plugins/args.ts#L105)
|
||||
47
docs/api/interfaces/InitPlugin.md
Normal file
47
docs/api/interfaces/InitPlugin.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
id: "InitPlugin"
|
||||
title: "Interface: InitPlugin<Args>"
|
||||
sidebar_label: "InitPlugin"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `Args` | extends `any`[] = `any`[] |
|
||||
|
||||
## Properties
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (...`args`: `Args`) => [`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (...`args`): [`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...args` | `Args` |
|
||||
|
||||
##### Returns
|
||||
|
||||
[`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:35](https://github.com/sern-handler/handler/blob/b641472/src/types/plugin.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Init`](../enums/PluginType.md#init)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:34](https://github.com/sern-handler/handler/blob/b641472/src/types/plugin.ts#L34)
|
||||
113
docs/api/interfaces/SernEventCommand.md
Normal file
113
docs/api/interfaces/SernEventCommand.md
Normal file
@@ -0,0 +1,113 @@
|
||||
---
|
||||
id: "SernEventCommand"
|
||||
title: "Interface: SernEventCommand<T>"
|
||||
sidebar_label: "SernEventCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends keyof [`SernEventsMapping`](../modules.md#serneventsmapping) = keyof [`SernEventsMapping`](../modules.md#serneventsmapping) |
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`SernEventCommand`**
|
||||
|
||||
## 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/b641472/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `T`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:116](https://github.com/sern-handler/handler/blob/b641472/src/types/module.ts#L116)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/b641472/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/b641472/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Sern`](../enums/EventType.md#sern)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:117](https://github.com/sern-handler/handler/blob/b641472/src/types/module.ts#L117)
|
||||
|
||||
## Methods
|
||||
|
||||
### execute
|
||||
|
||||
▸ **execute**(...`args`): `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...args` | [`SernEventsMapping`](../modules.md#serneventsmapping)[`T`] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:118](https://github.com/sern-handler/handler/blob/b641472/src/types/module.ts#L118)
|
||||
Reference in New Issue
Block a user