Compare commits
35 Commits
build/auto
...
meta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9168f61c09 | ||
|
|
c1d64d1172 | ||
|
|
2b3cdc2374 | ||
|
|
530a622c36 | ||
|
|
c46f074926 | ||
|
|
3cc8b38390 | ||
|
|
ef6420a669 | ||
|
|
e10e6cbd2f | ||
|
|
d531eb7340 | ||
|
|
332399bb43 | ||
|
|
b97bc9dde7 | ||
|
|
d447a40f98 | ||
|
|
eca35e1309 | ||
|
|
44645d89de | ||
|
|
66bdaf7f9f | ||
|
|
d9a69a4b6b | ||
|
|
70ff70a1bf | ||
|
|
59b6096423 | ||
|
|
ee11018d48 | ||
|
|
e547c0f485 | ||
| 75140b3d38 | |||
|
|
f1917da3e6 | ||
|
|
7a80638a1b | ||
|
|
4c6b6f9177 | ||
|
|
49a910f90a | ||
|
|
05e470b99b | ||
|
|
ebe5c84ba3 | ||
|
|
a4d12af7f2 | ||
|
|
b8377ec5a4 | ||
|
|
b8be42b1d7 | ||
|
|
9eebee836a | ||
|
|
64adb7b0ca | ||
|
|
51a9774b58 | ||
|
|
4feb242b61 | ||
| 24a2098402 |
2
404.html
@@ -2,7 +2,7 @@
|
||||
<html style="height:100%">
|
||||
<head>
|
||||
<meta name="viewport" charset="utf-8" content="width=device-width, initial-scale=1, shrink-to-fit=no" >
|
||||
<link rel="icon" href="./assets/images/icon.png">
|
||||
<link rel="icon" href="./assets/images/favicon.ico">
|
||||
<meta name="theme-color" content="#fff">
|
||||
<meta name="twitter:card" content="summary">
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ If you're using ESM, configure dotenv with `import 'dotenv/config'` instead of `
|
||||
|
||||
### And... that's it?
|
||||
|
||||
Yes, that's it. Here's a little FAQ to get you started. You can also join the [Discord](https://sern-handler.js.org/discord) for any problems.
|
||||
Yes, that's it. Here's a little FAQ to get you started. You can also join the [Discord](https://sern.dev/discord) for any problems.
|
||||
|
||||
### Extra: Video tutorial!
|
||||
|
||||
@@ -59,4 +59,4 @@ Yes, that's it. Here's a little FAQ to get you started. You can also join the [D
|
||||
**A**: Yeah, just search `sern Snippets` made by a verified publisher called Sr Izan (haha yeah me funny!)
|
||||
|
||||
**Q**: HEEEELLLPPPP!!!!
|
||||
**A**: Hey, don't panic! We're here to help so, join the [Discord](https://sern-handler.js.org/discord). We're trying to get to 100 members!
|
||||
**A**: Hey, don't panic! We're here to help so, join the [Discord](https://sern.dev/discord). We're trying to get to 100 members!
|
||||
|
||||
@@ -132,7 +132,7 @@ Post 2.0:
|
||||
|
||||
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" />
|
||||
<img src="https://img.srizan.dev/Discord_z8Sn1UBfEe.png" />
|
||||
<br />
|
||||
All deprecation warnings from previous versions have taken effect, and are removed in 2.0.
|
||||
|
||||
@@ -188,4 +188,4 @@ Including the previous section, some names to symbols and data structures were a
|
||||
be better represented. view [changelog](/404.html)
|
||||
|
||||
## Context refactoring
|
||||
The context data structure has been internally altered to represent its dynamics better.
|
||||
The context data structure has been internally altered to represent its dynamics better.
|
||||
|
||||
102
blog/2023-06-18-mdx-blog-post.md
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
slug: 3.0.0
|
||||
title: Release 3.0.0
|
||||
authors: [jacoobes]
|
||||
tags: [release]
|
||||
---
|
||||
|
||||
## 3.0 Release
|
||||
|
||||
### Join our [discord](https://sern.dev/discord) <br />
|
||||
|
||||
### Features
|
||||
|
||||
#### Dependency Management
|
||||
- `Service` API (recommended to use this over useContainer hooks)
|
||||
- Dependencies type must be globally augmented in order for Services api to function properly
|
||||
- new methods on ModuleManager
|
||||
- getPublishableCommands()
|
||||
- Init Hooks
|
||||
- implement starting behavior for dependencies
|
||||
- To enforce and type check this, use the `Initializable` type when making your Dependencies type!
|
||||
- Emitter interface
|
||||
- More generic interface to define any event emitter
|
||||
- You can now swap out the SernEmitter with whatever emitter now.
|
||||
```ts
|
||||
class DatabaseService implements Init {
|
||||
//some hypothetical database
|
||||
_pgsql : database()
|
||||
|
||||
async init() {
|
||||
await _pgsql.load()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
await makeDependencies({
|
||||
build: root => root.add({
|
||||
db: new DatabaseService() //will be init'ed automatically
|
||||
})
|
||||
})
|
||||
|
||||
```
|
||||
- new SernEmitter event `modulesLoaded` , which allows users to customize behavior after all modules are loaded!
|
||||
```ts
|
||||
|
||||
export default eventModule({
|
||||
name: 'modulesLoaded',
|
||||
type: EventType.Sern,
|
||||
execute: () => {
|
||||
console.log('All modules loaded')
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
```
|
||||
|
||||
#### Quality of Life
|
||||
- faster module loading
|
||||
- I utilize async generators for reading files now. A lot faster than the first iteration.
|
||||
- better error handling
|
||||
- Less boilerplate
|
||||
- Services api cleans up v2 boilerplate
|
||||
- class modules devex got upgraded and work better than before
|
||||
- automatically ignore any files not ending in (mts, cts, mjs, cjs, ts, js)
|
||||
- ignore commands and events with `!` prefix on filename or directory (ie: `!filename.ts` or `!directory` will be ignored by sern)
|
||||
|
||||
- `Service` API (recommended to use this over useContainer hooks)
|
||||
- Dependencies type must be globally augmented in order for Services api to function properly
|
||||
- Less boilerplate
|
||||
- new methods on ModuleManager
|
||||
- automatically ignore any files not ending in (mts, cts, mjs, cjs, ts, js)
|
||||
- ignore commands / events with `!` prefix on filename or directory (ie: `!filename.ts` or `!directory`)
|
||||
- new SernEmitter event `modulesLoaded` , which allows users to customize behavior after all modules are loaded!
|
||||
- Init Hooks
|
||||
- implement starting behavior for dependencies
|
||||
|
||||
### Experimental
|
||||
- Experimental things may be subject to removal, need feedback and are not guaranteed stable
|
||||
- dev / prod mode
|
||||
- sern will behave differently depending on mode set
|
||||
- init sern from `file` option
|
||||
- reads from local sern.config.json
|
||||
|
||||
```js
|
||||
Sern.init('file');
|
||||
```
|
||||
### Breaking changes
|
||||
- Sern.makeDependencies -> makeDependencies
|
||||
- it is asynchronous and top level function now. Make sure to await it before initing for proper synchronization.
|
||||
- module store and manager internally changed, so those using them may recieve breaking changes
|
||||
- BaseOptions type removed
|
||||
|
||||
```diff
|
||||
- Sern.makeDependencies({ build: () => {} })
|
||||
+ await makeDependencies({ build: () => {} })
|
||||
```
|
||||
|
||||
### Deprecations
|
||||
- Removed all previous marked deprecations in v3
|
||||
- ModuleStore will be removed as a dependency in v4. The only way to access modules should be through ModuleManager
|
||||
- Default Dependencies will be made internal in the v4. Users should only have access to its interface / contract
|
||||
|
||||
34
blog/2023-7-4-mdx-blog-post.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
slug: newlogo
|
||||
title: New logo!
|
||||
authors: [sern]
|
||||
tags: [branding]
|
||||
---
|
||||
|
||||
Hey everyone! Today we have very special news for you all: We're changing our logo!
|
||||
|
||||
# Why?
|
||||
|
||||
You see, on today's standards, having a simple logo is essential. Our logo aligns perfectly with these design principles but it can always be improved.
|
||||
We were chilling, you know, cooking sern handler v3, sern gui, `npm create @sern/bot` and serncord when we thought about changing the logo to a sleek design with less colors.
|
||||
And here we are!
|
||||
|
||||
# Who did our new branding?
|
||||
|
||||
[Ropox](https://github.com/Murtatrxx)!
|
||||
Bro's the GOAT. This website is maintained by him, the domain costs are funded by him and also he started brainstorming how the logo would be on paper:
|
||||

|
||||
And there it all clicked:
|
||||

|
||||
seren tried by the way!
|
||||

|
||||
|
||||
# Anyways, here it is:
|
||||
|
||||

|
||||
|
||||
Pretty nice!
|
||||
|
||||
By the way, we have animations and variations on the way, so make sure to stay updated in the [discord server](https://sern.dev/discord)!
|
||||
|
||||
# Finally, from the entire sern team, thank you for sticking around ❤️
|
||||
@@ -5,11 +5,15 @@ jacoobes:
|
||||
image_url: https://github.com/jacoobes.png
|
||||
Sr Izan:
|
||||
name: Sr Izan
|
||||
title: Contributor
|
||||
title: Developer
|
||||
url: https://github.com/SrIzan10
|
||||
image_url: https://github.com/SrIzan10.png
|
||||
sern:
|
||||
name: sern Team
|
||||
url: https://github.com/sern-handler
|
||||
image_url: https://github.com/sernbot.png
|
||||
Murtatrxx:
|
||||
name: Murtatrxx
|
||||
title: Developer
|
||||
url: https://github.com/Murtatrxx
|
||||
image_url: https://github.com/Murtatrxx.png
|
||||
image_url: https://github.com/Murtatrxx.png
|
||||
|
||||
@@ -14,7 +14,7 @@ Will be refactored / changed in future
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `Type` | extends [`CommandType`](../enums/CommandType.md) |
|
||||
| `Type` | extends [`CommandType`](../enums/CommandType.md) = [`CommandType`](../enums/CommandType.md) |
|
||||
|
||||
## Constructors
|
||||
|
||||
@@ -26,37 +26,17 @@ Will be refactored / changed in future
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `Type` | extends [`CommandType`](../enums/CommandType.md) |
|
||||
| `Type` | extends [`CommandType`](../enums/CommandType.md) = [`CommandType`](../enums/CommandType.md) |
|
||||
|
||||
## Properties
|
||||
|
||||
### execute
|
||||
|
||||
• `Abstract` **execute**: [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`Type`][``"execute"``]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:121](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sern.ts#L121)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](../interfaces/ControlPlugin.md)<`any`[]\>[] = `[]`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:120](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sern.ts#L120)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](../interfaces/InitPlugin.md)<`any`[]\>[] = `[]`
|
||||
• **plugins**: [`AnyCommandPlugin`](../modules.md#anycommandplugin)[] = `[]`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:119](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sern.ts#L119)
|
||||
[src/core/modules.ts:79](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L79)
|
||||
|
||||
___
|
||||
|
||||
@@ -66,4 +46,48 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:118](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sern.ts#L118)
|
||||
[src/core/modules.ts:78](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L78)
|
||||
|
||||
___
|
||||
|
||||
### \_instance
|
||||
|
||||
▪ `Static` `Private` **\_instance**: [`CommandModule`](../modules.md#commandmodule)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/modules.ts:80](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L80)
|
||||
|
||||
## Methods
|
||||
|
||||
### execute
|
||||
|
||||
▸ `Abstract` **execute**(`...args`): `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...args` | `CommandArgs`<`Type`, [`Control`](../enums/PluginType.md#control)\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/modules.ts:91](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L91)
|
||||
|
||||
___
|
||||
|
||||
### getInstance
|
||||
|
||||
▸ `Static` **getInstance**(): [`CommandModule`](../modules.md#commandmodule)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`CommandModule`](../modules.md#commandmodule)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/modules.ts:82](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L82)
|
||||
|
||||
@@ -6,14 +6,23 @@ sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
**`Since`**
|
||||
|
||||
1.0.0
|
||||
Provides values shared between
|
||||
Message and ChatInputCommandInteraction
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- `CoreContext`<`Message`, `ChatInputCommandInteraction`\>
|
||||
|
||||
↳ **`Context`**
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• `Private` **new Context**(`ctx`)
|
||||
• `Protected` **new Context**(`ctx`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -21,9 +30,27 @@ Message and ChatInputCommandInteraction
|
||||
| :------ | :------ |
|
||||
| `ctx` | `Result`<`Message`<`boolean`\>, `ChatInputCommandInteraction`<`CacheType`\>\> |
|
||||
|
||||
#### Overrides
|
||||
|
||||
CoreContext<Message, ChatInputCommandInteraction\>.constructor
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:22](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L22)
|
||||
[src/core/structures/context.ts:29](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L29)
|
||||
|
||||
## Properties
|
||||
|
||||
### ctx
|
||||
|
||||
• `Protected` **ctx**: `Result`<`Message`<`boolean`\>, `ChatInputCommandInteraction`<`CacheType`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
CoreContext.ctx
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:29](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L29)
|
||||
|
||||
## Accessors
|
||||
|
||||
@@ -37,7 +64,7 @@ Message and ChatInputCommandInteraction
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:45](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L45)
|
||||
[src/core/structures/context.ts:37](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
@@ -51,7 +78,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:75](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L75)
|
||||
[src/core/structures/context.ts:66](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L66)
|
||||
|
||||
___
|
||||
|
||||
@@ -65,7 +92,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:56](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L56)
|
||||
[src/core/structures/context.ts:48](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L48)
|
||||
|
||||
___
|
||||
|
||||
@@ -79,7 +106,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:60](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L60)
|
||||
[src/core/structures/context.ts:52](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L52)
|
||||
|
||||
___
|
||||
|
||||
@@ -93,7 +120,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:64](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L64)
|
||||
[src/core/structures/context.ts:56](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L56)
|
||||
|
||||
___
|
||||
|
||||
@@ -107,7 +134,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:41](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L41)
|
||||
[src/core/structures/context.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -121,25 +148,25 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:79](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L79)
|
||||
[src/core/structures/context.ts:70](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L70)
|
||||
|
||||
___
|
||||
|
||||
### interaction
|
||||
|
||||
• `get` **interaction**(): `ChatInputCommandInteraction`<`CacheType`\>
|
||||
|
||||
Getting the ChatInputCommandInteraction object. Crashes if module type is
|
||||
CommandType.Text or the event fired in a Both command was
|
||||
Message
|
||||
• `get` **interaction**(): `I`
|
||||
|
||||
#### Returns
|
||||
|
||||
`ChatInputCommandInteraction`<`CacheType`\>
|
||||
`I`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
CoreContext.interaction
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L37)
|
||||
[src/core/structures/core-context.ts:15](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/core-context.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
@@ -153,25 +180,43 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:71](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L71)
|
||||
[src/core/structures/context.ts:62](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L62)
|
||||
|
||||
___
|
||||
|
||||
### message
|
||||
|
||||
• `get` **message**(): `Message`<`boolean`\>
|
||||
|
||||
Getting the Message object. Crashes if module type is
|
||||
CommandType.Slash or the event fired in a Both command was
|
||||
ChatInputCommandInteraction
|
||||
• `get` **message**(): `M`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Message`<`boolean`\>
|
||||
`M`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
CoreContext.message
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:29](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L29)
|
||||
[src/core/structures/core-context.ts:12](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/core-context.ts#L12)
|
||||
|
||||
___
|
||||
|
||||
### options
|
||||
|
||||
• `get` **options**(): `Omit`<`CommandInteractionOptionResolver`<`CacheType`\>, ``"getMessage"`` \| ``"getFocused"``\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Omit`<`CommandInteractionOptionResolver`<`CacheType`\>, ``"getMessage"`` \| ``"getFocused"``\>
|
||||
|
||||
#### Overrides
|
||||
|
||||
CoreContext.options
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:26](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L26)
|
||||
|
||||
___
|
||||
|
||||
@@ -188,35 +233,43 @@ else, interaction.user
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:52](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L52)
|
||||
[src/core/structures/context.ts:44](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L44)
|
||||
|
||||
## Methods
|
||||
|
||||
### isMessage
|
||||
|
||||
▸ **isMessage**(): `boolean`
|
||||
▸ **isMessage**(): this is CoreContext<Message<boolean\>, never\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
this is CoreContext<Message<boolean\>, never\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
CoreContext.isMessage
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:82](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L82)
|
||||
[src/core/structures/core-context.ts:19](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/core-context.ts#L19)
|
||||
|
||||
___
|
||||
|
||||
### isSlash
|
||||
|
||||
▸ **isSlash**(): `boolean`
|
||||
▸ **isSlash**(): this is CoreContext<never, ChatInputCommandInteraction<CacheType\>\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
this is CoreContext<never, ChatInputCommandInteraction<CacheType\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
CoreContext.isSlash
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:86](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L86)
|
||||
[src/core/structures/core-context.ts:23](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/core-context.ts#L23)
|
||||
|
||||
___
|
||||
|
||||
@@ -228,7 +281,7 @@ ___
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `content` | [`ReplyOptions`](../modules.md#replyoptions) |
|
||||
| `content` | `ReplyOptions` |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -236,7 +289,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:97](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L97)
|
||||
[src/core/structures/context.ts:74](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L74)
|
||||
|
||||
___
|
||||
|
||||
@@ -248,12 +301,16 @@ ___
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `wrappable` | `Message`<`boolean`\> \| `ChatInputCommandInteraction`<`CacheType`\> |
|
||||
| `wrappable` | `Message`<`boolean`\> \| `BaseInteraction`<`CacheType`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Context`](Context.md)
|
||||
|
||||
#### Overrides
|
||||
|
||||
CoreContext.wrap
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:90](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L90)
|
||||
[src/core/structures/context.ts:84](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L84)
|
||||
|
||||
@@ -6,6 +6,11 @@ sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
**`Since`**
|
||||
|
||||
2.0.0
|
||||
Version 4.0.0 will internalize this api. Please refrain from using ModuleStore!
|
||||
|
||||
## Implements
|
||||
|
||||
- [`ErrorHandling`](../interfaces/ErrorHandling.md)
|
||||
@@ -30,21 +35,23 @@ Number of times the process should throw an error until crashing and exiting
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:24](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/errorHandling.ts#L24)
|
||||
[src/core/structures/services/error-handling.ts:13](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/error-handling.ts#L13)
|
||||
|
||||
## Methods
|
||||
|
||||
### crash
|
||||
|
||||
▸ **crash**(`error`): `never`
|
||||
▸ **crash**(`err`): `never`
|
||||
|
||||
Utility function to crash
|
||||
**`Deprecated`**
|
||||
|
||||
Version 4 will remove this method
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `error` | `Error` |
|
||||
| `err` | `Error` |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -56,21 +63,22 @@ Utility function to crash
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:25](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/errorHandling.ts#L25)
|
||||
[src/core/structures/services/error-handling.ts:9](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/error-handling.ts#L9)
|
||||
|
||||
___
|
||||
|
||||
### updateAlive
|
||||
|
||||
▸ **updateAlive**(`e`): `void`
|
||||
▸ **updateAlive**(`err`): `void`
|
||||
|
||||
A function that is called on every crash. Updates keepAlive
|
||||
A function that is called on every crash. Updates keepAlive.
|
||||
If keepAlive is 0, the process crashes.
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `e` | `Error` |
|
||||
| `err` | `Error` |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -82,4 +90,4 @@ A function that is called on every crash. Updates keepAlive
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:28](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/errorHandling.ts#L28)
|
||||
[src/core/structures/services/error-handling.ts:15](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/error-handling.ts#L15)
|
||||
|
||||
@@ -6,6 +6,11 @@ sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
**`Since`**
|
||||
|
||||
2.0.0
|
||||
Version 4.0.0 will internalize this api. Please refrain from using ModuleStore!
|
||||
|
||||
## Implements
|
||||
|
||||
- [`Logging`](../interfaces/Logging.md)
|
||||
@@ -28,7 +33,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:11](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L11)
|
||||
[src/core/structures/services/logger.ts:9](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/logger.ts#L9)
|
||||
|
||||
___
|
||||
|
||||
@@ -40,7 +45,7 @@ ___
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`unknown`\> |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload) |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -52,7 +57,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:12](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L12)
|
||||
[src/core/structures/services/logger.ts:10](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/logger.ts#L10)
|
||||
|
||||
___
|
||||
|
||||
@@ -64,7 +69,7 @@ ___
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`unknown`\> |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload) |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -76,7 +81,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:16](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L16)
|
||||
[src/core/structures/services/logger.ts:14](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/logger.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
@@ -88,7 +93,7 @@ ___
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`unknown`\> |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload) |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -100,7 +105,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:20](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L20)
|
||||
[src/core/structures/services/logger.ts:18](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/logger.ts#L18)
|
||||
|
||||
___
|
||||
|
||||
@@ -112,7 +117,7 @@ ___
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`unknown`\> |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload) |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -124,4 +129,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:24](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L24)
|
||||
[src/core/structures/services/logger.ts:22](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/logger.ts#L22)
|
||||
|
||||
@@ -6,6 +6,11 @@ sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
**`Since`**
|
||||
|
||||
2.0.0
|
||||
Version 4.0.0 will internalize this api. Please refrain from using DefaultModuleManager!
|
||||
|
||||
## Implements
|
||||
|
||||
- [`ModuleManager`](../interfaces/ModuleManager.md)
|
||||
@@ -20,17 +25,51 @@ custom_edit_url: null
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `moduleStore` | [`ModuleStore`](ModuleStore.md) |
|
||||
| `moduleStore` | [`CoreModuleStore`](../interfaces/CoreModuleStore.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/moduleManager.ts:13](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/moduleManager.ts#L13)
|
||||
[src/core/structures/services/module-manager.ts:12](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/module-manager.ts#L12)
|
||||
|
||||
## Properties
|
||||
|
||||
### moduleStore
|
||||
|
||||
• `Private` **moduleStore**: [`CoreModuleStore`](../interfaces/CoreModuleStore.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/services/module-manager.ts:12](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/module-manager.ts#L12)
|
||||
|
||||
## Methods
|
||||
|
||||
### get
|
||||
|
||||
▸ **get**<`T`\>(`strat`): `undefined` \| [`Processed`](../modules.md#processed)<[`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]\>
|
||||
▸ **get**(`id`): `undefined` \| `string`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `id` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| `string`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ModuleManager](../interfaces/ModuleManager.md).[get](../interfaces/ModuleManager.md#get)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/services/module-manager.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/module-manager.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
### getByNameCommandType
|
||||
|
||||
▸ **getByNameCommandType**<`T`\>(`name`, `commandType`): `undefined` \| `Promise`<[`CommandModuleDefs`](../interfaces/CommandModuleDefs.md)[`T`]\>
|
||||
|
||||
#### Type parameters
|
||||
|
||||
@@ -42,31 +81,75 @@ custom_edit_url: null
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `strat` | (`ms`: [`ModuleStore`](ModuleStore.md)) => `undefined` \| [`Processed`](../modules.md#processed)<[`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]\> |
|
||||
| `name` | `string` |
|
||||
| `commandType` | `T` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`Processed`](../modules.md#processed)<[`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]\>
|
||||
`undefined` \| `Promise`<[`CommandModuleDefs`](../interfaces/CommandModuleDefs.md)[`T`]\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ModuleManager](../interfaces/ModuleManager.md).[get](../interfaces/ModuleManager.md#get)
|
||||
[ModuleManager](../interfaces/ModuleManager.md).[getByNameCommandType](../interfaces/ModuleManager.md#getbynamecommandtype)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/moduleManager.ts:14](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/moduleManager.ts#L14)
|
||||
[src/core/structures/services/module-manager.ts:14](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/module-manager.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
### set
|
||||
### getMetadata
|
||||
|
||||
▸ **set**(`strat`): `void`
|
||||
▸ **getMetadata**(`m`): `CommandMeta`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `strat` | (`ms`: [`ModuleStore`](ModuleStore.md)) => `void` |
|
||||
| `m` | `Module` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`CommandMeta`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ModuleManager](../interfaces/ModuleManager.md).[getMetadata](../interfaces/ModuleManager.md#getmetadata)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/services/module-manager.ts:26](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/module-manager.ts#L26)
|
||||
|
||||
___
|
||||
|
||||
### getPublishableCommands
|
||||
|
||||
▸ **getPublishableCommands**(): `Promise`<[`CommandModule`](../modules.md#commandmodule)[]\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`CommandModule`](../modules.md#commandmodule)[]\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ModuleManager](../interfaces/ModuleManager.md).[getPublishableCommands](../interfaces/ModuleManager.md#getpublishablecommands)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/services/module-manager.ts:41](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/module-manager.ts#L41)
|
||||
|
||||
___
|
||||
|
||||
### set
|
||||
|
||||
▸ **set**(`id`, `path`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `id` | `string` |
|
||||
| `path` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -78,4 +161,29 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/moduleManager.ts:20](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/moduleManager.ts#L20)
|
||||
[src/core/structures/services/module-manager.ts:37](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/module-manager.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### setMetadata
|
||||
|
||||
▸ **setMetadata**(`m`, `c`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `m` | `Module` |
|
||||
| `c` | `CommandMeta` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ModuleManager](../interfaces/ModuleManager.md).[setMetadata](../interfaces/ModuleManager.md#setmetadata)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/services/module-manager.ts:22](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/module-manager.ts#L22)
|
||||
|
||||
@@ -30,33 +30,13 @@ Will be refactored in future
|
||||
|
||||
## Properties
|
||||
|
||||
### execute
|
||||
|
||||
• `Abstract` **execute**: [`EventModuleDefs`](../modules.md#eventmoduledefs)[`Type`][``"execute"``]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:130](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sern.ts#L130)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](../interfaces/ControlPlugin.md)<`any`[]\>[] = `[]`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:129](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sern.ts#L129)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](../interfaces/InitPlugin.md)<`any`[]\>[] = `[]`
|
||||
• **plugins**: [`AnyEventPlugin`](../modules.md#anyeventplugin)[] = `[]`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:128](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sern.ts#L128)
|
||||
[src/core/modules.ts:100](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L100)
|
||||
|
||||
___
|
||||
|
||||
@@ -66,4 +46,48 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:127](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sern.ts#L127)
|
||||
[src/core/modules.ts:99](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L99)
|
||||
|
||||
___
|
||||
|
||||
### \_instance
|
||||
|
||||
▪ `Static` `Private` **\_instance**: [`EventModule`](../modules.md#eventmodule)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/modules.ts:102](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L102)
|
||||
|
||||
## Methods
|
||||
|
||||
### execute
|
||||
|
||||
▸ `Abstract` **execute**(`...args`): `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...args` | `EventArgs`<`Type`, [`Control`](../enums/PluginType.md#control)\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/modules.ts:111](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L111)
|
||||
|
||||
___
|
||||
|
||||
### getInstance
|
||||
|
||||
▸ `Static` **getInstance**(): [`EventModule`](../modules.md#eventmodule)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`EventModule`](../modules.md#eventmodule)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/modules.ts:103](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L103)
|
||||
|
||||
@@ -6,8 +6,11 @@ sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Storing all command modules
|
||||
This dependency is usually injected into ModuleManager
|
||||
Represents a core module store that stores IDs mapped to file paths.
|
||||
|
||||
## Implements
|
||||
|
||||
- [`CoreModuleStore`](../interfaces/CoreModuleStore.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
@@ -17,69 +20,28 @@ This dependency is usually injected into ModuleManager
|
||||
|
||||
## Properties
|
||||
|
||||
### ApplicationCommands
|
||||
### commands
|
||||
|
||||
• `Readonly` **ApplicationCommands**: `Object`
|
||||
• **commands**: `Map`<`string`, `string`\>
|
||||
|
||||
#### Type declaration
|
||||
#### Implementation of
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `1` | `Map`<`string`, [`Processed`](../modules.md#processed)<[`CommandModule`](../modules.md#commandmodule)\>\> |
|
||||
| `2` | `Map`<`string`, [`Processed`](../modules.md#processed)<[`CommandModule`](../modules.md#commandmodule)\>\> |
|
||||
| `3` | `Map`<`string`, [`Processed`](../modules.md#processed)<[`CommandModule`](../modules.md#commandmodule)\>\> |
|
||||
[CoreModuleStore](../interfaces/CoreModuleStore.md).[commands](../interfaces/CoreModuleStore.md#commands)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/moduleStore.ts:11](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/moduleStore.ts#L11)
|
||||
[src/core/structures/module-store.ts:11](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/module-store.ts#L11)
|
||||
|
||||
___
|
||||
|
||||
### BothCommands
|
||||
### metadata
|
||||
|
||||
• `Readonly` **BothCommands**: `Map`<`string`, [`Processed`](../modules.md#processed)<[`CommandModule`](../modules.md#commandmodule)\>\>
|
||||
• **metadata**: `WeakMap`<`Module`, `CommandMeta`\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[CoreModuleStore](../interfaces/CoreModuleStore.md).[metadata](../interfaces/CoreModuleStore.md#metadata)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/moduleStore.ts:10](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/moduleStore.ts#L10)
|
||||
|
||||
___
|
||||
|
||||
### InteractionHandlers
|
||||
|
||||
• `Readonly` **InteractionHandlers**: `Object`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `2` | `Map`<`string`, [`Processed`](../modules.md#processed)<[`CommandModule`](../modules.md#commandmodule)\>\> |
|
||||
| `3` | `Map`<`string`, [`Processed`](../modules.md#processed)<[`CommandModule`](../modules.md#commandmodule)\>\> |
|
||||
| `5` | `Map`<`string`, [`Processed`](../modules.md#processed)<[`CommandModule`](../modules.md#commandmodule)\>\> |
|
||||
| `6` | `Map`<`string`, [`Processed`](../modules.md#processed)<[`CommandModule`](../modules.md#commandmodule)\>\> |
|
||||
| `7` | `Map`<`string`, [`Processed`](../modules.md#processed)<[`CommandModule`](../modules.md#commandmodule)\>\> |
|
||||
| `8` | `Map`<`string`, [`Processed`](../modules.md#processed)<[`CommandModule`](../modules.md#commandmodule)\>\> |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/moduleStore.ts:18](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/moduleStore.ts#L18)
|
||||
|
||||
___
|
||||
|
||||
### ModalSubmit
|
||||
|
||||
• `Readonly` **ModalSubmit**: `Map`<`string`, [`Processed`](../modules.md#processed)<[`CommandModule`](../modules.md#commandmodule)\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/moduleStore.ts:16](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/moduleStore.ts#L16)
|
||||
|
||||
___
|
||||
|
||||
### TextCommands
|
||||
|
||||
• `Readonly` **TextCommands**: `Map`<`string`, [`Processed`](../modules.md#processed)<[`CommandModule`](../modules.md#commandmodule)\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/moduleStore.ts:17](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/moduleStore.ts#L17)
|
||||
[src/core/structures/module-store.ts:10](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/module-store.ts#L10)
|
||||
|
||||
@@ -6,6 +6,10 @@ sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
**`Since`**
|
||||
|
||||
1.0.0
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- `EventEmitter`
|
||||
@@ -16,21 +20,15 @@ custom_edit_url: null
|
||||
|
||||
### constructor
|
||||
|
||||
• **new SernEmitter**(`options?`)
|
||||
• **new SernEmitter**()
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `options?` | `EventEmitterOptions` |
|
||||
|
||||
#### Inherited from
|
||||
#### Overrides
|
||||
|
||||
EventEmitter.constructor
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:111
|
||||
[src/core/structures/sern-emitter.ts:10](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/sern-emitter.ts#L10)
|
||||
|
||||
## Properties
|
||||
|
||||
@@ -44,7 +42,7 @@ EventEmitter.captureRejectionSymbol
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:328
|
||||
node_modules/@types/node/events.d.ts:328
|
||||
|
||||
___
|
||||
|
||||
@@ -60,7 +58,7 @@ EventEmitter.captureRejections
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:333
|
||||
node_modules/@types/node/events.d.ts:333
|
||||
|
||||
___
|
||||
|
||||
@@ -74,7 +72,7 @@ EventEmitter.defaultMaxListeners
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:334
|
||||
node_modules/@types/node/events.d.ts:334
|
||||
|
||||
___
|
||||
|
||||
@@ -96,7 +94,7 @@ EventEmitter.errorMonitor
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:327
|
||||
node_modules/@types/node/events.d.ts:327
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -127,13 +125,13 @@ EventEmitter.addListener
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:354
|
||||
node_modules/@types/node/events.d.ts:354
|
||||
|
||||
___
|
||||
|
||||
### emit
|
||||
|
||||
▸ **emit**<`T`\>(`eventName`, ...`args`): `boolean`
|
||||
▸ **emit**<`T`\>(`eventName`, `...args`): `boolean`
|
||||
|
||||
Listening to sern events with on. This event stays on until a crash or a normal exit
|
||||
|
||||
@@ -141,14 +139,14 @@ Listening to sern events with on. This event stays on until a crash or a normal
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends keyof [`SernEventsMapping`](../modules.md#serneventsmapping) |
|
||||
| `T` | extends keyof [`SernEventsMapping`](../interfaces/SernEventsMapping.md) |
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `eventName` | `T` | |
|
||||
| `...args` | [`SernEventsMapping`](../modules.md#serneventsmapping)[`T`] | the arguments for emitting the eventName |
|
||||
| `...args` | [`SernEventsMapping`](../interfaces/SernEventsMapping.md)[`T`] | the arguments for emitting the eventName |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -160,7 +158,7 @@ EventEmitter.emit
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sernEmitter.ts:34](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sernEmitter.ts#L34)
|
||||
[src/core/structures/sern-emitter.ts:40](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/sern-emitter.ts#L40)
|
||||
|
||||
___
|
||||
|
||||
@@ -198,7 +196,7 @@ EventEmitter.eventNames
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:669
|
||||
node_modules/@types/node/events.d.ts:673
|
||||
|
||||
___
|
||||
|
||||
@@ -223,16 +221,19 @@ EventEmitter.getMaxListeners
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:526
|
||||
node_modules/@types/node/events.d.ts:526
|
||||
|
||||
___
|
||||
|
||||
### listenerCount
|
||||
|
||||
▸ **listenerCount**(`eventName`): `number`
|
||||
▸ **listenerCount**(`eventName`, `listener?`): `number`
|
||||
|
||||
Returns the number of listeners listening to the event named `eventName`.
|
||||
|
||||
If `listener` is provided, it will return how many times the listener
|
||||
is found in the list of the listeners of the event.
|
||||
|
||||
**`Since`**
|
||||
|
||||
v3.2.0
|
||||
@@ -242,6 +243,7 @@ v3.2.0
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `eventName` | `string` \| `symbol` | The name of the event being listened for |
|
||||
| `listener?` | `Function` | The event handler function |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -253,7 +255,7 @@ EventEmitter.listenerCount
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:616
|
||||
node_modules/@types/node/events.d.ts:620
|
||||
|
||||
___
|
||||
|
||||
@@ -291,7 +293,7 @@ EventEmitter.listeners
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:539
|
||||
node_modules/@types/node/events.d.ts:539
|
||||
|
||||
___
|
||||
|
||||
@@ -322,7 +324,7 @@ EventEmitter.off
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:499
|
||||
node_modules/@types/node/events.d.ts:499
|
||||
|
||||
___
|
||||
|
||||
@@ -336,14 +338,14 @@ Listening to sern events with on. This event stays on until a crash or a normal
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends keyof [`SernEventsMapping`](../modules.md#serneventsmapping) |
|
||||
| `T` | extends keyof [`SernEventsMapping`](../interfaces/SernEventsMapping.md) |
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `eventName` | `T` | |
|
||||
| `listener` | (...`args`: [`SernEventsMapping`](../modules.md#serneventsmapping)[`T`][]) => `void` | what to do with the data |
|
||||
| `listener` | (...`args`: [`SernEventsMapping`](../interfaces/SernEventsMapping.md)[`T`][]) => `void` | what to do with the data |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -355,7 +357,7 @@ EventEmitter.on
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sernEmitter.ts:12](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sernEmitter.ts#L12)
|
||||
[src/core/structures/sern-emitter.ts:18](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/sern-emitter.ts#L18)
|
||||
|
||||
___
|
||||
|
||||
@@ -369,14 +371,14 @@ Listening to sern events with on. This event stays on until a crash or a normal
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends keyof [`SernEventsMapping`](../modules.md#serneventsmapping) |
|
||||
| `T` | extends keyof [`SernEventsMapping`](../interfaces/SernEventsMapping.md) |
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `eventName` | `T` | |
|
||||
| `listener` | (...`args`: [`SernEventsMapping`](../modules.md#serneventsmapping)[`T`][]) => `void` | what to do with the data |
|
||||
| `listener` | (...`args`: [`SernEventsMapping`](../interfaces/SernEventsMapping.md)[`T`][]) => `void` | what to do with the data |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -388,7 +390,7 @@ EventEmitter.once
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sernEmitter.ts:23](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sernEmitter.ts#L23)
|
||||
[src/core/structures/sern-emitter.ts:29](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/sern-emitter.ts#L29)
|
||||
|
||||
___
|
||||
|
||||
@@ -430,7 +432,7 @@ EventEmitter.prependListener
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:634
|
||||
node_modules/@types/node/events.d.ts:638
|
||||
|
||||
___
|
||||
|
||||
@@ -470,7 +472,7 @@ EventEmitter.prependOnceListener
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:650
|
||||
node_modules/@types/node/events.d.ts:654
|
||||
|
||||
___
|
||||
|
||||
@@ -525,7 +527,7 @@ EventEmitter.rawListeners
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:569
|
||||
node_modules/@types/node/events.d.ts:569
|
||||
|
||||
___
|
||||
|
||||
@@ -561,7 +563,7 @@ EventEmitter.removeAllListeners
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:510
|
||||
node_modules/@types/node/events.d.ts:510
|
||||
|
||||
___
|
||||
|
||||
@@ -667,7 +669,7 @@ EventEmitter.removeListener
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:494
|
||||
node_modules/@types/node/events.d.ts:494
|
||||
|
||||
___
|
||||
|
||||
@@ -702,13 +704,13 @@ EventEmitter.setMaxListeners
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:520
|
||||
node_modules/@types/node/events.d.ts:520
|
||||
|
||||
___
|
||||
|
||||
### failure
|
||||
|
||||
▸ `Static` **failure**(`module?`, `reason?`): `never` & { `module?`: [`AnyModule`](../modules.md#anymodule) ; `reason`: `string` \| `Error` ; `type`: [`Failure`](../enums/PayloadType.md#failure) } & { `type`: [`Failure`](../enums/PayloadType.md#failure) } & `never`
|
||||
▸ `Static` **failure**(`module?`, `reason?`): `Object`
|
||||
|
||||
Creates a compliant SernEmitter failure payload
|
||||
|
||||
@@ -716,16 +718,16 @@ Creates a compliant SernEmitter failure payload
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `module?` | [`Module`](../interfaces/Module.md) |
|
||||
| `module?` | `Module` |
|
||||
| `reason?` | `unknown` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`never` & { `module?`: [`AnyModule`](../modules.md#anymodule) ; `reason`: `string` \| `Error` ; `type`: [`Failure`](../enums/PayloadType.md#failure) } & { `type`: [`Failure`](../enums/PayloadType.md#failure) } & `never`
|
||||
`Object`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sernEmitter.ts:53](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sernEmitter.ts#L53)
|
||||
[src/core/structures/sern-emitter.ts:59](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/sern-emitter.ts#L59)
|
||||
|
||||
___
|
||||
|
||||
@@ -779,7 +781,7 @@ EventEmitter.getEventListeners
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:299
|
||||
node_modules/@types/node/events.d.ts:299
|
||||
|
||||
___
|
||||
|
||||
@@ -823,7 +825,7 @@ EventEmitter.listenerCount
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:271
|
||||
node_modules/@types/node/events.d.ts:271
|
||||
|
||||
___
|
||||
|
||||
@@ -909,7 +911,7 @@ EventEmitter.on
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:254
|
||||
node_modules/@types/node/events.d.ts:254
|
||||
|
||||
▸ `Static` **on**<`E`, `K`\>(`eventEmitter`, `eventName`): `AsyncIterableIterator`<`E` extends `Client`<`boolean`\> ? `ClientEvents`[`K`] : `any`\>
|
||||
|
||||
@@ -937,7 +939,7 @@ EventEmitter.on
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:222
|
||||
node_modules/discord.js/typings/index.d.ts:229
|
||||
|
||||
___
|
||||
|
||||
@@ -1047,7 +1049,7 @@ EventEmitter.once
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:194
|
||||
node_modules/@types/node/events.d.ts:194
|
||||
|
||||
▸ `Static` **once**(`emitter`, `eventName`, `options?`): `Promise`<`any`[]\>
|
||||
|
||||
@@ -1069,7 +1071,7 @@ EventEmitter.once
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:195
|
||||
node_modules/@types/node/events.d.ts:195
|
||||
|
||||
▸ `Static` **once**<`E`, `K`\>(`eventEmitter`, `eventName`): `Promise`<`E` extends `Client`<`boolean`\> ? `ClientEvents`[`K`] : `any`[]\>
|
||||
|
||||
@@ -1097,7 +1099,7 @@ EventEmitter.once
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:218
|
||||
node_modules/discord.js/typings/index.d.ts:225
|
||||
|
||||
___
|
||||
|
||||
@@ -1116,7 +1118,7 @@ ___
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `type` | [`PayloadType`](../enums/PayloadType.md) |
|
||||
| `module?` | [`Module`](../interfaces/Module.md) |
|
||||
| `module?` | `Module` |
|
||||
| `reason?` | `unknown` |
|
||||
|
||||
#### Returns
|
||||
@@ -1125,13 +1127,13 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sernEmitter.ts:40](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sernEmitter.ts#L40)
|
||||
[src/core/structures/sern-emitter.ts:46](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/sern-emitter.ts#L46)
|
||||
|
||||
___
|
||||
|
||||
### setMaxListeners
|
||||
|
||||
▸ `Static` **setMaxListeners**(`n?`, ...`eventTargets`): `void`
|
||||
▸ `Static` **setMaxListeners**(`n?`, `...eventTargets`): `void`
|
||||
|
||||
```js
|
||||
const {
|
||||
@@ -1166,13 +1168,13 @@ EventEmitter.setMaxListeners
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/@types+node@18.11.18/node_modules/@types/node/ts4.8/events.d.ts:317
|
||||
node_modules/@types/node/events.d.ts:317
|
||||
|
||||
___
|
||||
|
||||
### success
|
||||
|
||||
▸ `Static` **success**(`module`): { `module`: [`AnyModule`](../modules.md#anymodule) ; `type`: [`Success`](../enums/PayloadType.md#success) } & { `type`: [`Success`](../enums/PayloadType.md#success) } & `never` & `never`
|
||||
▸ `Static` **success**(`module`): `Object`
|
||||
|
||||
Creates a compliant SernEmitter module success payload
|
||||
|
||||
@@ -1180,21 +1182,21 @@ Creates a compliant SernEmitter module success payload
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `module` | [`Module`](../interfaces/Module.md) |
|
||||
| `module` | `Module` |
|
||||
|
||||
#### Returns
|
||||
|
||||
{ `module`: [`AnyModule`](../modules.md#anymodule) ; `type`: [`Success`](../enums/PayloadType.md#success) } & { `type`: [`Success`](../enums/PayloadType.md#success) } & `never` & `never`
|
||||
`Object`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sernEmitter.ts:66](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sernEmitter.ts#L66)
|
||||
[src/core/structures/sern-emitter.ts:72](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/sern-emitter.ts#L72)
|
||||
|
||||
___
|
||||
|
||||
### warning
|
||||
|
||||
▸ `Static` **warning**(`reason`): `never` & `never` & { `reason`: `string` ; `type`: [`Warning`](../enums/PayloadType.md#warning) } & { `type`: [`Warning`](../enums/PayloadType.md#warning) }
|
||||
▸ `Static` **warning**(`reason`): `Object`
|
||||
|
||||
Creates a compliant SernEmitter module warning payload
|
||||
|
||||
@@ -1206,8 +1208,8 @@ Creates a compliant SernEmitter module warning payload
|
||||
|
||||
#### Returns
|
||||
|
||||
`never` & `never` & { `reason`: `string` ; `type`: [`Warning`](../enums/PayloadType.md#warning) } & { `type`: [`Warning`](../enums/PayloadType.md#warning) }
|
||||
`Object`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sernEmitter.ts:76](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sernEmitter.ts#L76)
|
||||
[src/core/structures/sern-emitter.ts:82](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/sern-emitter.ts#L82)
|
||||
|
||||
@@ -6,6 +6,9 @@ sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
**`Since`**
|
||||
|
||||
1.0.0
|
||||
A bitfield that discriminates command modules
|
||||
|
||||
**`Example`**
|
||||
@@ -27,11 +30,9 @@ export default commandModule({
|
||||
|
||||
• **Both** = ``3``
|
||||
|
||||
The CommandType for hybrid commands, text and slash
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:28](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L28)
|
||||
[src/core/structures/enums.ts:20](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L20)
|
||||
|
||||
___
|
||||
|
||||
@@ -39,23 +40,19 @@ ___
|
||||
|
||||
• **Button** = ``16``
|
||||
|
||||
The CommandType for ButtonInteraction commands
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:40](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L40)
|
||||
[src/core/structures/enums.ts:23](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L23)
|
||||
|
||||
___
|
||||
|
||||
### ChannelSelect
|
||||
|
||||
• **ChannelSelect** = ``256``
|
||||
|
||||
The CommandType for the other SelectMenuInteractions
|
||||
• **ChannelSelect** = ``1024``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:52](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L52)
|
||||
[src/core/structures/enums.ts:29](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L29)
|
||||
|
||||
___
|
||||
|
||||
@@ -63,11 +60,9 @@ ___
|
||||
|
||||
• **CtxMsg** = ``8``
|
||||
|
||||
The CommandType for MessageContextMenuInteraction commands
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L36)
|
||||
[src/core/structures/enums.ts:22](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L22)
|
||||
|
||||
___
|
||||
|
||||
@@ -75,11 +70,9 @@ ___
|
||||
|
||||
• **CtxUser** = ``4``
|
||||
|
||||
The CommandType for UserContextMenuInteraction commands
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:32](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L32)
|
||||
[src/core/structures/enums.ts:21](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L21)
|
||||
|
||||
___
|
||||
|
||||
@@ -89,7 +82,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:53](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L53)
|
||||
[src/core/structures/enums.ts:28](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L28)
|
||||
|
||||
___
|
||||
|
||||
@@ -97,21 +90,19 @@ ___
|
||||
|
||||
• **Modal** = ``64``
|
||||
|
||||
The CommandType for ModalSubmitInteraction commands
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:48](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L48)
|
||||
[src/core/structures/enums.ts:25](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L25)
|
||||
|
||||
___
|
||||
|
||||
### RoleSelect
|
||||
|
||||
• **RoleSelect** = ``1024``
|
||||
• **RoleSelect** = ``256``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:54](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L54)
|
||||
[src/core/structures/enums.ts:27](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L27)
|
||||
|
||||
___
|
||||
|
||||
@@ -119,11 +110,9 @@ ___
|
||||
|
||||
• **Slash** = ``2``
|
||||
|
||||
The CommandType for slash commands
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:24](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L24)
|
||||
[src/core/structures/enums.ts:19](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L19)
|
||||
|
||||
___
|
||||
|
||||
@@ -131,11 +120,9 @@ ___
|
||||
|
||||
• **StringSelect** = ``32``
|
||||
|
||||
The CommandType for StringSelectMenuInteraction commands
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:44](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L44)
|
||||
[src/core/structures/enums.ts:24](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L24)
|
||||
|
||||
___
|
||||
|
||||
@@ -143,18 +130,16 @@ ___
|
||||
|
||||
• **Text** = ``1``
|
||||
|
||||
The CommandType for text commands
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:20](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L20)
|
||||
[src/core/structures/enums.ts:18](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L18)
|
||||
|
||||
___
|
||||
|
||||
### UserSelect
|
||||
|
||||
• **UserSelect** = ``2048``
|
||||
• **UserSelect** = ``128``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:55](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L55)
|
||||
[src/core/structures/enums.ts:26](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L26)
|
||||
|
||||
@@ -31,7 +31,7 @@ The EventType for handling discord events
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:77](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L77)
|
||||
[src/core/structures/enums.ts:51](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L51)
|
||||
|
||||
___
|
||||
|
||||
@@ -44,7 +44,7 @@ Could be for example, `process` events, database events
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:86](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L86)
|
||||
[src/core/structures/enums.ts:60](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L60)
|
||||
|
||||
___
|
||||
|
||||
@@ -56,4 +56,4 @@ The EventType for handling sern events
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:81](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L81)
|
||||
[src/core/structures/enums.ts:55](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L55)
|
||||
|
||||
@@ -16,7 +16,7 @@ The PayloadType for a SernEmitter failure event
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:134](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L134)
|
||||
[src/core/structures/enums.ts:98](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L98)
|
||||
|
||||
___
|
||||
|
||||
@@ -28,7 +28,7 @@ The PayloadType for a SernEmitter success event
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:130](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L130)
|
||||
[src/core/structures/enums.ts:94](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L94)
|
||||
|
||||
___
|
||||
|
||||
@@ -40,4 +40,4 @@ The PayloadType for a SernEmitter warning event
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:138](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L138)
|
||||
[src/core/structures/enums.ts:102](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L102)
|
||||
|
||||
@@ -22,20 +22,6 @@ export default function myPlugin() : EventPlugin<CommandType.Text> {
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### Command
|
||||
|
||||
• **Command** = ``1``
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
Use PluginType.Init instead
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:112](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L112)
|
||||
|
||||
___
|
||||
|
||||
### Control
|
||||
|
||||
• **Control** = ``2``
|
||||
@@ -44,21 +30,7 @@ The PluginType for EventPlugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:121](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L121)
|
||||
|
||||
___
|
||||
|
||||
### Event
|
||||
|
||||
• **Event** = ``2``
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
Use PluginType.Control instead
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:117](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L117)
|
||||
[src/core/structures/enums.ts:85](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L85)
|
||||
|
||||
___
|
||||
|
||||
@@ -70,4 +42,4 @@ The PluginType for InitPlugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:107](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L107)
|
||||
[src/core/structures/enums.ts:81](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L81)
|
||||
|
||||
@@ -17,7 +17,7 @@ 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/33f1446/src/handler/structures/errors.ts#L9)
|
||||
[src/handler/structures/errors.ts:9](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/structures/errors.ts#L9)
|
||||
|
||||
___
|
||||
|
||||
@@ -29,7 +29,7 @@ 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/33f1446/src/handler/structures/errors.ts#L29)
|
||||
[src/handler/structures/errors.ts:29](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/structures/errors.ts#L29)
|
||||
|
||||
___
|
||||
|
||||
@@ -41,7 +41,7 @@ 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/33f1446/src/handler/structures/errors.ts#L17)
|
||||
[src/handler/structures/errors.ts:17](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/structures/errors.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
@@ -53,7 +53,7 @@ Required Dependency not found
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/errors.ts#L37)
|
||||
[src/handler/structures/errors.ts:37](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/structures/errors.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
@@ -65,7 +65,7 @@ Unsupported interaction at this moment.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:21](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/errors.ts#L21)
|
||||
[src/handler/structures/errors.ts:21](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/structures/errors.ts#L21)
|
||||
|
||||
___
|
||||
|
||||
@@ -77,7 +77,7 @@ Unsupported feature attempted to access at this time
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:33](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/errors.ts#L33)
|
||||
[src/handler/structures/errors.ts:33](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/structures/errors.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -89,7 +89,7 @@ One plugin called `controller.stop()` (end command execution / loading)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:25](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/errors.ts#L25)
|
||||
[src/handler/structures/errors.ts:25](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/structures/errors.ts#L25)
|
||||
|
||||
___
|
||||
|
||||
@@ -101,4 +101,4 @@ 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/33f1446/src/handler/structures/errors.ts#L13)
|
||||
[src/handler/structures/errors.ts:13](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/structures/errors.ts#L13)
|
||||
|
||||
@@ -11,7 +11,7 @@ custom_edit_url: null
|
||||
</div>
|
||||
|
||||
<h1 align="center">Handlers. Redefined.</h1>
|
||||
<h4 align="center">A customizable, batteries-included, powerful discord.js framework to streamline bot development.</h4>
|
||||
<h4 align="center">A complete, customizable, typesafe, & reactive framework for discord bots</h4>
|
||||
|
||||
<div align="center" styles="margin-top: 10px">
|
||||
<img src="https://img.shields.io/badge/open-source-brightgreen" />
|
||||
@@ -22,6 +22,18 @@ custom_edit_url: null
|
||||
<img alt="Lines of code" src="https://img.shields.io/badge/total%20lines-2k-blue" />
|
||||
</div>
|
||||
|
||||
## Why?
|
||||
- For you. A framework that's tailored to your exact needs.
|
||||
- Lightweight. Does a lot while being small.
|
||||
- Latest features. Support for discord.js v14 and all of its interactions.
|
||||
- Hybrid, customizable and composable commands. Create them just how you like.
|
||||
- Start quickly. Plug and play or customize to your liking.
|
||||
- Embraces reactive programming. For consistent and reliable backend.
|
||||
- Switch and customize how errors are handled, logging, and more.
|
||||
- Use it with TypeScript or JavaScript. CommonJS and ESM supported.
|
||||
- Active and growing community, always here to help. [Join us](https://sern.dev/discord)
|
||||
- Unleash its full potential with a powerful CLI and awesome plugins.
|
||||
|
||||
## 📜 Installation
|
||||
|
||||
```sh
|
||||
@@ -35,46 +47,56 @@ yarn add @sern/handler
|
||||
```sh
|
||||
pnpm add @sern/handler
|
||||
```
|
||||
## Why?
|
||||
- Most handlers don't support discord.js 14.7+
|
||||
- Customizable commands
|
||||
- Plug and play or customize to your liking
|
||||
- Embraces reactive programming for consistent and reliable backend
|
||||
- Customizable logger, error handling, and more
|
||||
- Active development and growing [community](https://sern.dev/discord)
|
||||
## 👀 Quick Look
|
||||
|
||||
* Support for discord.js v14 and all interactions
|
||||
* Hybrid commands
|
||||
* Lightweight and customizable
|
||||
* ESM, CommonJS and TypeScript support
|
||||
* A powerful CLI and awesome community-made plugins
|
||||
|
||||
## 👶 Basic Usage
|
||||
<details open><summary>ping.ts</summary>
|
||||
|
||||
#### ` index.js (CommonJS)`
|
||||
|
||||
```js
|
||||
// Import the discord.js Client and GatewayIntentBits
|
||||
const { Client, GatewayIntentBits } = require('discord.js');
|
||||
|
||||
// Import Sern namespace
|
||||
const { Sern } = require('@sern/handler');
|
||||
|
||||
// Our configuration file
|
||||
const { defaultPrefix, token } = require('./config.json');
|
||||
|
||||
const client = new Client({
|
||||
intents: [
|
||||
GatewayIntentBits.Guilds,
|
||||
GatewayIntentBits.GuildMembers,
|
||||
GatewayIntentBits.GuildMessages
|
||||
]
|
||||
```ts
|
||||
export default commandModule({
|
||||
type: CommandType.Slash,
|
||||
//Installed plugin to publish to discord api and allow access to owners only.
|
||||
plugins: [publish(), ownerOnly()],
|
||||
description: 'A ping pong command',
|
||||
execute(ctx) {
|
||||
ctx.reply('Hello owner of the bot');
|
||||
}
|
||||
});
|
||||
export const useContainer = Sern.makeDependencies({
|
||||
```
|
||||
</details>
|
||||
<details open><summary>modal.ts</summary>
|
||||
|
||||
```ts
|
||||
export default commandModule({
|
||||
type: CommandType.Modal,
|
||||
//Installed a plugin to make sure modal fields pass a validation.
|
||||
plugins : [
|
||||
assertFields({
|
||||
fields: {
|
||||
name: /^([^0-9]*)$/
|
||||
},
|
||||
failure: (errors, modal) => modal.reply('your submission did not pass the validations')
|
||||
})
|
||||
],
|
||||
execute : (modal) => {
|
||||
modal.reply('thanks for the submission!');
|
||||
}
|
||||
})
|
||||
```
|
||||
</details>
|
||||
<details open><summary>index.ts</summary>
|
||||
|
||||
```ts
|
||||
import { Client, GatewayIntentBits } from 'discord.js';
|
||||
import { Sern, single, type Dependencies } from '@sern/handler';
|
||||
|
||||
//client has been declared previously
|
||||
|
||||
interface MyDependencies extends Dependencies {
|
||||
'@sern/client': Singleton<Client>;
|
||||
}
|
||||
export const useContainer = Sern.makeDependencies<MyDependencies>({
|
||||
build: root => root
|
||||
.add({ '@sern/client': single(client) })
|
||||
.add({ '@sern/logger': single(new DefaultLogging()) })
|
||||
.add({ '@sern/client': single(() => client) })
|
||||
});
|
||||
|
||||
//View docs for all options
|
||||
@@ -83,29 +105,22 @@ Sern.init({
|
||||
commands: 'src/commands',
|
||||
// events: 'src/events' (optional),
|
||||
containerConfig : {
|
||||
get: useContainer
|
||||
get: useContainer
|
||||
}
|
||||
});
|
||||
|
||||
client.login(token);
|
||||
client.login("YOUR_BOT_TOKEN_HERE");
|
||||
```
|
||||
</details>
|
||||
|
||||
#### ` ping.js (CommonJS)`
|
||||
|
||||
```js
|
||||
const { CommandType, commandModule } = require('@sern/handler');
|
||||
|
||||
exports.default = commandModule({
|
||||
name: 'ping',
|
||||
description: 'A ping pong command',
|
||||
type: CommandType.Slash,
|
||||
execute(ctx) {
|
||||
ctx.reply('pong!');
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
See our [templates](https://github.com/sern-handler/templates) for TypeScript examples and more.
|
||||
## 🤖 Bots Using sern
|
||||
- [Community Bot](https://github.com/sern-handler/sern-community), the community bot for our [discord server](https://sern.dev/discord).
|
||||
- [Vinci](https://github.com/SrIzan10/vinci), the bot for Mara Turing.
|
||||
- [Bask](https://github.com/baskbotml/bask), Listen your favorite artists on Discord.
|
||||
- [ava](https://github.com/SrIzan10/ava), A discord bot that plays KNGI and Gensokyo Radio.
|
||||
- [Murayama](https://github.com/murayamabot/murayama), :pepega:
|
||||
- [Protector (WIP)](https://github.com/needhamgary/Protector), Just a simple bot to help enhance a private minecraft server.
|
||||
- [SmokinWeed 💨](https://github.com/Peter-MJ-Parker/sern-bud), A fun bot for a small - but growing - server.
|
||||
|
||||
## 💻 CLI
|
||||
|
||||
@@ -117,11 +132,6 @@ It is **highly encouraged** to use the [command line interface](https://github.c
|
||||
- [Support Server](https://sern.dev/discord)
|
||||
|
||||
## 👋 Contribute
|
||||
|
||||
- Read our contribution [guidelines](https://github.com/sern-handler/handler/blob/main/.github/CONTRIBUTING.md) carefully
|
||||
- Pull up on [issues](https://github.com/sern-handler/handler/issues) and report bugs
|
||||
- All kinds of contributions are welcomed.
|
||||
|
||||
## 🚈 Roadmap
|
||||
|
||||
You can check our [roadmap](https://github.com/sern-handler/roadmap) to see what's going to be added or patched in the future.
|
||||
|
||||
@@ -38,7 +38,7 @@ Omit.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:111](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L111)
|
||||
[src/types/module.ts:111](https://github.com/sern-handler/handler/blob/c1f6906/src/types/module.ts#L111)
|
||||
|
||||
___
|
||||
|
||||
@@ -52,4 +52,4 @@ Omit.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:110](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L110)
|
||||
[src/types/module.ts:110](https://github.com/sern-handler/handler/blob/c1f6906/src/types/module.ts#L110)
|
||||
|
||||
@@ -8,7 +8,7 @@ custom_edit_url: null
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
- `Module`
|
||||
|
||||
↳ **`BothCommand`**
|
||||
|
||||
@@ -20,7 +20,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:57](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L57)
|
||||
[src/types/core-modules.ts:124](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L124)
|
||||
|
||||
___
|
||||
|
||||
@@ -30,11 +30,11 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:58](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L58)
|
||||
[src/types/core-modules.ts:125](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L125)
|
||||
|
||||
___
|
||||
|
||||
@@ -59,11 +59,11 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:60](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L60)
|
||||
[src/types/core-modules.ts:127](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L127)
|
||||
|
||||
___
|
||||
|
||||
@@ -73,11 +73,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
@@ -87,21 +87,21 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### options
|
||||
|
||||
• `Optional` **options**: ([`SernSubCommandData`](SernSubCommandData.md) \| [`SernSubCommandGroupData`](SernSubCommandGroupData.md) \| [`BaseOptions`](../modules.md#baseoptions))[]
|
||||
• `Optional` **options**: [`SernOptionsData`](../modules.md#sernoptionsdata)[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:59](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L59)
|
||||
[src/types/core-modules.ts:126](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L126)
|
||||
|
||||
___
|
||||
|
||||
@@ -111,11 +111,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -125,8 +125,8 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:56](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L56)
|
||||
[src/types/core-modules.ts:123](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L123)
|
||||
|
||||
@@ -8,7 +8,7 @@ custom_edit_url: null
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
- `Module`
|
||||
|
||||
↳ **`ButtonCommand`**
|
||||
|
||||
@@ -20,11 +20,11 @@ custom_edit_url: null
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -48,11 +48,11 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:75](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L75)
|
||||
[src/types/core-modules.ts:64](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L64)
|
||||
|
||||
___
|
||||
|
||||
@@ -62,11 +62,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
@@ -76,11 +76,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -90,11 +90,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -104,8 +104,8 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:74](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L74)
|
||||
[src/types/core-modules.ts:63](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L63)
|
||||
|
||||
@@ -8,7 +8,7 @@ custom_edit_url: null
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
- `Module`
|
||||
|
||||
↳ **`ChannelSelectCommand`**
|
||||
|
||||
@@ -20,11 +20,11 @@ custom_edit_url: null
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -48,11 +48,11 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:85](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L85)
|
||||
[src/types/core-modules.ts:74](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L74)
|
||||
|
||||
___
|
||||
|
||||
@@ -62,11 +62,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
@@ -76,11 +76,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -90,11 +90,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -104,8 +104,8 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:84](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L84)
|
||||
[src/types/core-modules.ts:73](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L73)
|
||||
|
||||
127
docs/api/interfaces/CommandModuleDefs.md
Normal file
@@ -0,0 +1,127 @@
|
||||
---
|
||||
id: "CommandModuleDefs"
|
||||
title: "Interface: CommandModuleDefs"
|
||||
sidebar_label: "CommandModuleDefs"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### 1
|
||||
|
||||
• **1**: [`TextCommand`](TextCommand.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:149](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L149)
|
||||
|
||||
___
|
||||
|
||||
### 1024
|
||||
|
||||
• **1024**: [`ChannelSelectCommand`](ChannelSelectCommand.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:157](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L157)
|
||||
|
||||
___
|
||||
|
||||
### 128
|
||||
|
||||
• **128**: [`UserSelectCommand`](UserSelectCommand.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:159](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L159)
|
||||
|
||||
___
|
||||
|
||||
### 16
|
||||
|
||||
• **16**: [`ButtonCommand`](ButtonCommand.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:154](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L154)
|
||||
|
||||
___
|
||||
|
||||
### 2
|
||||
|
||||
• **2**: [`SlashCommand`](SlashCommand.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:150](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L150)
|
||||
|
||||
___
|
||||
|
||||
### 256
|
||||
|
||||
• **256**: [`RoleSelectCommand`](RoleSelectCommand.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:156](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L156)
|
||||
|
||||
___
|
||||
|
||||
### 3
|
||||
|
||||
• **3**: [`BothCommand`](BothCommand.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:151](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L151)
|
||||
|
||||
___
|
||||
|
||||
### 32
|
||||
|
||||
• **32**: [`StringSelectCommand`](StringSelectCommand.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:155](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L155)
|
||||
|
||||
___
|
||||
|
||||
### 4
|
||||
|
||||
• **4**: [`ContextMenuUser`](ContextMenuUser.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:153](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L153)
|
||||
|
||||
___
|
||||
|
||||
### 512
|
||||
|
||||
• **512**: [`MentionableSelectCommand`](MentionableSelectCommand.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:158](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L158)
|
||||
|
||||
___
|
||||
|
||||
### 64
|
||||
|
||||
• **64**: [`ModalSubmitCommand`](ModalSubmitCommand.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:160](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L160)
|
||||
|
||||
___
|
||||
|
||||
### 8
|
||||
|
||||
• **8**: [`ContextMenuMsg`](ContextMenuMsg.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:152](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L152)
|
||||
@@ -24,7 +24,7 @@ Use the newer helper functions and import { controller } from '@sern/handler'
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:51](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L51)
|
||||
[src/types/plugin.ts:51](https://github.com/sern-handler/handler/blob/c1f6906/src/types/plugin.ts#L51)
|
||||
|
||||
___
|
||||
|
||||
@@ -49,7 +49,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:53](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L53)
|
||||
[src/types/plugin.ts:53](https://github.com/sern-handler/handler/blob/c1f6906/src/types/plugin.ts#L53)
|
||||
|
||||
___
|
||||
|
||||
@@ -59,7 +59,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:50](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L50)
|
||||
[src/types/plugin.ts:50](https://github.com/sern-handler/handler/blob/c1f6906/src/types/plugin.ts#L50)
|
||||
|
||||
___
|
||||
|
||||
@@ -69,4 +69,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:52](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L52)
|
||||
[src/types/plugin.ts:52](https://github.com/sern-handler/handler/blob/c1f6906/src/types/plugin.ts#L52)
|
||||
|
||||
@@ -8,7 +8,7 @@ custom_edit_url: null
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
- `Module`
|
||||
|
||||
↳ **`ContextMenuMsg`**
|
||||
|
||||
@@ -20,11 +20,11 @@ custom_edit_url: null
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -48,11 +48,11 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:70](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L70)
|
||||
[src/types/core-modules.ts:59](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L59)
|
||||
|
||||
___
|
||||
|
||||
@@ -62,11 +62,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
@@ -76,11 +76,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -90,11 +90,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -104,8 +104,8 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:69](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L69)
|
||||
[src/types/core-modules.ts:58](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L58)
|
||||
|
||||
@@ -8,7 +8,7 @@ custom_edit_url: null
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
- `Module`
|
||||
|
||||
↳ **`ContextMenuUser`**
|
||||
|
||||
@@ -20,11 +20,11 @@ custom_edit_url: null
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -48,11 +48,11 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:65](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L65)
|
||||
[src/types/core-modules.ts:54](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L54)
|
||||
|
||||
___
|
||||
|
||||
@@ -62,11 +62,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
@@ -76,11 +76,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -90,11 +90,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -104,8 +104,8 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:64](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L64)
|
||||
[src/types/core-modules.ts:53](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L53)
|
||||
|
||||
@@ -20,7 +20,7 @@ custom_edit_url: null
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (...`args`): [`PluginResult`](../modules.md#pluginresult)
|
||||
▸ (`...args`): [`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
##### Parameters
|
||||
|
||||
@@ -34,14 +34,14 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:39](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L39)
|
||||
[src/types/core-plugin.ts:73](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L73)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Event`](../enums/PluginType.md#event)
|
||||
• **type**: [`Control`](../enums/PluginType.md#control)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L38)
|
||||
[src/types/core-plugin.ts:72](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L72)
|
||||
|
||||
@@ -22,7 +22,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:25](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L25)
|
||||
[src/types/core-plugin.ts:59](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L59)
|
||||
|
||||
___
|
||||
|
||||
@@ -40,4 +40,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:26](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L26)
|
||||
[src/types/core-plugin.ts:60](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L60)
|
||||
|
||||
115
docs/api/interfaces/CoreDependencies.md
Normal file
@@ -0,0 +1,115 @@
|
||||
---
|
||||
id: "CoreDependencies"
|
||||
title: "Interface: CoreDependencies"
|
||||
sidebar_label: "CoreDependencies"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### @sern/client
|
||||
|
||||
• **@sern/client**: () => [`Emitter`](Emitter.md)
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (): [`Emitter`](Emitter.md)
|
||||
|
||||
##### Returns
|
||||
|
||||
[`Emitter`](Emitter.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/ioc.ts:28](https://github.com/sern-handler/handler/blob/81cdde2/src/types/ioc.ts#L28)
|
||||
|
||||
___
|
||||
|
||||
### @sern/emitter
|
||||
|
||||
• **@sern/emitter**: () => [`Emitter`](Emitter.md)
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (): [`Emitter`](Emitter.md)
|
||||
|
||||
##### Returns
|
||||
|
||||
[`Emitter`](Emitter.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/ioc.ts:30](https://github.com/sern-handler/handler/blob/81cdde2/src/types/ioc.ts#L30)
|
||||
|
||||
___
|
||||
|
||||
### @sern/errors
|
||||
|
||||
• **@sern/errors**: () => [`ErrorHandling`](ErrorHandling.md)
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (): [`ErrorHandling`](ErrorHandling.md)
|
||||
|
||||
##### Returns
|
||||
|
||||
[`ErrorHandling`](ErrorHandling.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/ioc.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/ioc.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### @sern/logger
|
||||
|
||||
• `Optional` **@sern/logger**: () => [`Logging`](Logging.md)<`unknown`\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (): [`Logging`](Logging.md)<`unknown`\>
|
||||
|
||||
##### Returns
|
||||
|
||||
[`Logging`](Logging.md)<`unknown`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/ioc.ts:29](https://github.com/sern-handler/handler/blob/81cdde2/src/types/ioc.ts#L29)
|
||||
|
||||
___
|
||||
|
||||
### @sern/modules
|
||||
|
||||
• **@sern/modules**: () => [`ModuleManager`](ModuleManager.md)
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (): [`ModuleManager`](ModuleManager.md)
|
||||
|
||||
##### Returns
|
||||
|
||||
[`ModuleManager`](ModuleManager.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/ioc.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/ioc.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
### @sern/store
|
||||
|
||||
• **@sern/store**: () => [`CoreModuleStore`](CoreModuleStore.md)
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (): [`CoreModuleStore`](CoreModuleStore.md)
|
||||
|
||||
##### Returns
|
||||
|
||||
[`CoreModuleStore`](CoreModuleStore.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/ioc.ts:31](https://github.com/sern-handler/handler/blob/81cdde2/src/types/ioc.ts#L31)
|
||||
33
docs/api/interfaces/CoreModuleStore.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
id: "CoreModuleStore"
|
||||
title: "Interface: CoreModuleStore"
|
||||
sidebar_label: "CoreModuleStore"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Represents a core module store that stores IDs mapped to file paths.
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`ModuleStore`](../classes/ModuleStore.md)
|
||||
|
||||
## Properties
|
||||
|
||||
### commands
|
||||
|
||||
• **commands**: `Map`<`string`, `string`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/module-store.ts:7](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/module-store.ts#L7)
|
||||
|
||||
___
|
||||
|
||||
### metadata
|
||||
|
||||
• **metadata**: `WeakMap`<`Module`, `CommandMeta`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/module-store.ts:8](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/module-store.ts#L8)
|
||||
@@ -14,7 +14,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:40](https://github.com/sern-handler/handler/blob/33f1446/src/types/handler.ts#L40)
|
||||
[src/types/handler.ts:40](https://github.com/sern-handler/handler/blob/c1f6906/src/types/handler.ts#L40)
|
||||
|
||||
___
|
||||
|
||||
@@ -24,7 +24,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:42](https://github.com/sern-handler/handler/blob/33f1446/src/types/handler.ts#L42)
|
||||
[src/types/handler.ts:42](https://github.com/sern-handler/handler/blob/c1f6906/src/types/handler.ts#L42)
|
||||
|
||||
___
|
||||
|
||||
@@ -34,7 +34,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:45](https://github.com/sern-handler/handler/blob/33f1446/src/types/handler.ts#L45)
|
||||
[src/types/handler.ts:45](https://github.com/sern-handler/handler/blob/c1f6906/src/types/handler.ts#L45)
|
||||
|
||||
___
|
||||
|
||||
@@ -44,7 +44,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:41](https://github.com/sern-handler/handler/blob/33f1446/src/types/handler.ts#L41)
|
||||
[src/types/handler.ts:41](https://github.com/sern-handler/handler/blob/c1f6906/src/types/handler.ts#L41)
|
||||
|
||||
___
|
||||
|
||||
@@ -54,7 +54,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:44](https://github.com/sern-handler/handler/blob/33f1446/src/types/handler.ts#L44)
|
||||
[src/types/handler.ts:44](https://github.com/sern-handler/handler/blob/c1f6906/src/types/handler.ts#L44)
|
||||
|
||||
___
|
||||
|
||||
@@ -64,4 +64,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:43](https://github.com/sern-handler/handler/blob/33f1446/src/types/handler.ts#L43)
|
||||
[src/types/handler.ts:43](https://github.com/sern-handler/handler/blob/c1f6906/src/types/handler.ts#L43)
|
||||
|
||||
@@ -34,7 +34,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:68](https://github.com/sern-handler/handler/blob/33f1446/src/types/handler.ts#L68)
|
||||
[src/types/handler.ts:68](https://github.com/sern-handler/handler/blob/c1f6906/src/types/handler.ts#L68)
|
||||
|
||||
___
|
||||
|
||||
@@ -44,4 +44,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:67](https://github.com/sern-handler/handler/blob/33f1446/src/types/handler.ts#L67)
|
||||
[src/types/handler.ts:67](https://github.com/sern-handler/handler/blob/c1f6906/src/types/handler.ts#L67)
|
||||
|
||||
@@ -14,7 +14,7 @@ custom_edit_url: null
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
- `Module`
|
||||
|
||||
↳ **`DiscordEventCommand`**
|
||||
|
||||
@@ -26,11 +26,11 @@ custom_edit_url: null
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -40,11 +40,11 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:123](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L123)
|
||||
[src/types/core-modules.ts:105](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L105)
|
||||
|
||||
___
|
||||
|
||||
@@ -54,11 +54,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -68,11 +68,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -82,17 +82,17 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:124](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L124)
|
||||
[src/types/core-modules.ts:106](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L106)
|
||||
|
||||
## Methods
|
||||
|
||||
### execute
|
||||
|
||||
▸ **execute**(...`args`): `unknown`
|
||||
▸ **execute**(`...args`): `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -110,4 +110,4 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:125](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L125)
|
||||
[src/types/core-modules.ts:107](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L107)
|
||||
|
||||
70
docs/api/interfaces/Emitter.md
Normal file
@@ -0,0 +1,70 @@
|
||||
---
|
||||
id: "Emitter"
|
||||
title: "Interface: Emitter"
|
||||
sidebar_label: "Emitter"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Methods
|
||||
|
||||
### addListener
|
||||
|
||||
▸ **addListener**(`eventName`, `listener`): [`Emitter`](Emitter.md)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `eventName` | `string` \| `symbol` |
|
||||
| `listener` | `AnyFunction` |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Emitter`](Emitter.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/emitter.ts:4](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/emitter.ts#L4)
|
||||
|
||||
___
|
||||
|
||||
### emit
|
||||
|
||||
▸ **emit**(`eventName`, `...payload`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `eventName` | `string` \| `symbol` |
|
||||
| `...payload` | `any`[] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/emitter.ts:6](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/emitter.ts#L6)
|
||||
|
||||
___
|
||||
|
||||
### removeListener
|
||||
|
||||
▸ **removeListener**(`eventName`, `listener`): [`Emitter`](Emitter.md)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `eventName` | `string` \| `symbol` |
|
||||
| `listener` | `AnyFunction` |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Emitter`](Emitter.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/emitter.ts:5](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/emitter.ts#L5)
|
||||
@@ -6,6 +6,10 @@ sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
**`Since`**
|
||||
|
||||
2.0.0
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`DefaultErrorHandling`](../classes/DefaultErrorHandling.md)
|
||||
@@ -20,21 +24,23 @@ Number of times the process should throw an error until crashing and exiting
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:8](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/errorHandling.ts#L8)
|
||||
[src/core/contracts/error-handling.ts:8](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/error-handling.ts#L8)
|
||||
|
||||
## Methods
|
||||
|
||||
### crash
|
||||
|
||||
▸ **crash**(`error`): `never`
|
||||
▸ **crash**(`err`): `never`
|
||||
|
||||
Utility function to crash
|
||||
**`Deprecated`**
|
||||
|
||||
Version 4 will remove this method
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `error` | `Error` |
|
||||
| `err` | `Error` |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -42,7 +48,7 @@ Utility function to crash
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:14](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/errorHandling.ts#L14)
|
||||
[src/core/contracts/error-handling.ts:14](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/error-handling.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
@@ -50,7 +56,8 @@ ___
|
||||
|
||||
▸ **updateAlive**(`error`): `void`
|
||||
|
||||
A function that is called on every crash. Updates keepAlive
|
||||
A function that is called on every crash. Updates keepAlive.
|
||||
If keepAlive is 0, the process crashes.
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -64,4 +71,4 @@ A function that is called on every crash. Updates keepAlive
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:20](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/errorHandling.ts#L20)
|
||||
[src/core/contracts/error-handling.ts:20](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/error-handling.ts#L20)
|
||||
|
||||
37
docs/api/interfaces/EventModuleDefs.md
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
id: "EventModuleDefs"
|
||||
title: "Interface: EventModuleDefs"
|
||||
sidebar_label: "EventModuleDefs"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### 1
|
||||
|
||||
• **1**: [`DiscordEventCommand`](DiscordEventCommand.md)<keyof `ClientEvents`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:165](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L165)
|
||||
|
||||
___
|
||||
|
||||
### 2
|
||||
|
||||
• **2**: [`SernEventCommand`](SernEventCommand.md)<keyof [`SernEventsMapping`](SernEventsMapping.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:164](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L164)
|
||||
|
||||
___
|
||||
|
||||
### 3
|
||||
|
||||
• **3**: [`ExternalEventCommand`](ExternalEventCommand.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:166](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L166)
|
||||
@@ -24,7 +24,7 @@ Use the newer helper functions
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:61](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L61)
|
||||
[src/types/plugin.ts:64](https://github.com/sern-handler/handler/blob/c1f6906/src/types/plugin.ts#L64)
|
||||
|
||||
___
|
||||
|
||||
@@ -49,7 +49,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:63](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L63)
|
||||
[src/types/plugin.ts:66](https://github.com/sern-handler/handler/blob/c1f6906/src/types/plugin.ts#L66)
|
||||
|
||||
___
|
||||
|
||||
@@ -59,7 +59,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:60](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L60)
|
||||
[src/types/plugin.ts:63](https://github.com/sern-handler/handler/blob/c1f6906/src/types/plugin.ts#L63)
|
||||
|
||||
___
|
||||
|
||||
@@ -69,4 +69,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:62](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L62)
|
||||
[src/types/plugin.ts:65](https://github.com/sern-handler/handler/blob/c1f6906/src/types/plugin.ts#L65)
|
||||
|
||||
@@ -8,7 +8,7 @@ custom_edit_url: null
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
- `Module`
|
||||
|
||||
↳ **`ExternalEventCommand`**
|
||||
|
||||
@@ -20,21 +20,21 @@ custom_edit_url: null
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### emitter
|
||||
|
||||
• **emitter**: `string`
|
||||
• **emitter**: keyof `Dependencies`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:130](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L130)
|
||||
[src/types/core-modules.ts:47](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L47)
|
||||
|
||||
___
|
||||
|
||||
@@ -44,11 +44,11 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:129](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L129)
|
||||
[src/types/core-modules.ts:46](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L46)
|
||||
|
||||
___
|
||||
|
||||
@@ -58,11 +58,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -72,11 +72,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -86,17 +86,17 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:131](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L131)
|
||||
[src/types/core-modules.ts:48](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L48)
|
||||
|
||||
## Methods
|
||||
|
||||
### execute
|
||||
|
||||
▸ **execute**(...`args`): `unknown`
|
||||
▸ **execute**(`...args`): `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -114,4 +114,4 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:132](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L132)
|
||||
[src/types/core-modules.ts:49](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L49)
|
||||
|
||||
24
docs/api/interfaces/Init.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
id: "Init"
|
||||
title: "Interface: Init"
|
||||
sidebar_label: "Init"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Represents an initialization contract.
|
||||
Let dependencies implement this to initiate some logic.
|
||||
|
||||
## Methods
|
||||
|
||||
### init
|
||||
|
||||
▸ **init**(): `unknown`
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/init.ts:8](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/init.ts#L8)
|
||||
@@ -20,7 +20,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/args.ts:106](https://github.com/sern-handler/handler/blob/33f1446/src/handler/plugins/args.ts#L106)
|
||||
[src/handler/plugins/args.ts:107](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/plugins/args.ts#L107)
|
||||
|
||||
___
|
||||
|
||||
@@ -30,4 +30,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/args.ts:105](https://github.com/sern-handler/handler/blob/33f1446/src/handler/plugins/args.ts#L105)
|
||||
[src/handler/plugins/args.ts:106](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/plugins/args.ts#L106)
|
||||
|
||||
@@ -20,7 +20,7 @@ custom_edit_url: null
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (...`args`): [`PluginResult`](../modules.md#pluginresult)
|
||||
▸ (`...args`): [`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
##### Parameters
|
||||
|
||||
@@ -34,7 +34,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L35)
|
||||
[src/types/core-plugin.ts:69](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L69)
|
||||
|
||||
___
|
||||
|
||||
@@ -44,4 +44,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:34](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L34)
|
||||
[src/types/core-plugin.ts:68](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L68)
|
||||
|
||||
@@ -6,6 +6,10 @@ sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
**`Since`**
|
||||
|
||||
2.0.0
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
@@ -34,7 +38,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:7](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L7)
|
||||
[src/core/contracts/logging.ts:8](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/logging.ts#L8)
|
||||
|
||||
___
|
||||
|
||||
@@ -54,7 +58,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:4](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L4)
|
||||
[src/core/contracts/logging.ts:5](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/logging.ts#L5)
|
||||
|
||||
___
|
||||
|
||||
@@ -74,7 +78,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:6](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L6)
|
||||
[src/core/contracts/logging.ts:7](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/logging.ts#L7)
|
||||
|
||||
___
|
||||
|
||||
@@ -94,4 +98,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:5](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L5)
|
||||
[src/core/contracts/logging.ts:6](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/logging.ts#L6)
|
||||
|
||||
@@ -8,7 +8,7 @@ custom_edit_url: null
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
- `Module`
|
||||
|
||||
↳ **`MentionableSelectCommand`**
|
||||
|
||||
@@ -20,11 +20,11 @@ custom_edit_url: null
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -48,11 +48,11 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:95](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L95)
|
||||
[src/types/core-modules.ts:84](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L84)
|
||||
|
||||
___
|
||||
|
||||
@@ -62,11 +62,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
@@ -76,11 +76,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -90,11 +90,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -104,8 +104,8 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:94](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L94)
|
||||
[src/types/core-modules.ts:83](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L83)
|
||||
|
||||
@@ -8,7 +8,7 @@ custom_edit_url: null
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
- `Module`
|
||||
|
||||
↳ **`ModalSubmitCommand`**
|
||||
|
||||
@@ -20,11 +20,11 @@ custom_edit_url: null
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -48,11 +48,11 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:105](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L105)
|
||||
[src/types/core-modules.ts:94](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L94)
|
||||
|
||||
___
|
||||
|
||||
@@ -62,11 +62,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
@@ -76,11 +76,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -90,11 +90,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -104,8 +104,8 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:104](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L104)
|
||||
[src/types/core-modules.ts:93](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L93)
|
||||
|
||||
@@ -48,7 +48,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/c1f6906/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
@@ -72,7 +72,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:39](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L39)
|
||||
[src/types/module.ts:39](https://github.com/sern-handler/handler/blob/c1f6906/src/types/module.ts#L39)
|
||||
|
||||
___
|
||||
|
||||
@@ -82,7 +82,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/c1f6906/src/types/module.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -92,7 +92,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/c1f6906/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
@@ -102,7 +102,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/c1f6906/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
@@ -112,4 +112,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:34](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L34)
|
||||
[src/types/module.ts:34](https://github.com/sern-handler/handler/blob/c1f6906/src/types/module.ts#L34)
|
||||
|
||||
@@ -6,6 +6,10 @@ sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
**`Since`**
|
||||
|
||||
2.0.0
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`DefaultModuleManager`](../classes/DefaultModuleManager.md)
|
||||
@@ -14,7 +18,27 @@ custom_edit_url: null
|
||||
|
||||
### get
|
||||
|
||||
▸ **get**<`T`\>(`strat`): `undefined` \| [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]
|
||||
▸ **get**(`id`): `undefined` \| `string`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `id` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/module-manager.ts:13](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/module-manager.ts#L13)
|
||||
|
||||
___
|
||||
|
||||
### getByNameCommandType
|
||||
|
||||
▸ **getByNameCommandType**<`T`\>(`name`, `commandType`): `undefined` \| `Promise`<[`CommandModuleDefs`](CommandModuleDefs.md)[`T`]\>
|
||||
|
||||
#### Type parameters
|
||||
|
||||
@@ -26,27 +50,63 @@ custom_edit_url: null
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `strat` | (`ms`: [`ModuleStore`](../classes/ModuleStore.md)) => `undefined` \| [`Processed`](../modules.md#processed)<[`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]\> |
|
||||
| `name` | `string` |
|
||||
| `commandType` | `T` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]
|
||||
`undefined` \| `Promise`<[`CommandModuleDefs`](CommandModuleDefs.md)[`T`]\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/moduleManager.ts:6](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/moduleManager.ts#L6)
|
||||
[src/core/contracts/module-manager.ts:18](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/module-manager.ts#L18)
|
||||
|
||||
___
|
||||
|
||||
### set
|
||||
### getMetadata
|
||||
|
||||
▸ **set**(`strat`): `void`
|
||||
▸ **getMetadata**(`m`): `undefined` \| `CommandMeta`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `strat` | (`ms`: [`ModuleStore`](../classes/ModuleStore.md)) => `void` |
|
||||
| `m` | `Module` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| `CommandMeta`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/module-manager.ts:14](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/module-manager.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
### getPublishableCommands
|
||||
|
||||
▸ **getPublishableCommands**(): `Promise`<[`CommandModule`](../modules.md#commandmodule)[]\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`CommandModule`](../modules.md#commandmodule)[]\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/module-manager.ts:17](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/module-manager.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
### set
|
||||
|
||||
▸ **set**(`id`, `path`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `id` | `string` |
|
||||
| `path` | `string` |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -54,4 +114,25 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/moduleManager.ts:9](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/moduleManager.ts#L9)
|
||||
[src/core/contracts/module-manager.ts:16](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/module-manager.ts#L16)
|
||||
|
||||
___
|
||||
|
||||
### setMetadata
|
||||
|
||||
▸ **setMetadata**(`m`, `c`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `m` | `Module` |
|
||||
| `c` | `CommandMeta` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/module-manager.ts:15](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/module-manager.ts#L15)
|
||||
|
||||
@@ -20,7 +20,7 @@ custom_edit_url: null
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (...`args`): [`PluginResult`](../modules.md#pluginresult)
|
||||
▸ (`...args`): [`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
##### Parameters
|
||||
|
||||
@@ -34,7 +34,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:30](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L30)
|
||||
[src/types/core-plugin.ts:64](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L64)
|
||||
|
||||
___
|
||||
|
||||
@@ -44,4 +44,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:29](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L29)
|
||||
[src/types/core-plugin.ts:63](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L63)
|
||||
|
||||
@@ -8,7 +8,7 @@ custom_edit_url: null
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
- `Module`
|
||||
|
||||
↳ **`RoleSelectCommand`**
|
||||
|
||||
@@ -20,11 +20,11 @@ custom_edit_url: null
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -48,11 +48,11 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:90](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L90)
|
||||
[src/types/core-modules.ts:79](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L79)
|
||||
|
||||
___
|
||||
|
||||
@@ -62,11 +62,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
@@ -76,11 +76,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -90,11 +90,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -104,8 +104,8 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:89](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L89)
|
||||
[src/types/core-modules.ts:78](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L78)
|
||||
|
||||
@@ -20,17 +20,17 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:177](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L177)
|
||||
[src/types/core-modules.ts:171](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L171)
|
||||
|
||||
___
|
||||
|
||||
### command
|
||||
|
||||
• **command**: [`AutocompleteCommand`](AutocompleteCommand.md)
|
||||
• **command**: `AutocompleteCommand`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:182](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L182)
|
||||
[src/types/core-modules.ts:176](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L176)
|
||||
|
||||
___
|
||||
|
||||
@@ -44,7 +44,7 @@ Omit.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4200
|
||||
node_modules/discord.js/typings/index.d.ts:4301
|
||||
|
||||
___
|
||||
|
||||
@@ -58,7 +58,7 @@ Omit.descriptionLocalizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4201
|
||||
node_modules/discord.js/typings/index.d.ts:4302
|
||||
|
||||
___
|
||||
|
||||
@@ -72,7 +72,7 @@ Omit.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4198
|
||||
node_modules/discord.js/typings/index.d.ts:4299
|
||||
|
||||
___
|
||||
|
||||
@@ -86,7 +86,7 @@ Omit.nameLocalizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4199
|
||||
node_modules/discord.js/typings/index.d.ts:4300
|
||||
|
||||
___
|
||||
|
||||
@@ -100,7 +100,7 @@ Omit.required
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4202
|
||||
node_modules/discord.js/typings/index.d.ts:4303
|
||||
|
||||
___
|
||||
|
||||
@@ -110,4 +110,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:178](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L178)
|
||||
[src/types/core-modules.ts:172](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L172)
|
||||
|
||||
@@ -10,11 +10,11 @@ custom_edit_url: null
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends keyof [`SernEventsMapping`](../modules.md#serneventsmapping) = keyof [`SernEventsMapping`](../modules.md#serneventsmapping) |
|
||||
| `T` | extends keyof [`SernEventsMapping`](SernEventsMapping.md) = keyof [`SernEventsMapping`](SernEventsMapping.md) |
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
- `Module`
|
||||
|
||||
↳ **`SernEventCommand`**
|
||||
|
||||
@@ -26,11 +26,11 @@ custom_edit_url: null
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -40,11 +40,11 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:116](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L116)
|
||||
[src/types/core-modules.ts:41](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L41)
|
||||
|
||||
___
|
||||
|
||||
@@ -54,11 +54,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -68,11 +68,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -82,23 +82,23 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:117](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L117)
|
||||
[src/types/core-modules.ts:42](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L42)
|
||||
|
||||
## Methods
|
||||
|
||||
### execute
|
||||
|
||||
▸ **execute**(...`args`): `unknown`
|
||||
▸ **execute**(`...args`): `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...args` | [`SernEventsMapping`](../modules.md#serneventsmapping)[`T`] |
|
||||
| `...args` | [`SernEventsMapping`](SernEventsMapping.md)[`T`] |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -110,4 +110,4 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:118](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L118)
|
||||
[src/types/core-modules.ts:43](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L43)
|
||||
|
||||
57
docs/api/interfaces/SernEventsMapping.md
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
id: "SernEventsMapping"
|
||||
title: "Interface: SernEventsMapping"
|
||||
sidebar_label: "SernEventsMapping"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### error
|
||||
|
||||
• **error**: [[`Payload`](../modules.md#payload)]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/utility.ts:21](https://github.com/sern-handler/handler/blob/81cdde2/src/types/utility.ts#L21)
|
||||
|
||||
___
|
||||
|
||||
### module.activate
|
||||
|
||||
• **module.activate**: [[`Payload`](../modules.md#payload)]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/utility.ts:20](https://github.com/sern-handler/handler/blob/81cdde2/src/types/utility.ts#L20)
|
||||
|
||||
___
|
||||
|
||||
### module.register
|
||||
|
||||
• **module.register**: [[`Payload`](../modules.md#payload)]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/utility.ts:19](https://github.com/sern-handler/handler/blob/81cdde2/src/types/utility.ts#L19)
|
||||
|
||||
___
|
||||
|
||||
### modulesLoaded
|
||||
|
||||
• **modulesLoaded**: [undefined?]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/utility.ts:23](https://github.com/sern-handler/handler/blob/81cdde2/src/types/utility.ts#L23)
|
||||
|
||||
___
|
||||
|
||||
### warning
|
||||
|
||||
• **warning**: [[`Payload`](../modules.md#payload)]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/utility.ts:22](https://github.com/sern-handler/handler/blob/81cdde2/src/types/utility.ts#L22)
|
||||
@@ -8,51 +8,37 @@ custom_edit_url: null
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- `BaseApplicationCommandOptionsData`
|
||||
- `APIApplicationCommandOptionBase`<`ApplicationCommandOptionType.Subcommand`\>
|
||||
|
||||
↳ **`SernSubCommandData`**
|
||||
|
||||
## Properties
|
||||
|
||||
### autocomplete
|
||||
|
||||
• `Optional` **autocomplete**: `undefined`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.autocomplete
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4203
|
||||
|
||||
___
|
||||
|
||||
### description
|
||||
|
||||
• **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.description
|
||||
APIApplicationCommandOptionBase.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4200
|
||||
node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts:7
|
||||
|
||||
___
|
||||
|
||||
### descriptionLocalizations
|
||||
### description\_localizations
|
||||
|
||||
• `Optional` **descriptionLocalizations**: `Partial`<`Record`<``"id"`` \| ``"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`\>\>
|
||||
• `Optional` **description\_localizations**: ``null`` \| `Partial`<`Record`<``"id"`` \| ``"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
|
||||
APIApplicationCommandOptionBase.description\_localizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4201
|
||||
node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts:8
|
||||
|
||||
___
|
||||
|
||||
@@ -62,49 +48,49 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.name
|
||||
APIApplicationCommandOptionBase.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4198
|
||||
node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts:5
|
||||
|
||||
___
|
||||
|
||||
### nameLocalizations
|
||||
### name\_localizations
|
||||
|
||||
• `Optional` **nameLocalizations**: `Partial`<`Record`<``"id"`` \| ``"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`\>\>
|
||||
• `Optional` **name\_localizations**: ``null`` \| `Partial`<`Record`<``"id"`` \| ``"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
|
||||
APIApplicationCommandOptionBase.name\_localizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4199
|
||||
node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts:6
|
||||
|
||||
___
|
||||
|
||||
### options
|
||||
|
||||
• `Optional` **options**: [`BaseOptions`](../modules.md#baseoptions)[]
|
||||
• `Optional` **options**: [`SernOptionsData`](../modules.md#sernoptionsdata)[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:214](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L214)
|
||||
[src/types/core-modules.ts:208](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L208)
|
||||
|
||||
___
|
||||
|
||||
### required
|
||||
|
||||
• `Optional` **required**: `undefined`
|
||||
• `Optional` **required**: `boolean`
|
||||
|
||||
#### Overrides
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.required
|
||||
APIApplicationCommandOptionBase.required
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:213](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L213)
|
||||
node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts:9
|
||||
|
||||
___
|
||||
|
||||
@@ -112,6 +98,10 @@ ___
|
||||
|
||||
• **type**: `Subcommand`
|
||||
|
||||
#### Overrides
|
||||
|
||||
APIApplicationCommandOptionBase.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:212](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L212)
|
||||
[src/types/core-modules.ts:207](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L207)
|
||||
|
||||
@@ -24,7 +24,7 @@ BaseApplicationCommandOptionsData.autocomplete
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4203
|
||||
node_modules/discord.js/typings/index.d.ts:4304
|
||||
|
||||
___
|
||||
|
||||
@@ -38,7 +38,7 @@ BaseApplicationCommandOptionsData.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4200
|
||||
node_modules/discord.js/typings/index.d.ts:4301
|
||||
|
||||
___
|
||||
|
||||
@@ -52,7 +52,7 @@ BaseApplicationCommandOptionsData.descriptionLocalizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4201
|
||||
node_modules/discord.js/typings/index.d.ts:4302
|
||||
|
||||
___
|
||||
|
||||
@@ -66,7 +66,7 @@ BaseApplicationCommandOptionsData.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4198
|
||||
node_modules/discord.js/typings/index.d.ts:4299
|
||||
|
||||
___
|
||||
|
||||
@@ -80,7 +80,7 @@ BaseApplicationCommandOptionsData.nameLocalizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4199
|
||||
node_modules/discord.js/typings/index.d.ts:4300
|
||||
|
||||
___
|
||||
|
||||
@@ -90,21 +90,21 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:220](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L220)
|
||||
[src/types/core-modules.ts:213](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L213)
|
||||
|
||||
___
|
||||
|
||||
### required
|
||||
|
||||
• `Optional` **required**: `undefined`
|
||||
• `Optional` **required**: `boolean`
|
||||
|
||||
#### Overrides
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.required
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:219](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L219)
|
||||
node_modules/discord.js/typings/index.d.ts:4303
|
||||
|
||||
___
|
||||
|
||||
@@ -114,4 +114,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:218](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L218)
|
||||
[src/types/core-modules.ts:212](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L212)
|
||||
|
||||
@@ -8,7 +8,7 @@ custom_edit_url: null
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
- `Module`
|
||||
|
||||
↳ **`SlashCommand`**
|
||||
|
||||
@@ -20,11 +20,11 @@ custom_edit_url: null
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:50](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L50)
|
||||
[src/types/core-modules.ts:117](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L117)
|
||||
|
||||
___
|
||||
|
||||
@@ -49,11 +49,11 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:52](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L52)
|
||||
[src/types/core-modules.ts:119](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L119)
|
||||
|
||||
___
|
||||
|
||||
@@ -63,11 +63,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
@@ -77,21 +77,21 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### options
|
||||
|
||||
• `Optional` **options**: ([`SernSubCommandData`](SernSubCommandData.md) \| [`SernSubCommandGroupData`](SernSubCommandGroupData.md) \| [`BaseOptions`](../modules.md#baseoptions))[]
|
||||
• `Optional` **options**: [`SernOptionsData`](../modules.md#sernoptionsdata)[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:51](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L51)
|
||||
[src/types/core-modules.ts:118](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L118)
|
||||
|
||||
___
|
||||
|
||||
@@ -101,11 +101,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -115,8 +115,8 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:49](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L49)
|
||||
[src/types/core-modules.ts:116](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L116)
|
||||
|
||||
@@ -8,7 +8,7 @@ custom_edit_url: null
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
- `Module`
|
||||
|
||||
↳ **`StringSelectCommand`**
|
||||
|
||||
@@ -20,11 +20,11 @@ custom_edit_url: null
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -48,11 +48,11 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:80](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L80)
|
||||
[src/types/core-modules.ts:69](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L69)
|
||||
|
||||
___
|
||||
|
||||
@@ -62,11 +62,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
@@ -76,11 +76,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -90,11 +90,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -104,8 +104,8 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:79](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L79)
|
||||
[src/types/core-modules.ts:68](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L68)
|
||||
|
||||
@@ -8,7 +8,7 @@ custom_edit_url: null
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
- `Module`
|
||||
|
||||
↳ **`TextCommand`**
|
||||
|
||||
@@ -20,7 +20,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:44](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L44)
|
||||
[src/types/core-modules.ts:111](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L111)
|
||||
|
||||
___
|
||||
|
||||
@@ -30,11 +30,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -59,11 +59,11 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:45](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L45)
|
||||
[src/types/core-modules.ts:112](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L112)
|
||||
|
||||
___
|
||||
|
||||
@@ -73,11 +73,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
@@ -87,11 +87,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -101,11 +101,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -115,8 +115,8 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:43](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L43)
|
||||
[src/types/core-modules.ts:110](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L110)
|
||||
|
||||
@@ -8,7 +8,7 @@ custom_edit_url: null
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
- `Module`
|
||||
|
||||
↳ **`UserSelectCommand`**
|
||||
|
||||
@@ -20,11 +20,11 @@ custom_edit_url: null
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -48,11 +48,11 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:100](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L100)
|
||||
[src/types/core-modules.ts:89](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L89)
|
||||
|
||||
___
|
||||
|
||||
@@ -62,11 +62,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
@@ -76,11 +76,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -90,11 +90,11 @@ ___
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -104,8 +104,8 @@ ___
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:99](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L99)
|
||||
[src/types/core-modules.ts:88](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L88)
|
||||
|
||||
@@ -6,50 +6,60 @@ sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
An object to be passed into Sern#init() function.
|
||||
|
||||
## Properties
|
||||
|
||||
### commands
|
||||
|
||||
• `Readonly` **commands**: `string`
|
||||
• **commands**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/wrapper.ts:9](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/wrapper.ts#L9)
|
||||
[src/types/core.ts:8](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core.ts#L8)
|
||||
|
||||
___
|
||||
|
||||
### containerConfig
|
||||
|
||||
• `Readonly` **containerConfig**: `Object`
|
||||
• `Optional` **containerConfig**: `Object`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `get` | (...`keys`: keyof [`Dependencies`](Dependencies.md)[]) => `unknown`[] |
|
||||
| `get` | (...`keys`: keyof `Dependencies`[]) => `unknown`[] |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/wrapper.ts:11](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/wrapper.ts#L11)
|
||||
[src/types/core.ts:18](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core.ts#L18)
|
||||
|
||||
___
|
||||
|
||||
### defaultPrefix
|
||||
|
||||
• `Optional` `Readonly` **defaultPrefix**: `string`
|
||||
• `Optional` **defaultPrefix**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/wrapper.ts:8](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/wrapper.ts#L8)
|
||||
[src/types/core.ts:9](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core.ts#L9)
|
||||
|
||||
___
|
||||
|
||||
### events
|
||||
|
||||
• `Optional` `Readonly` **events**: `string`
|
||||
• `Optional` **events**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/wrapper.ts:10](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/wrapper.ts#L10)
|
||||
[src/types/core.ts:10](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core.ts#L10)
|
||||
|
||||
___
|
||||
|
||||
### mode
|
||||
|
||||
• `Optional` **mode**: ``"DEV"`` \| ``"PROD"``
|
||||
|
||||
Overload to enable mode in case developer does not use a .env file.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core.ts:14](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core.ts#L14)
|
||||
|
||||
@@ -6,66 +6,52 @@ sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## References
|
||||
|
||||
### CommandExecutable
|
||||
|
||||
Re-exports [CommandExecutable](../classes/CommandExecutable.md)
|
||||
|
||||
___
|
||||
|
||||
### EventExecutable
|
||||
|
||||
Re-exports [EventExecutable](../classes/EventExecutable.md)
|
||||
|
||||
___
|
||||
|
||||
### commandModule
|
||||
|
||||
Re-exports [commandModule](../modules.md#commandmodule-1)
|
||||
|
||||
___
|
||||
## Variables
|
||||
|
||||
### controller
|
||||
|
||||
Re-exports [controller](../modules.md#controller)
|
||||
• `Const` **controller**: `Object`
|
||||
|
||||
___
|
||||
**`Since`**
|
||||
|
||||
### discordEvent
|
||||
1.0.0
|
||||
The object passed into every plugin to control a command's behavior
|
||||
|
||||
Re-exports [discordEvent](../modules.md#discordevent)
|
||||
#### Type declaration
|
||||
|
||||
___
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `next` | () => `OkImpl`<`void`\> |
|
||||
| `stop` | () => `ErrImpl`<`void`\> |
|
||||
|
||||
### eventModule
|
||||
#### Defined in
|
||||
|
||||
Re-exports [eventModule](../modules.md#eventmodule-1)
|
||||
[src/sern.ts:72](https://github.com/sern-handler/handler/blob/81cdde2/src/sern.ts#L72)
|
||||
|
||||
## Functions
|
||||
|
||||
### init
|
||||
|
||||
▸ **init**(`wrapper`): `void`
|
||||
▸ **init**(`maybeWrapper`): `void`
|
||||
|
||||
**`Since`**
|
||||
|
||||
1.0.0
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts title="src/index.ts"
|
||||
Sern.init({
|
||||
defaultPrefix: '!',
|
||||
commands: 'dist/commands',
|
||||
events: 'dist/events',
|
||||
containerConfig : {
|
||||
get: useContainer
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `wrapper` | [`Wrapper`](../interfaces/Wrapper.md) | Options to pass into sern. Function to start the handler up |
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `maybeWrapper` | [`Wrapper`](../interfaces/Wrapper.md) \| ``"file"`` |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -73,48 +59,4 @@ Sern.init({
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:38](https://github.com/sern-handler/handler/blob/33f1446/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` | [`DependencyConfiguration`](../interfaces/DependencyConfiguration.md)<`T`\> | a configuration for creating your project dependencies |
|
||||
|
||||
#### 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:107](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sern.ts#L107)
|
||||
[src/sern.ts:24](https://github.com/sern-handler/handler/blob/81cdde2/src/sern.ts#L24)
|
||||
|
||||
@@ -4,6 +4,9 @@ Welcome to our official guide. This guide will go through all the core features
|
||||
- 💖 Thank you for choosing sern to be your framework!
|
||||
|
||||
- Teaching the discord.js library and / or Javascript / Typescript is out of scope of this project, so the documentation assumes you already know these elements.
|
||||
- [discord.js](https://discord.js.org/#/)
|
||||
- [javascript](https://nodejs.dev/en/learn/)
|
||||
- [typescript](https://www.typescriptlang.org/docs/)
|
||||
|
||||
- discord.js v14 is the only supported library at the moment
|
||||
|
||||
@@ -12,11 +15,13 @@ Welcome to our official guide. This guide will go through all the core features
|
||||
* How to use sern with the [CLI](walkthrough/cli.md)
|
||||
* [Your first command](walkthrough/first-command.md)
|
||||
* [The Context class](walkthrough/first-command.md#context-class)
|
||||
|
||||
* [Autocomplete](walkthrough/autocomplete.md)
|
||||
* [Services](walkthrough/services.md)
|
||||
* [dependency injection](walkthrough/dependency-injection.md)
|
||||
### Working with plugins
|
||||
* [Plugins](walkthrough/plugins.md)
|
||||
- [Command Plugins](walkthrough/plugins.md#command-plugins)
|
||||
- [Event Plugins](walkthrough/plugins.md#event-plugins)
|
||||
- [Init Plugins](walkthrough/plugins.md#command-plugins)
|
||||
- [Control Plugins](walkthrough/plugins.md#event-plugins)
|
||||
### Events
|
||||
* [The SernEmitter class](walkthrough/sern-emitter.md)
|
||||
* [Your first event](walkthrough/first-event.md)
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# Choosing an IDE
|
||||
|
||||
Choosing an IDE is a matter of personal preference. The following are some
|
||||
Choosing an IDE is a matter of personal preference. They make programming easier. The following are some
|
||||
suggestions for choosing an IDE:
|
||||
|
||||
* [Visual Studio Code](https://code.visualstudio.com)
|
||||
* we have an [snippet extension](https://marketplace.visualstudio.com/items?itemName=SrIzan.sern-snippets) to help automate development :)
|
||||
* [Sublime Text](https://www.sublimetext.com/)
|
||||
* [NotePad++](https://notepad-plus-plus.org/)
|
||||
* [nvim](https://neovim.io/) (chad)
|
||||
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
|
||||
# Preparing to Code
|
||||
|
||||
After installing and IDE you need to install node.
|
||||
After installing an IDE, you need to install node.
|
||||
|
||||
[Click to download the LTS version of node right here](https://nodejs.org/en/download/).
|
||||
|
||||
After you downloaded node, you can start using us
|
||||
After you downloaded node you will need:
|
||||
|
||||
Running this will install our CLI, which allows you to create a template project without writing a single line of code.
|
||||
```shell
|
||||
npm install -g @sern/cli
|
||||
```
|
||||
#### [Discord token](https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token)
|
||||
|
||||
|
||||
If you want to do more with our CLI, continue reading our guides.
|
||||
CONTINUE 🤓
|
||||
|
||||
|
||||
45
docs/guide/walkthrough/autocomplete.md
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
sidebar_position: 7
|
||||
---
|
||||
|
||||
# Autocomplete
|
||||
|
||||
|
||||
Autocomplete is a special interaction where it can happen on multiple options on a single command. We've handled this with a simple
|
||||
tree search algorithm in a nested options tree.
|
||||
|
||||
## Example
|
||||
|
||||
```ts title="src/commands/cheese.ts" {11-18}
|
||||
export default commandModule({
|
||||
type: CommandType.Slash,
|
||||
description: "show me cheese",
|
||||
options: [
|
||||
{
|
||||
name: "list",
|
||||
type: ApplicationCommandOptionType.String,
|
||||
description: "pick a cheese to show",
|
||||
required: true,
|
||||
autocomplete: true,
|
||||
command: {
|
||||
onEvent: [],
|
||||
execute: (ctx) => {
|
||||
const focus = ctx.options.getFocused();
|
||||
ctx.respond(['gouda', 'parmesan', 'harvati']
|
||||
.map((cheese) => ({ name: cheese, value: cheese })));
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
execute: (ctx, [, args]) => {
|
||||
const cheese = args.getString('list', true);
|
||||
ctx.reply('selected cheese');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
```
|
||||
|
||||
Sern will handle autocomplete interactions at arbitrary depths and subcommand levels.
|
||||
|
||||
|
||||
@@ -5,25 +5,23 @@ sidebar_position: 2
|
||||
# CLI
|
||||
|
||||
Setting up the [CLI](https://github.com/sern-handler/cli) is easy. <br />
|
||||
- To start a brand-new project, run :
|
||||
The cli is your plug to the sern ecosystem. This will allow you to install plugins with ease, install extra utilities, and much more.
|
||||
If you haven't yet:
|
||||
```sh
|
||||
sern init (-y)
|
||||
npm install -g @sern/cli
|
||||
```
|
||||
|
||||
:::tip
|
||||
It creates a directory for you so you don't need to!
|
||||
:::
|
||||
|
||||
Include the `-y` flag if you want to set up defaults. The default langauge is [Typescript](https://www.typescriptlang.org/) <br />
|
||||
|
||||
- To install [plugins](plugins.md) maintained by the community [repository](https://github.com/sern-handler/awesome-plugins),
|
||||
|
||||
```
|
||||
sern plugins
|
||||
```
|
||||
:::info
|
||||
Make sure to have a correct [sern.config.json](./good-to-know.md#sernconfigjson)
|
||||
:::
|
||||
|
||||
This will display a menu selection of all installable plugins. <br />
|
||||
|
||||
**Note**: You must have a [sern.config.json](good-to-know.md) to use this command.
|
||||
If you want to view plugins, visit the repository linked above.
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
---
|
||||
sidebar_position: 8
|
||||
sidebar_position: 9
|
||||
---
|
||||
|
||||
# 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://sern.dev/discord), and we'll be glad to answer your questions.
|
||||
[community server](https://sern.dev/discord), and we'll be glad to answer your questions.
|
||||
|
||||

|
||||
|
||||
|
||||
107
docs/guide/walkthrough/dependency-injection.md
Normal file
@@ -0,0 +1,107 @@
|
||||
---
|
||||
sidebar_position: 7
|
||||
---
|
||||
:::warning
|
||||
This contains version 2 code. Please view [transitioning to v3](../transition)
|
||||
:::
|
||||
|
||||
Since version 2.0.0, dependency injection, thanks to [iti](https://github.com/molszanski/iti), is a feature to customize your bot's utilities and structures.
|
||||
|
||||
Minimal setup for any project.
|
||||
|
||||
```ts
|
||||
const client = new Client({
|
||||
...options
|
||||
})
|
||||
Sern.makeDependencies<MyDependencies>({
|
||||
build: root =>
|
||||
root.add({
|
||||
'@sern/client': single(() => client)
|
||||
})
|
||||
})
|
||||
|
||||
```
|
||||
For any typescript project, you'll need to add an interface to get intellisense and typings.
|
||||
```typescript
|
||||
interface MyDependencies extends Dependencies {
|
||||
'@sern/client': Singleton<Client>
|
||||
}
|
||||
```
|
||||
Full Dependency Injection setup
|
||||
```typescript
|
||||
const client = new Client({
|
||||
...options
|
||||
})
|
||||
|
||||
interface MyDependencies extends Dependencies {
|
||||
'@sern/client': Singleton<Client>
|
||||
}
|
||||
|
||||
export const useContainer = Sern.makeDependencies<MyDependencies>({
|
||||
build: root =>
|
||||
root.add({
|
||||
'@sern/client': single(() => client)
|
||||
})
|
||||
})
|
||||
|
||||
```
|
||||
Everything else is handled. However, you may want customize things.
|
||||
|
||||
## Adding dependencies to root
|
||||
Each sern built dependency must implement its contracts.
|
||||
- `@sern/logger`: Log data. [Logging](../../api/interfaces/Logging)
|
||||
- `@sern/errors`: Handling errors and lifetime. [ErrorHandling](../../api/interfaces/ErrorHandling)
|
||||
- `@sern/modules`: Managing all command modules. [ModuleManager](../../api/interfaces/ModuleManager)
|
||||
- `@sern/emitter`: is the key to emit events and occurences in a project. [SernEmitter](../../api/classes/SernEmitter)
|
||||
|
||||
|
||||
You may also add disposers so that when the application crashes, the targeted dependency calls that function.
|
||||
|
||||
```typescript
|
||||
export const useContainer = Sern.makeDependencies<MyDependencies>({
|
||||
build: root =>
|
||||
root.add({
|
||||
'@sern/client': single(() => client)
|
||||
})
|
||||
.addDisposer({ '@sern/client': client => client.destroy() })
|
||||
})
|
||||
|
||||
```
|
||||
|
||||
:::tip
|
||||
Below is v3 api.
|
||||
:::
|
||||
|
||||
## Init
|
||||
Do you need to perform intializing behavor for a dependency?
|
||||
|
||||
```ts
|
||||
import { Init } from '@sern/handler';
|
||||
class Database implements Init {
|
||||
init() {
|
||||
await this.connect()
|
||||
console.log('Connected');
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Modify you Dependencies interface:
|
||||
```ts title="src/dependencies.d.ts"
|
||||
import type { Initializable } from '@sern/handler'
|
||||
|
||||
interface Dependencies extends CoreDependencies {
|
||||
database: Initializable<Database>
|
||||
}
|
||||
|
||||
```
|
||||
Make sure its been added:
|
||||
```ts title="src/index.ts"
|
||||
await makeDependencies({
|
||||
build: root => root
|
||||
.add({ database => new Database() })
|
||||
})
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,41 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# First Command
|
||||
|
||||
We will dissect a basic command.
|
||||
If you installed a new project via the cli, This is the `ping` command located in src/commands folder.
|
||||
|
||||
Typescript
|
||||
```typescript
|
||||
:::tip
|
||||
TLDR: command modules are discord bot commands. There are many types, and each one will correspond to an event from discord.
|
||||
For example, CommandType.Slash commands will listen to slash command interactions.
|
||||
:::
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="js" label="JavaScript">
|
||||
|
||||
```js
|
||||
const { CommandType, commandModule } = require('@sern/handler');
|
||||
|
||||
export default commandModule({
|
||||
type: CommandType.Both,
|
||||
plugins: [],
|
||||
description: 'A ping command',
|
||||
// alias : [],
|
||||
execute: async (ctx, args) => {
|
||||
await ctx.reply('Pong 🏓');
|
||||
},
|
||||
})
|
||||
```
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="ts" label="Typescript">
|
||||
|
||||
```ts
|
||||
import { commandModule, CommandType } from '@sern/handler';
|
||||
|
||||
export default commandModule({
|
||||
@@ -19,21 +47,14 @@ export default commandModule({
|
||||
await ctx.reply({ content: 'Pong 🏓' });
|
||||
},
|
||||
});
|
||||
```
|
||||
Javascript
|
||||
```javascript
|
||||
const { CommandType, commandModule } = require('@sern/handler');
|
||||
|
||||
exports.default = commandModule({
|
||||
type: CommandType.Both,
|
||||
plugins: [],
|
||||
description: 'A ping command',
|
||||
// alias : [],
|
||||
execute: async (ctx, args) => {
|
||||
await ctx.reply('Pong 🏓');
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
|
||||
</Tabs>
|
||||
|
||||
|
||||
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 />
|
||||
@@ -43,7 +64,27 @@ All the command types can be found in the [official documentation](https://sern.
|
||||
**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.
|
||||
<br />
|
||||
|
||||
Typescript:
|
||||
<Tabs>
|
||||
<TabItem value="js" label="JavaScript">
|
||||
|
||||
```javascript
|
||||
const { CommandType, commandModule } = require('@sern/handler');
|
||||
exports.default = commandModule({
|
||||
name: 'dm-me',
|
||||
type: CommandType.Modal,
|
||||
async execute (modal) {
|
||||
const value = modal.fields.getTextInputValue('message');
|
||||
modal.client.users.fetch('182326315813306368').then( u =>
|
||||
u.send(value + ` from ${modal.user}`)
|
||||
);
|
||||
modal.reply( { ephemeral:true, content: 'Sent' })
|
||||
}
|
||||
});
|
||||
```
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="ts" label="Typescript">
|
||||
|
||||
```typescript
|
||||
import { commandModule, CommandType } from '@sern/handler';
|
||||
export default commandModule({
|
||||
@@ -58,21 +99,12 @@ export default commandModule({
|
||||
}
|
||||
});
|
||||
```
|
||||
Javascript:
|
||||
```javascript
|
||||
const { CommandType, commandModule } = require('@sern/handler');
|
||||
exports.default = commandModule({
|
||||
name: 'dm-me',
|
||||
type: CommandType.Modal,
|
||||
async execute (modal) {
|
||||
const value = modal.fields.getTextInputValue('message');
|
||||
modal.client.users.fetch('182326315813306368').then( u =>
|
||||
u.send(value + ` from ${modal.user}`)
|
||||
);
|
||||
modal.reply( { ephemeral:true, content: 'Sent' })
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
|
||||
</Tabs>
|
||||
|
||||
|
||||
Commands are straight forward. Keep in mind, every other property on the commandModule object is
|
||||
optional **except** the type and execute function.
|
||||
|
||||
@@ -85,31 +117,4 @@ The Context class is passed into modules with type:
|
||||
- `CommandType.Text`
|
||||
|
||||
This data structure helps interop between legacy commands and slash commands with ease.
|
||||
:::note
|
||||
View the [docs](../../api/classes/Context.md)
|
||||
:::
|
||||
|
||||
Typescript:
|
||||
```typescript
|
||||
export default commandModule({
|
||||
name: 'ping',
|
||||
type: CommandType.Both,
|
||||
async execute(ctx: Context) {
|
||||
await ctx.reply(`pong ${ctx.user}`)
|
||||
// .reply is shared between both message and interaction!
|
||||
// So is an User object!
|
||||
}
|
||||
});
|
||||
```
|
||||
Javascript:
|
||||
```javascript
|
||||
exports.default = commandModule({
|
||||
name: 'ping',
|
||||
type: CommandType.Both,
|
||||
async execute(ctx) { //ctx is a Context instance
|
||||
await ctx.reply(`pong ${ctx.user}`)
|
||||
// .reply is shared between both message and interaction!
|
||||
// So is an User object!
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
@@ -1,63 +1,76 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
# First Event Module
|
||||
We will dissect a basic event module. <br />
|
||||
Typescript:
|
||||
```typescript
|
||||
export default eventModule({
|
||||
type: EventType.Sern,
|
||||
plugins : [], //NOT SUPPORTED YET!!
|
||||
name: 'module.activate', //name of event.
|
||||
execute(event) {
|
||||
console.log(event);
|
||||
}
|
||||
})
|
||||
```
|
||||
Javascript:
|
||||
|
||||
:::tip
|
||||
TLDR: event modules are event listeners. there are three types EventType.Discord, EventType.Sern, EventType.External
|
||||
:::
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="js" label="JavaScript">
|
||||
|
||||
```javascript
|
||||
exports.default = eventModule({
|
||||
type: EventType.Sern,
|
||||
plugins : [], //NOT SUPPORTED YET!!
|
||||
plugins : [],
|
||||
name: 'module.activate',
|
||||
execute(event) {
|
||||
console.log(event);
|
||||
}
|
||||
})
|
||||
```
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="ts" label="Typescript">
|
||||
|
||||
```typescript
|
||||
export default eventModule({
|
||||
type: EventType.Sern,
|
||||
plugins : [],
|
||||
name: 'module.activate', //name of event.
|
||||
execute(event) {
|
||||
console.log(event);
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
|
||||
</Tabs>
|
||||
|
||||
Like command modules, the `type` property denotes what kind of event it is, which
|
||||
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.dev/docs/api/enums/EventType).
|
||||
|
||||
<br />
|
||||
Event modules are laid out similarly to command modules. These listen to any and all event you provide.
|
||||
In the current version 1.1.0-beta, plugins are not supported.
|
||||
## External
|
||||
|
||||
### Another example of an event module
|
||||
In version 2 & 3, any dependency that you have passed into makeDependencies can be registered here as well.
|
||||
|
||||
Typescript:
|
||||
```typescript
|
||||
export default eventModule({
|
||||
type: EventType.Discord,
|
||||
plugins : [],
|
||||
name: 'guildMemberAdd', //name of event.
|
||||
async execute(member: GuildMember) {
|
||||
(await member.guild.channels.fetch('channel-id') as TextChannel).send(`Welcome, ${member}`);
|
||||
}
|
||||
```ts title="src/index.ts"
|
||||
await makeDependencies({
|
||||
build: root => root.add({
|
||||
eventlistener: single(() => new EventEmitter())
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
Javascript:
|
||||
```javascript
|
||||
```ts title="events/myevent.ts"
|
||||
export default eventModule({
|
||||
type: EventType.External,
|
||||
emitter: 'eventlistener',
|
||||
execute: (args) => {
|
||||
console.log('Got event from eventlistener: ', args);
|
||||
}
|
||||
|
||||
exports.default = eventModule({
|
||||
type: EventType.Discord,
|
||||
plugins : [], //NOT SUPPORTED YET!!
|
||||
name: 'guildMemberAdd', //name of event.
|
||||
async execute(member) {
|
||||
(await member.guild.channels.fetch('channel-id')).send(`Welcome, ${member}`);
|
||||
}
|
||||
})
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -2,8 +2,50 @@
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Goal
|
||||
|
||||
sern strives to be minimalist, but with all batteries included. Meaning, this framework provides the necessary tools
|
||||
to start up a bot in minutes, and leaves plenty room space to customize your experience and create an amazing project.
|
||||
It should include all the tools for any bot at any scale.
|
||||
|
||||
# Goal
|
||||
|
||||
This walkthrough will be written in [TypeScript](https://www.typescriptlang.org/) but will have JavaScript snippets throughout.
|
||||
|
||||
# Make robust, modular, bots
|
||||
|
||||
- *Modularity*: sern is built with modularity in mind. You can swap pieces and parts easily.
|
||||
- *Familiar*: commands and structures are similar to classic v12 handlers and the official discord.js command handler guide, while packing many features
|
||||
- *Concise*: Too much code is a liability. with sern, write less for more 🤯
|
||||
|
||||
|
||||
### Using @sapphire/framework
|
||||
```ts title="commands/ping.ts" showLineNumbers
|
||||
import { Command } from '@sapphire/framework'
|
||||
import type { CommandInteraction } from 'discord.js'
|
||||
|
||||
export class PingCommand extends Command {
|
||||
public constructor(context: Command.Context) {
|
||||
super(context, {
|
||||
description: 'Pong!',
|
||||
chatInputCommand: {
|
||||
register: true,
|
||||
},
|
||||
})
|
||||
}
|
||||
public async chatInputRun(interaction: CommandInteraction) {
|
||||
await interaction.reply('Pong!')
|
||||
}
|
||||
}
|
||||
```
|
||||
### Using @sern/handler
|
||||
```ts title="commands/ping.ts" showLineNumbers
|
||||
import { commandModule, CommandType } from '@sern/handler'
|
||||
import { publish } from '../plugins';
|
||||
|
||||
export default commandModule({
|
||||
type: CommandType.Both,
|
||||
plugins: [publish()],
|
||||
description: 'Pong!',
|
||||
execute: (ctx, args) => {
|
||||
await ctx.reply('Pong!')
|
||||
}
|
||||
})
|
||||
```
|
||||
Keep in mind the above example acts as both a slash command AND text command
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 7
|
||||
sidebar_position: 9
|
||||
---
|
||||
|
||||
# Good to know
|
||||
@@ -21,4 +21,4 @@ Or, if this is a brand-new project, `sern init` automatically installs it.
|
||||
"commands": "commands"
|
||||
}
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
24
docs/guide/walkthrough/new-project.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Create a new project
|
||||
|
||||
```sh
|
||||
npm install -g @sern/cli
|
||||
```
|
||||
Running this will install our CLI. (you'll probably want to download this)
|
||||
- helps manage your applications
|
||||
- plugs you into the sern ecosystem.
|
||||
|
||||
|
||||
|
||||
### Create a new bot
|
||||
|
||||
```sh
|
||||
npm create @sern/bot
|
||||
```
|
||||
and follow the interactive prompts.
|
||||
|
||||
if somehow you need help, feel free to ask [here](https://sern.dev.discord)
|
||||
|
||||
@@ -1,59 +1,45 @@
|
||||
---
|
||||
sidebar_position: 5
|
||||
sidebar_position: 6
|
||||
---
|
||||
|
||||
# Plugins
|
||||
|
||||
<p>As of now, modules seem a little underwhelming. It appears that sern doesn't have all the features of a standard handler,
|
||||
which manages permissions, categorizes, cool-downs, publishes application commands, role permissions, etc.</p>
|
||||
:::tip
|
||||
TLDR: Plugins help reduce code repetition and are installable via `sern plugins`. Put them onto the plugins field of a command/event module.
|
||||
:::
|
||||
|
||||
## Installing
|
||||
Chances are, you just want your bot to work. Plugins can preprocess and create reusable conditions for modules.
|
||||
|
||||
<p>Many important parts that manage access and help streamline command creation to make are apparently absent.
|
||||
Below is an example of an event plugin, one of the types of plugins.</p>
|
||||
|
||||
Typescript:
|
||||
```typescript
|
||||
export function serenOnly(): EventPlugin<CommandType.Both> {
|
||||
return {
|
||||
type: PluginType.Event,
|
||||
async execute([ctx, args], controller) {
|
||||
if (ctx.user.id !== "182326315813306368") {
|
||||
await ctx.reply({content: "You cannot use this command"})
|
||||
return controller.stop()
|
||||
}
|
||||
return controller.next();
|
||||
}
|
||||
}
|
||||
}
|
||||
run:
|
||||
```sh
|
||||
sern plugins
|
||||
```
|
||||
Javascript:
|
||||
```javascript
|
||||
export function serenOnly() {
|
||||
return {
|
||||
type: PluginType.Event,
|
||||
async execute([ctx, args], controller) {
|
||||
if (ctx.user.id !== "182326315813306368") {
|
||||
await ctx.reply({content: "You cannot use this command"})
|
||||
return controller.stop()
|
||||
}
|
||||
return controller.next();
|
||||
}
|
||||
- Install your favorite(s) (or the ones that look the coolest). In my imaginary mind, I installed the ownerOnly plugin.
|
||||
- This should install in `plugins` directory in `src`.
|
||||
- Some plugins only work with specific types. Most are targeted towards slash / both modules.
|
||||
- Add to your module.
|
||||
|
||||
```ts
|
||||
import { commandModule, CommandType } from '@sern/handler'
|
||||
import { ownerOnly } from '../plugins'
|
||||
|
||||
export default commandModule({
|
||||
type: CommandType.Both,
|
||||
plugins: [ownerOnly(['182326315813306368')],
|
||||
description: 'ping command',
|
||||
execute: (ctx) => {
|
||||
ctx.reply('hello, owner');
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
```
|
||||
#### ┗|`O′|┛ perfect, your first plugin!
|
||||
|
||||
<br /> As part of our extensibility, the plugins feature make sern just as powerful, if not more powerful than
|
||||
standard handlers.
|
||||
Plugins modify and add new behavior to standard modules, extending customizability and implementing automation.
|
||||
## Creating your own plugins
|
||||
|
||||
<br /> At the moment, there are two types of plugins:
|
||||
The controller determines in plugins whether to continue or fail.
|
||||
|
||||
- Command Plugins
|
||||
- Event Plugins
|
||||
|
||||
## 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.
|
||||
### The controller object
|
||||
```typescript
|
||||
export interface Controller {
|
||||
@@ -61,90 +47,38 @@ export interface Controller {
|
||||
stop: () => Err<void>;
|
||||
}
|
||||
```
|
||||
## Init Plugins
|
||||
Init plugins modify how commands are loaded or do preprocessing.
|
||||
An instance of the above object is passed into every plugin. <br />
|
||||
This controls whether a module is stored into sern. <br />
|
||||
Typescript:
|
||||
|
||||
```typescript
|
||||
export function inDir(dir : string) : CommandPlugin<CommandType.Both> {
|
||||
return {
|
||||
type: PluginType.Command,
|
||||
async execute(wrapper, { absPath, module }, controller) {
|
||||
if(path.dirname(absPath) !== dir) {
|
||||
console.log(+new Date(), `${module.name} is not in the correct directory!`);
|
||||
return controller.stop()
|
||||
}
|
||||
console.log(+new Date(), `${module.name} is in the correct directory!`);
|
||||
return controller.next(); //continue
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
Javascript:
|
||||
```javascript
|
||||
export function inDir(dir : string) {
|
||||
return {
|
||||
type: PluginType.Command,
|
||||
async execute(wrapper, { absPath, module }, controller) {
|
||||
if(path.dirname(absPath) !== dir) {
|
||||
import { CommandInitPlugin } from '@sern/handler'
|
||||
import path from 'path'
|
||||
export const inDir = (dir: string) => {
|
||||
return CommandInitPlugin(({ module, absPath }) => {
|
||||
if(path.dirname(absPath) !== dir) {
|
||||
console.log(+new Date(), `${module.name} is not in the correct directory!`);
|
||||
return controller.stop()
|
||||
}
|
||||
console.log(+new Date(), `${module.name} is in the correct directory!`);
|
||||
return controller.next(); //continue
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(+new Date(), `${module.name} is in the correct directory!`);
|
||||
return controller.next(); //continue
|
||||
});
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Above, this simple plugin logs that the module has been loaded along with a timestamp. <br />
|
||||
Again, it is up to **you** to define plugin logic! The possibilities to customize your bots are endless.
|
||||
:::tip
|
||||
Command Plugins are good for ensuring the shape, location, and preprocessing of your commands.
|
||||
:::
|
||||
|
||||
## Event Plugins
|
||||
 <br />
|
||||
 <br />
|
||||
- An event is emitted by discord.js.
|
||||
- This event is passed to all plugins (**in order!!**),
|
||||
- If all are successful,
|
||||
|
||||
The command is executed. Calling `controller.stop()` notifies sern that this command should not be run,
|
||||
and this event is ignored.
|
||||
and command is ignored.
|
||||
|
||||
<p>So, what does a command module look like with plugins?</p>
|
||||
|
||||
Typescript:
|
||||
```typescript
|
||||
import { commandModule, CommandType } from '@sern/handler';
|
||||
|
||||
export default commandModule({
|
||||
type: CommandType.Both,
|
||||
plugins: [
|
||||
inDir("other"),
|
||||
serenOnly()
|
||||
],
|
||||
description: 'A ping command',
|
||||
//alias : [],
|
||||
execute: async (ctx, args) => {
|
||||
await ctx.reply({ content: 'Pong 🏓' });
|
||||
},
|
||||
});
|
||||
```
|
||||
Javascript:
|
||||
```typescript
|
||||
const { commandModule, CommandType } = require('@sern/handler');
|
||||
|
||||
exports.default = commandModule({
|
||||
type: CommandType.Both,
|
||||
plugins: [
|
||||
inDir("other"),
|
||||
serenOnly() //The plugins in this section applied to this module!
|
||||
],
|
||||
description: 'A ping command',
|
||||
//alias : [],
|
||||
execute: async (ctx, args) => {
|
||||
await ctx.reply({ content: 'Pong 🏓' });
|
||||
},
|
||||
});
|
||||
```
|
||||
Can you predict the behavior of this command?
|
||||
|
||||
- Before loading into sern, this command module will check if this module is in the correct directory `other`.
|
||||
@@ -154,4 +88,4 @@ Can you predict the behavior of this command?
|
||||
Event Plugins are good for filtering, preconditions, parsing.
|
||||
:::
|
||||
|
||||
If all plugins return `controller.next()`, this command replies `Pong 🏓`
|
||||
If all plugins return `controller.next()`, this command replies `Pong 🏓`
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
sidebar_position: 6
|
||||
sidebar_position: 8
|
||||
---
|
||||
|
||||
# The SernEmitter class
|
||||
@@ -11,4 +11,4 @@ You're shipped with the SernEmitter. This EventEmitter listens to
|
||||
- `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.dev/docs/api/modules#serneventsmapping">events</a>
|
||||
<br/>View all <a href="https://sern.dev/docs/api/modules#serneventsmapping">events</a>
|
||||
|
||||
63
docs/guide/walkthrough/services.md
Normal file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
sidebar_position: 6
|
||||
---
|
||||
|
||||
:::tip
|
||||
This is version 3 api only!!
|
||||
:::
|
||||
|
||||
# Services
|
||||
|
||||
:::tip
|
||||
TLDR: The direct upgrade to useContainer. if you set up a bot with create-bot, check dependencies.d.ts.
|
||||
Dependencies are the types that Services uses.
|
||||
:::
|
||||
|
||||
You need someway to use dependencies in your command module. Services to the rescue!
|
||||
```ts title="src/dependencies.d.ts"
|
||||
import { CoreDependencies, Singleton } from '@sern/handler'
|
||||
import { Client } from 'discord.js'
|
||||
|
||||
interface Dependencies extends CoreDependencies {
|
||||
'@sern/client': Singleton<Client>
|
||||
}
|
||||
|
||||
```
|
||||
Recall, some keys in Dependencies are special.
|
||||
|
||||
> Special key dependency must implement its contracts.
|
||||
> - `@sern/client`: Your discord client. -> [Emitter](../../api/interfaces/Emitter)
|
||||
> - `@sern/logger`: Log data -> [Logging](../../api/interfaces/Logging)
|
||||
> - `@sern/errors`: Handling errors and lifetime -> [ErrorHandling](../../api/interfaces/ErrorHandling)
|
||||
> - `@sern/modules`: Managing all command modules -> [ModuleManager](../../api/interfaces/ModuleManager)
|
||||
> - `@sern/emitter`: is the key to emit events and occurences in a project -> [Emitter](../../api/interfaces/Emitter)
|
||||
|
||||
|
||||
Lets try to access the client you provided.
|
||||
|
||||
```ts title="src/commands/ping.ts"
|
||||
import { Service } from '@sern/handler'
|
||||
|
||||
export default commandModule({
|
||||
// ...
|
||||
execute: (ctx) => {
|
||||
//Client!
|
||||
const client = Service('@sern/client');
|
||||
}
|
||||
//
|
||||
})
|
||||
|
||||
```
|
||||
## Safety
|
||||
- Services can only be used after sern has made dependencies.
|
||||
- Calling a service before will crash your application.
|
||||
- Services can be safely used outside of commandModules.
|
||||
- Be careful to not cause too many side effects.
|
||||
|
||||
|
||||
## Related api
|
||||
- use `Service` for single dependency.
|
||||
- use `Services` for multiple dependencies.
|
||||
|
||||
|
||||
|
||||
40
docs/guide/walkthrough/transition.md
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
|
||||
# transition from v2 to v3
|
||||
|
||||
```diff title="src/index.ts"
|
||||
- Sern.makeDependencies({ build: () => {} })
|
||||
+ await makeDependencies({ build: () => {} })
|
||||
```
|
||||
|
||||
v3 comes with the new [Service api](../walkthrough/services). To make sure to enable intellisense
|
||||
include a dependencies.d.ts file into compilation. [Click here for all new features](../../../blog/3.0.0)
|
||||
```ts
|
||||
/**
|
||||
* This file serves as intellisense for sern projects.
|
||||
* Types are declared here for dependencies to function properly
|
||||
* Service(s) api rely on this file to provide a better developer experience.
|
||||
*/
|
||||
|
||||
import { SernEmitter, Logging, CoreModuleStore, ModuleManager, ErrorHandling, CoreDependencies, Singleton } from '@sern/handler'
|
||||
import { Client } from 'discord.js'
|
||||
|
||||
declare global {
|
||||
interface Dependencies extends CoreDependencies {
|
||||
'@sern/client': Singleton<Client>
|
||||
}
|
||||
}
|
||||
|
||||
export {}
|
||||
|
||||
```
|
||||
|
||||
A standard project file tree: <br />
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,12 @@ sidebar_position: 0
|
||||
|
||||
# Welcome!
|
||||
|
||||
:::warning
|
||||
Please read the [transition](./transition) page if you are moving from version 2 to version 3.
|
||||
:::
|
||||
|
||||
## Content
|
||||
- [transition](../docs/guide/walkthrough/transition.md) for current users to transition bots to version 3.
|
||||
- [/docs/api](../docs/api) contains autogenerated documentation of our codebase using [typedoc](https://typedoc.org/)
|
||||
- [/docs/guide](../docs/guide) contains a basic startup guide and details to get started with sern faster!
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ const darkCodeTheme = require('prism-react-renderer/themes/oceanicNext');
|
||||
const config = {
|
||||
title: 'sern - Handlers. Redefined.',
|
||||
tagline: 'With the support of the community made plugins and a powerful CLI, it\'s more than just a handler.',
|
||||
url: 'https://sern-handler.js.org',
|
||||
url: 'https://sern.dev',
|
||||
baseUrl: '/',
|
||||
onBrokenLinks: 'ignore',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
@@ -28,7 +28,6 @@ const config = {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en', 'fr', 'tr'],
|
||||
},
|
||||
|
||||
presets: [
|
||||
[
|
||||
'classic',
|
||||
@@ -36,8 +35,6 @@ const config = {
|
||||
({
|
||||
docs: {
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
// Please change this to your repo.
|
||||
// Remove this to remove the "edit this page" links.
|
||||
editUrl:
|
||||
'https://github.com/sern-handler/website/edit/main/',
|
||||
},
|
||||
@@ -69,6 +66,23 @@ const config = {
|
||||
themeConfig:
|
||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||
({
|
||||
image: 'https://sern.dev/img/logo.png',
|
||||
algolia: {
|
||||
appId: 'AA9S5J9NYT',
|
||||
apiKey: 'ccfe6abc4d12ac6f882565a9d0caafb1',
|
||||
indexName: 'sern',
|
||||
insights: true,
|
||||
container: 'div',
|
||||
debug: false,
|
||||
contextualSearch: true,
|
||||
externalUrlRegex: 'external\\.com|domain\\.com',
|
||||
replaceSearchResultPathname: {
|
||||
from: '/docs/api',
|
||||
to: '/docs/api',
|
||||
},
|
||||
searchParameters: {},
|
||||
searchPagePath: 'search',
|
||||
},
|
||||
navbar: {
|
||||
title: 'Home',
|
||||
logo: {
|
||||
@@ -142,33 +156,35 @@ const config = {
|
||||
},
|
||||
metadata : [
|
||||
{ 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:description', content: 'A modular, customizable, fast Discord.js framework to streamline bot development' },
|
||||
{ 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' },
|
||||
{ property: 'og:image:alt', content: 'sernlogo' },
|
||||
{ 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:description', content: 'A modular, customizable, fast Discord.js framework to streamline bot development' },
|
||||
{ name: 'keywords', content: 'discord, bot, handler, framework, documentation, sern'},
|
||||
{ name: 'twitter:image', content: 'https://sern.dev/img/logo.png' },
|
||||
{ name: 'twitter:url', content: 'https://sern.dev' },
|
||||
{ name: 'theme-color', content: '#cb547c' }
|
||||
{ property: 'og:image:height', content: '512' },
|
||||
{ property: 'og:image:width', content: '1024' },
|
||||
{ name: 'theme-color', content: '#F25186' }
|
||||
],
|
||||
prism: {
|
||||
theme: lightCodeTheme,
|
||||
darkTheme: darkCodeTheme,
|
||||
},
|
||||
}),
|
||||
// plugins : [
|
||||
// [
|
||||
// 'docusaurus-plugin-typedoc',
|
||||
// {
|
||||
// //if you're editing website, please change this to your local branch of sern to generate documentation
|
||||
// entryPoints: ['../sernHandlerV2/src/index.ts'],
|
||||
// tsconfig: '../sernHandlerV2/tsconfig-esm.json',
|
||||
// },
|
||||
// ]
|
||||
// ]
|
||||
// plugins : [
|
||||
// [
|
||||
// 'docusaurus-plugin-typedoc',
|
||||
// {
|
||||
// //if you're editing website, please change this to your local branch of sern to generate documentation
|
||||
// entryPoints: ['../sernHandlerV2/src/index.ts'],
|
||||
// tsconfig: '../sernHandlerV2/tsconfig.json',
|
||||
// },
|
||||
// ]
|
||||
// ]
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
|
||||
9959
package-lock.json
generated
16
package.json
@@ -14,13 +14,13 @@
|
||||
"serve": "docusaurus serve",
|
||||
"write-translations": "docusaurus write-translations",
|
||||
"write-heading-ids": "docusaurus write-heading-ids",
|
||||
"typedoc-json": "typedoc --json ../sern-community/docs.json --pretty --entryPoints ../sernHandlerV2/src/index.ts --tsconfig ../sernHandlerV2/tsconfig-esm.json --excludeExternals"
|
||||
"typedoc-json": "typedoc --json ../sern-community/docs.json --pretty --entryPoints ../sernHandlerV2/src/index.ts --tsconfig ../sernHandlerV2/tsconfig.json --excludeExternals"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "2.0.0-rc.1",
|
||||
"@docusaurus/plugin-content-pages": "^2.0.1",
|
||||
"@docusaurus/preset-classic": "2.0.0-rc.1",
|
||||
"@docusaurus/theme-search-algolia": "^2.0.0-rc.1",
|
||||
"@docusaurus/core": "^2.4.0",
|
||||
"@docusaurus/plugin-content-pages": "^2.4.0",
|
||||
"@docusaurus/preset-classic": "^2.4.0",
|
||||
"@docusaurus/theme-search-algolia": "^2.4.0",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"clsx": "^1.2.1",
|
||||
"jsdoc-parse-plus": "^1.3.0",
|
||||
@@ -30,9 +30,9 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "2.0.0-rc.1",
|
||||
"docusaurus-plugin-typedoc": "^0.17.5",
|
||||
"typedoc": "^0.23.8",
|
||||
"typedoc-plugin-markdown": "^3.13.4"
|
||||
"docusaurus-plugin-typedoc": "latest",
|
||||
"typedoc": "latest",
|
||||
"typedoc-plugin-markdown": "latest"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
|
||||
@@ -4,36 +4,36 @@ import styles from './styles.module.css';
|
||||
|
||||
const FeatureList = [
|
||||
{
|
||||
title: 'Batteries included',
|
||||
Svg: require('@site/static/img/battery-svgrepo-com.svg').default,
|
||||
title: 'Modular',
|
||||
|
||||
Svg: require('@site/static/img/bricks-svgrepo-com.svg').default,
|
||||
description: (
|
||||
<>
|
||||
Start or integrate a new project in minutes.
|
||||
Take apart, build, or customize code with ease to create robust bots.
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: 'Customizable',
|
||||
Svg: require('@site/static/img/puzzle-svgrepo-com.svg').default,
|
||||
title: 'Concise',
|
||||
Svg: require('@site/static/img/pencil-svgrepo-com.svg').default,
|
||||
description: (
|
||||
<>
|
||||
Extend or customize with community-based plugins to provide utilities, filters, and more.
|
||||
Commands are significantly smaller than other competitors.
|
||||
Write impactful, concise code.
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: 'Modern',
|
||||
Svg: require('@site/static/img/typescript-svgrepo-com.svg').default,
|
||||
title: 'Familiar',
|
||||
Svg: require('@site/static/img/fire-com.svg').default,
|
||||
description: (
|
||||
<>
|
||||
Uses modern and powerful tooling such as
|
||||
<a href={'https://swc.rs/'}> swc</a>,
|
||||
<a href={'https://tsup.egoist.dev/'}> tsup</a>,
|
||||
<a href={'https://www.typescriptlang.org/'}> typescript</a>, and
|
||||
<a href={'https://rxjs.dev/'}> rxjs</a> to future-proof and ensure project quality.
|
||||
Code like a traditional command handler. Although not exactly the same, the api is easy to learn
|
||||
and resembles classic v12 command handlers.
|
||||
</>
|
||||
),
|
||||
},
|
||||
|
||||
];
|
||||
|
||||
function Feature({Svg, title, description}) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
.features {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -6,20 +6,21 @@
|
||||
|
||||
/* You can override the default Infima variables here. */
|
||||
:root {
|
||||
--ifm-color-primary: #3d2d5e;
|
||||
--ifm-color-primary: #ae2a55;
|
||||
--ifm-color-primary-dark: #372955;
|
||||
--ifm-color-primary-darker: #342650;
|
||||
/* darker is secondary color in material */
|
||||
--ifm-color-primary-darker: #385ca9;
|
||||
--ifm-color-primary-darkest: #2b2042;
|
||||
--ifm-color-primary-light: #433267;
|
||||
--ifm-color-primary-lighter: #46346c;
|
||||
--ifm-color-primary-lightest: #3a2b59;
|
||||
--ifm-background-color: #e7e6e8;
|
||||
--ifm-color-primary-lightest: #d9e2ff;
|
||||
--ifm-background-color: #fffbff;
|
||||
--ifm-code-font-size: 95%;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(82, 78, 183, 0.2);
|
||||
--ifm-font-family-monospace: 'Fira Code', 'Meslo NGF', 'JetBrains Mono', 'Menlo', SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
|
||||
'Courier New', monospace;
|
||||
--ifm-font-family-base: Mulish, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
|
||||
--ifm-navbar-background-color : #ca7693
|
||||
--ifm-navbar-background-color: #ffd9df;
|
||||
}
|
||||
|
||||
.footer--dark {
|
||||
@@ -29,15 +30,15 @@
|
||||
|
||||
/* For readability concerns, you should choose a lighter palette in dark mode. */
|
||||
[data-theme='dark'] {
|
||||
--ifm-color-primary: #f7dbf2;
|
||||
--ifm-color-primary: #ffb1c1;
|
||||
--ifm-color-primary-dark: #efb5e4;
|
||||
--ifm-color-primary-darker: #eaa2dd;
|
||||
/* darker is secondary color in material */
|
||||
--ifm-color-primary-darker: #b0c6ff;
|
||||
--ifm-color-primary-darkest: #de69c9;
|
||||
--ifm-color-primary-light: #ffffff;
|
||||
--ifm-color-primary-lighter: #ffffff;
|
||||
--ifm-color-primary-lightest: #ffffff;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(82, 78, 183, 0.3);
|
||||
--ifm-font-family-monospace: 'Fira Code', 'Meslo NGF', 'JetBrains Mono', 'Menlo', SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
|
||||
'Courier New', monospace;
|
||||
--ifm-navbar-background-color : #ca7693
|
||||
--ifm-font-family-monospace: 'JetBrains Mono', 'Fira Code', 'Meslo NGF', 'Menlo', SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
|
||||
--ifm-navbar-background-color :#66002a
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import styles from './index.module.css';
|
||||
function HomepageHeader() {
|
||||
const { siteConfig } = useDocusaurusContext();
|
||||
return (
|
||||
<header className={clsx('hero hero--primary-darker', styles.heroBanner)}>
|
||||
<header className={clsx('hero hero--primary-lighter', styles.heroBanner)}>
|
||||
<div className="container">
|
||||
<div className='container'>
|
||||
<div className="row">
|
||||
@@ -27,8 +27,8 @@ function HomepageHeader() {
|
||||
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
||||
<Link
|
||||
className="button button--secondary button--lg"
|
||||
to="docs/guide/walkthrough/cli">
|
||||
sern init
|
||||
to="docs/guide/walkthrough/new-project">
|
||||
npm create @sern/bot
|
||||
</Link>
|
||||
</div>
|
||||
<div className="col col--6">
|
||||
@@ -52,7 +52,7 @@ export default function Home() {
|
||||
>
|
||||
<HomepageHeader/>
|
||||
<main className='user-select-none'>
|
||||
<div className='hero'>
|
||||
<div>
|
||||
<HomepageFeatures/>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
BIN
static/blog/newlogo/paperlogo.png
Normal file
|
After Width: | Height: | Size: 627 KiB |
BIN
static/blog/newlogo/paperprototypes.jpg
Normal file
|
After Width: | Height: | Size: 2.4 MiB |
BIN
static/blog/newlogo/serentried.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
static/img/R.png
|
Before Width: | Height: | Size: 21 KiB |
@@ -1,51 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||
<g>
|
||||
<polygon style="fill:#34485C;" points="17.655,441.379 494.345,441.379 494.345,123.586 17.655,123.586 "/>
|
||||
<polygon style="fill:#4897F7;" points="70.621,88.276 123.586,88.276 123.586,35.31 70.621,35.31 "/>
|
||||
<polygon style="fill:#576D7E;" points="61.793,238.345 167.724,238.345 167.724,203.034 61.793,203.034 "/>
|
||||
<polygon style="fill:#397ABC;" points="150.073,123.586 44.142,123.586 61.798,88.276 132.418,88.276 "/>
|
||||
<polygon style="fill:#C6421E;" points="388.414,88.276 441.379,88.276 441.379,35.31 388.414,35.31 "/>
|
||||
<polygon style="fill:#992C13;" points="467.866,123.586 361.935,123.586 379.591,88.276 450.211,88.276 "/>
|
||||
<g>
|
||||
<polygon style="fill:#576D7E;" points="450.211,203.034 414.901,203.034 414.901,167.724 379.591,167.724 379.591,203.034
|
||||
344.28,203.034 344.28,238.345 379.591,238.345 379.591,273.655 414.901,273.655 414.901,238.345 450.211,238.345 "/>
|
||||
<polygon style="fill:#576D7E;" points="0,476.69 512,476.69 512,441.379 0,441.379 "/>
|
||||
<path style="fill:#576D7E;" d="M176.556,44.138v79.448h35.31V79.475c0-4.89,3.964-8.854,8.854-8.854h70.568
|
||||
c4.89,0,8.854,3.964,8.854,8.854v44.111h35.31V44.138c0-4.873-3.955-8.828-8.828-8.828H185.384
|
||||
C180.511,35.31,176.556,39.265,176.556,44.138"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.7 KiB |
32
static/img/bricks-svgrepo-com.svg
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
viewBox="0 0 512 512" xml:space="preserve">
|
||||
<path style="fill:#E15649;" d="M0,475.429h128v-73.143H0V475.429z"/>
|
||||
<path style="fill:#BC342E;" d="M128,475.429h128v-73.143H128V475.429z"/>
|
||||
<path style="fill:#A52525;" d="M256,475.429h128v-73.143H256V475.429z"/>
|
||||
<path style="fill:#E15649;" d="M384,475.429h128v-73.143H384V475.429z"/>
|
||||
<path style="fill:#BC342E;" d="M0,402.286h64v-73.143H0V402.286z"/>
|
||||
<g>
|
||||
<path style="fill:#A52525;" d="M448,402.286h64v-73.143h-64V402.286z"/>
|
||||
<path style="fill:#A52525;" d="M64,402.286h128v-73.143H64V402.286z"/>
|
||||
</g>
|
||||
<path style="fill:#E15649;" d="M192,402.286h128v-73.143H192V402.286z"/>
|
||||
<path style="fill:#BC342E;" d="M320,402.286h128v-73.143H320V402.286z"/>
|
||||
<path style="fill:#E15649;" d="M0,329.143h128V256H0V329.143z"/>
|
||||
<path style="fill:#BC342E;" d="M128,329.143h128V256H128V329.143z"/>
|
||||
<path style="fill:#A52525;" d="M256,329.143h128V256H256V329.143z"/>
|
||||
<path style="fill:#E15649;" d="M384,329.143h128V256H384V329.143z"/>
|
||||
<path style="fill:#BC342E;" d="M0,256h64v-73.143H0V256z"/>
|
||||
<g>
|
||||
<path style="fill:#A52525;" d="M448,256h64v-73.143h-64V256z"/>
|
||||
<path style="fill:#A52525;" d="M64,256h128v-73.143H64V256z"/>
|
||||
</g>
|
||||
<path style="fill:#E15649;" d="M192,256h128v-73.143H192V256z"/>
|
||||
<path style="fill:#BC342E;" d="M320,256h128v-73.143H320V256z"/>
|
||||
<path style="fill:#E15649;" d="M0,182.857h128v-73.143H0V182.857z"/>
|
||||
<path style="fill:#BC342E;" d="M128,182.857h128v-73.143H128V182.857z"/>
|
||||
<path style="fill:#A52525;" d="M256,182.857h128v-73.143H256V182.857z"/>
|
||||
<path style="fill:#BC342E;" d="M0,109.714h64V36.571H0V109.714z"/>
|
||||
<path style="fill:#A52525;" d="M64,109.714h128V36.571H64V109.714z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 6.1 KiB |
3
static/img/fire-com.svg
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
static/img/fs.png
Normal file
|
After Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 5.7 KiB |
BIN
static/img/old-logo.png
Normal file
|
After Width: | Height: | Size: 122 KiB |
BIN
static/img/old-sern-logo.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
15
static/img/pencil-svgrepo-com.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
width="800px" height="800px" viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#394240" d="M62.828,16.484L47.512,1.172c-1.562-1.562-4.094-1.562-5.656,0L0,43.031V64h20.973l41.855-41.855
|
||||
C64.391,20.578,64.391,18.051,62.828,16.484z M18,56H8V46l0.172-0.172l10,10L18,56z M23.828,50.172l-10-10L44,10l10,10
|
||||
L23.828,50.172z"/>
|
||||
<polygon fill="#F9EBB2" points="18,56 8,56 8,46 8.172,45.828 18.172,55.828 "/>
|
||||
|
||||
<rect x="26.843" y="8.751" transform="matrix(0.7071 0.7071 -0.7071 0.7071 31.2072 -15.1689)" fill="#45AAB8" width="14.142" height="42.669"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 944 B |