mirror of
https://github.com/sern-handler/website
synced 2026-06-08 00:42:21 +00:00
Compare commits
154 Commits
1.0.0
...
build/auto
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b453377bad | ||
|
|
ac5b875716 | ||
|
|
1a404dd2bf | ||
|
|
6ab8f09271 | ||
|
|
04a7824983 | ||
|
|
994f0ca0e8 | ||
|
|
a60c20545e | ||
|
|
9923ad226d | ||
|
|
a418273592 | ||
|
|
cefbc62823 | ||
|
|
437b8759cb | ||
|
|
7e0c9c012f | ||
|
|
9087c085c4 | ||
|
|
adfbe3b8a4 | ||
|
|
39ff89aa00 | ||
|
|
486b4eced9 | ||
|
|
ccc5466b9c | ||
|
|
ffc3e5419a | ||
|
|
c965f6fca2 | ||
| ba9b7605a6 | |||
|
|
3842e2dc35 | ||
|
|
dd0a61d71a | ||
|
|
b588f64dd5 | ||
|
|
9a686c27f0 | ||
|
|
068ee4c7f3 | ||
|
|
61bef454da | ||
|
|
0c5cc44017 | ||
|
|
62e0d6a61e | ||
|
|
784d50b8a7 | ||
|
|
6857d86848 | ||
| 0936b2db77 | |||
|
|
db4c4adfa8 | ||
| 92a99887eb | |||
| ae3a02b066 | |||
| a745ed65f1 | |||
| f4377c8689 | |||
|
|
d253d3845a | ||
| d6378cf861 | |||
| b36464273e | |||
| 7648247f38 | |||
| 0efe03d88a | |||
|
|
7c8008625d | ||
|
|
98254a7391 | ||
|
|
85b6bbb1cf | ||
|
|
24569595f9 | ||
| 647c89755c | |||
| 0e6caf5c8a | |||
|
|
9a7e98bede | ||
|
|
43f6e227ca | ||
|
|
427fa8cdc9 | ||
|
|
ce68afeeaf | ||
|
|
0f01b5863e | ||
|
|
0fafea8539 | ||
|
|
96283b2d45 | ||
|
|
5f28408e05 | ||
|
|
6214328309 | ||
|
|
5244a9d020 | ||
|
|
95f07e7bfa | ||
|
|
428e975fee | ||
|
|
178a49dcc5 | ||
|
|
57b2a3ec73 | ||
|
|
40e4fe60ad | ||
|
|
2051a692be | ||
|
|
4e66d27350 | ||
|
|
e19b5e345e | ||
|
|
8845e3827d | ||
|
|
d30eb72469 | ||
|
|
73478e6d29 | ||
|
|
b9227a70e2 | ||
|
|
07b83f76fe | ||
|
|
3956759f06 | ||
|
|
88b4ffae11 | ||
|
|
2bce9458bf | ||
|
|
cd601bdefe | ||
|
|
ae9c40ee50 | ||
|
|
d4abf4bc9d | ||
|
|
e4eaf9dda2 | ||
|
|
5178605264 | ||
|
|
62982d91e4 | ||
|
|
e8acece51a | ||
|
|
463f0f61e0 | ||
|
|
d23c54dd2c | ||
|
|
e627b8bb55 | ||
|
|
add28784d2 | ||
|
|
0eccac926f | ||
|
|
f18d4ded88 | ||
|
|
a128e8dee6 | ||
|
|
211aeaefbd | ||
|
|
33301874f9 | ||
|
|
cc7bd61542 | ||
|
|
48912ed979 | ||
|
|
cd964af129 | ||
|
|
4e604a0449 | ||
|
|
6f4ab8ef9c | ||
|
|
e43eec5f20 | ||
|
|
fe27ff5a0c | ||
|
|
eb3b049a19 | ||
|
|
974b909946 | ||
|
|
f607b95346 | ||
|
|
ed91cceabc | ||
|
|
83320e49f6 | ||
|
|
fc3dde72f9 | ||
|
|
e0444a9998 | ||
|
|
8e4f5299df | ||
|
|
70010ffe57 | ||
|
|
97309dba62 | ||
|
|
31651e1963 | ||
|
|
05e188439d | ||
|
|
5bfe0f825c | ||
|
|
da0eefdf3b | ||
|
|
2ee09a6e7a | ||
|
|
fc134c0c9c | ||
|
|
24765af575 | ||
|
|
243c020628 | ||
|
|
cff7bd7e09 | ||
|
|
0eec925422 | ||
|
|
b08f1ff29f | ||
|
|
674184badb | ||
|
|
9cfb202014 | ||
|
|
c2e1028bc8 | ||
|
|
99a3ed27f7 | ||
|
|
0e83cb99ec | ||
|
|
23ab9d36f5 | ||
|
|
3fbfdeff76 | ||
|
|
3d05c4873f | ||
|
|
d34b97dfa8 | ||
|
|
e37640b6b2 | ||
|
|
0e363ad491 | ||
|
|
7ff79a4576 | ||
|
|
7771807657 | ||
|
|
8f33ee8e60 | ||
|
|
ed3a4a53e3 | ||
|
|
f84e2e686a | ||
|
|
93e3aeccd8 | ||
|
|
7140a7aef8 | ||
|
|
3abba07c89 | ||
|
|
28395413ae | ||
|
|
70e20f6030 | ||
|
|
2542851e2e | ||
|
|
c129a4e032 | ||
|
|
d8cab0782e | ||
|
|
bf0611bd79 | ||
|
|
3d0cf23c53 | ||
|
|
9a0f5a5dbc | ||
|
|
384e09541b | ||
|
|
97722573fa | ||
|
|
bc6f9048c2 | ||
|
|
c1d5931ccd | ||
|
|
81c7250f63 | ||
|
|
f1db5ff361 | ||
|
|
6aa53edc22 | ||
|
|
2f46becc47 | ||
|
|
54b58d944f | ||
|
|
f90b05bf92 |
39
.github/workflows/build-docs.yml
vendored
Normal file
39
.github/workflows/build-docs.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: build-docs
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# Review gh actions docs if you want to further define triggers, paths, etc
|
||||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Checkout and Build Docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: 'sern-handler/handler',
|
||||
path: 'handler/'
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: npm
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: clean docs directory
|
||||
run: |
|
||||
rm -rf docs
|
||||
- name: Build website
|
||||
run: npm run build
|
||||
- name: Create Pull Request
|
||||
id: cpr
|
||||
uses: peter-evans/create-pull-request@v5-beta
|
||||
with:
|
||||
commit-message: "chore: update docs"
|
||||
branch: docs
|
||||
delete-branch: true
|
||||
branch-suffix: short-commit-hash
|
||||
title: "docs: Update docs"
|
||||
body: "asfl;asdkcng;lfkv;lajf;bflglfsafs;af"
|
||||
reviewers: jacoobes
|
||||
39
.github/workflows/docusaurus.yml
vendored
Normal file
39
.github/workflows/docusaurus.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: Deploy to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
# Review gh actions docs if you want to further define triggers, paths, etc
|
||||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy to GitHub Pages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Build website
|
||||
run: npm run build
|
||||
|
||||
# Popular action to deploy to GitHub Pages:
|
||||
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Build output to publish to the `gh-pages` branch:
|
||||
publish_dir: ./build
|
||||
# The following lines assign commit authorship to the official
|
||||
# GH-Actions bot for deploys to `gh-pages` branch:
|
||||
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
|
||||
# The GH actions bot is used by default if you didn't specify the two fields.
|
||||
# You can swap them out with your own user credentials.
|
||||
user_name: github-actions[bot]
|
||||
user_email: 41898282+github-actions[bot]@users.noreply.github.com
|
||||
20
.gitignore
vendored
Normal file
20
.gitignore
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# Dependencies
|
||||
/node_modules
|
||||
|
||||
# Production
|
||||
/build
|
||||
|
||||
# Generated files
|
||||
.docusaurus
|
||||
.cache-loader
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
7
.idea/discord.xml
generated
Normal file
7
.idea/discord.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="PROJECT_FILES" />
|
||||
<option name="description" value="" />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/misc.xml
generated
Normal file
6
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/website.iml" filepath="$PROJECT_DIR$/.idea/website.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
9
.idea/website.iml
generated
Normal file
9
.idea/website.iml
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
420
.idea/workspace.xml
generated
Normal file
420
.idea/workspace.xml
generated
Normal file
@@ -0,0 +1,420 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="53dd69d3-e01a-4656-b414-c727f5aa549a" name="Changes" comment="docs: add new plugins docs">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/classes/CommandExecutable.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/classes/CommandExecutable.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/classes/Context.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/classes/Context.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/classes/DefaultErrorHandling.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/classes/DefaultErrorHandling.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/classes/DefaultLogging.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/classes/DefaultLogging.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/classes/DefaultModuleManager.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/classes/DefaultModuleManager.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/classes/EventExecutable.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/classes/EventExecutable.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/classes/ModuleStore.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/classes/ModuleStore.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/classes/SernEmitter.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/classes/SernEmitter.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/enums/CommandType.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/enums/CommandType.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/enums/EventType.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/enums/EventType.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/enums/PayloadType.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/enums/PayloadType.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/enums/PluginType.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/enums/PluginType.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/enums/SernError.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/enums/SernError.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/AutocompleteCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/AutocompleteCommand.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/BothCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/BothCommand.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ButtonCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ButtonCommand.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ChannelSelectCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ChannelSelectCommand.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/CommandPlugin.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/CommandPlugin.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ContextMenuMsg.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ContextMenuMsg.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ContextMenuUser.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ContextMenuUser.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ControlPlugin.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ControlPlugin.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/Controller.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/Controller.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/Dependencies.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/Dependencies.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/DependencyConfiguration.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/DependencyConfiguration.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/DiscordEventCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/DiscordEventCommand.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ErrorHandling.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ErrorHandling.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/EventPlugin.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/EventPlugin.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ExternalEventCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ExternalEventCommand.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/InitArgs.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/InitArgs.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/InitPlugin.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/InitPlugin.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/Logging.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/Logging.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/MentionableSelectCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/MentionableSelectCommand.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ModalSubmitCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ModalSubmitCommand.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/Module.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/Module.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ModuleManager.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ModuleManager.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/Plugin.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/Plugin.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/RoleSelectCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/RoleSelectCommand.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/SernAutocompleteData.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/SernAutocompleteData.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/SernEventCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/SernEventCommand.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/SernSubCommandData.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/SernSubCommandData.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/SernSubCommandGroupData.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/SernSubCommandGroupData.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/SlashCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/SlashCommand.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/StringSelectCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/StringSelectCommand.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/TextCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/TextCommand.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/UserSelectCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/UserSelectCommand.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/Wrapper.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/Wrapper.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/modules.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/modules.md" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/docs/api/namespaces/Sern.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/namespaces/Sern.md" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="ComposerSettings">
|
||||
<execution />
|
||||
</component>
|
||||
<component name="Git.Merge.Settings">
|
||||
<option name="BRANCH" value="master" />
|
||||
</component>
|
||||
<component name="Git.Rebase.Settings">
|
||||
<option name="NEW_BASE" value="jacoobes" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_BRANCH_BY_REPOSITORY">
|
||||
<map>
|
||||
<entry key="$PROJECT_DIR$" value="main" />
|
||||
</map>
|
||||
</option>
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="GithubPullRequestsUISettings">
|
||||
<option name="selectedUrlAndAccountId">
|
||||
<UrlAndAccount>
|
||||
<option name="accountId" value="1fedf39a-45aa-449b-9d1d-6f25985f42b4" />
|
||||
<option name="url" value="https://github.com/sern-handler/website.git" />
|
||||
</UrlAndAccount>
|
||||
</option>
|
||||
</component>
|
||||
<component name="MacroExpansionManager">
|
||||
<option name="directoryName" value="d62oj9rg" />
|
||||
</component>
|
||||
<component name="MarkdownSettingsMigration">
|
||||
<option name="stateVersion" value="1" />
|
||||
</component>
|
||||
<component name="ProjectId" id="2DJXFY4dwukGLOzXi05b6lHCkuk" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||
"Git.Branch.Popup.ShowAllRemotes": "true",
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"last_opened_file_path": "C:/Users/jacob/OneDrive/Desktop/Projects/sern/website",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"project.structure.last.edited": "Modules",
|
||||
"project.structure.proportion": "0.0",
|
||||
"project.structure.side.proportion": "0.0",
|
||||
"ts.external.directory.path": "E:\\IntelliJ IDEA 2022.1.1\\plugins\\JavaScriptLanguage\\jsLanguageServicesImpl\\external"
|
||||
}
|
||||
}</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="C:\Users\jacob\IdeaProjects\website\static\img" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="RunManager" selected="npm.start">
|
||||
<configuration name="build" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
|
||||
<package-json value="$PROJECT_DIR$/package.json" />
|
||||
<command value="run" />
|
||||
<scripts>
|
||||
<script value="build" />
|
||||
</scripts>
|
||||
<node-interpreter value="project" />
|
||||
<envs />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="start" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
|
||||
<package-json value="$PROJECT_DIR$/package.json" />
|
||||
<command value="run" />
|
||||
<scripts>
|
||||
<script value="start" />
|
||||
</scripts>
|
||||
<node-interpreter value="project" />
|
||||
<envs />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="typedoc-json" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
|
||||
<package-json value="$PROJECT_DIR$/package.json" />
|
||||
<command value="run" />
|
||||
<scripts>
|
||||
<script value="typedoc-json" />
|
||||
</scripts>
|
||||
<node-interpreter value="project" />
|
||||
<envs />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="npm.start" />
|
||||
<item itemvalue="npm.build" />
|
||||
<item itemvalue="npm.typedoc-json" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="53dd69d3-e01a-4656-b414-c727f5aa549a" name="Changes" comment="chore: edit link so no new windows" />
|
||||
<created>1660418057765</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1660418057765</updated>
|
||||
<workItem from="1660418059202" duration="1120000" />
|
||||
<workItem from="1660419190329" duration="211000" />
|
||||
<workItem from="1660703091089" duration="348000" />
|
||||
<workItem from="1661890199928" duration="3164000" />
|
||||
<workItem from="1661963277269" duration="666000" />
|
||||
<workItem from="1661966300011" duration="124000" />
|
||||
<workItem from="1664254948139" duration="391000" />
|
||||
<workItem from="1664301972139" duration="4356000" />
|
||||
<workItem from="1664322335828" duration="5088000" />
|
||||
<workItem from="1664342243187" duration="510000" />
|
||||
<workItem from="1664342844947" duration="41000" />
|
||||
<workItem from="1664345686862" duration="1690000" />
|
||||
<workItem from="1670994246639" duration="17000" />
|
||||
<workItem from="1670994294247" duration="1058000" />
|
||||
<workItem from="1671030002725" duration="5842000" />
|
||||
<workItem from="1671047161316" duration="3576000" />
|
||||
<workItem from="1671119393024" duration="3889000" />
|
||||
<workItem from="1673974979200" duration="2385000" />
|
||||
<workItem from="1674757791435" duration="925000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="feat: remove old index.html in static/">
|
||||
<created>1660418841831</created>
|
||||
<option name="number" value="00001" />
|
||||
<option name="presentableId" value="LOCAL-00001" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1660418841831</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00002" summary="feat: remove old index.html in static/">
|
||||
<created>1660419375631</created>
|
||||
<option name="number" value="00002" />
|
||||
<option name="presentableId" value="LOCAL-00002" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1660419375631</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00003" summary="feat: edit action">
|
||||
<created>1660421982013</created>
|
||||
<option name="number" value="00003" />
|
||||
<option name="presentableId" value="LOCAL-00003" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1660421982013</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00004" summary="feat: delete needless assets/dir">
|
||||
<created>1660425803740</created>
|
||||
<option name="number" value="00004" />
|
||||
<option name="presentableId" value="LOCAL-00004" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1660425803740</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00005" summary="feat: action changes and edit link">
|
||||
<created>1660426493480</created>
|
||||
<option name="number" value="00005" />
|
||||
<option name="presentableId" value="LOCAL-00005" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1660426493480</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00006" summary="feat: add favicon">
|
||||
<created>1660427131558</created>
|
||||
<option name="number" value="00006" />
|
||||
<option name="presentableId" value="LOCAL-00006" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1660427131558</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00007" summary="fix: broken link">
|
||||
<created>1660427309873</created>
|
||||
<option name="number" value="00007" />
|
||||
<option name="presentableId" value="LOCAL-00007" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1660427309873</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00008" summary="chore: edit link so no new windows">
|
||||
<created>1660427590730</created>
|
||||
<option name="number" value="00008" />
|
||||
<option name="presentableId" value="LOCAL-00008" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1660427590730</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00009" summary="chore: fix typo">
|
||||
<created>1661890861168</created>
|
||||
<option name="number" value="00009" />
|
||||
<option name="presentableId" value="LOCAL-00009" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1661890861168</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00010" summary="feat: adding width attr">
|
||||
<created>1661963793586</created>
|
||||
<option name="number" value="00010" />
|
||||
<option name="presentableId" value="LOCAL-00010" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1661963793586</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00011" summary="feat: adding blogs">
|
||||
<created>1664307221790</created>
|
||||
<option name="number" value="00011" />
|
||||
<option name="presentableId" value="LOCAL-00011" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1664307221790</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00012" summary="feat: blogwork">
|
||||
<created>1664342459061</created>
|
||||
<option name="number" value="00012" />
|
||||
<option name="presentableId" value="LOCAL-00012" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1664342459061</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00013" summary="fix: links">
|
||||
<created>1664346272428</created>
|
||||
<option name="number" value="00013" />
|
||||
<option name="presentableId" value="LOCAL-00013" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1664346272428</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00014" summary="fix: try fiux">
|
||||
<created>1664346705175</created>
|
||||
<option name="number" value="00014" />
|
||||
<option name="presentableId" value="LOCAL-00014" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1664346705175</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00015" summary="feat: change date of blog">
|
||||
<created>1664347141696</created>
|
||||
<option name="number" value="00015" />
|
||||
<option name="presentableId" value="LOCAL-00015" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1664347141696</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00016" summary="feat: starting writing 2.0 release blog">
|
||||
<created>1670995351643</created>
|
||||
<option name="number" value="00016" />
|
||||
<option name="presentableId" value="LOCAL-00016" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1670995351643</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00017" summary="feat: adding more to blog">
|
||||
<created>1671035904313</created>
|
||||
<option name="number" value="00017" />
|
||||
<option name="presentableId" value="LOCAL-00017" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1671035904313</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00018" summary="feat: update docs and links">
|
||||
<created>1671049168115</created>
|
||||
<option name="number" value="00018" />
|
||||
<option name="presentableId" value="LOCAL-00018" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1671049168115</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00019" summary="feat: update docs and links">
|
||||
<created>1671049335597</created>
|
||||
<option name="number" value="00019" />
|
||||
<option name="presentableId" value="LOCAL-00019" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1671049335597</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00020" summary="feat: fix blog links">
|
||||
<created>1671050397033</created>
|
||||
<option name="number" value="00020" />
|
||||
<option name="presentableId" value="LOCAL-00020" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1671050397033</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00021" summary="feat: update blog">
|
||||
<created>1671121547701</created>
|
||||
<option name="number" value="00021" />
|
||||
<option name="presentableId" value="LOCAL-00021" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1671121547701</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00022" summary="feat: update typedoc">
|
||||
<created>1671121807771</created>
|
||||
<option name="number" value="00022" />
|
||||
<option name="presentableId" value="LOCAL-00022" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1671121807771</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00023" summary="feat: try again">
|
||||
<created>1671123452807</created>
|
||||
<option name="number" value="00023" />
|
||||
<option name="presentableId" value="LOCAL-00023" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1671123452807</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00024" summary="feat: update docs and some blog progress">
|
||||
<created>1673582791487</created>
|
||||
<option name="number" value="00024" />
|
||||
<option name="presentableId" value="LOCAL-00024" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1673582791487</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00025" summary="feat: update documentation and clarify documentation">
|
||||
<created>1673976226325</created>
|
||||
<option name="number" value="00025" />
|
||||
<option name="presentableId" value="LOCAL-00025" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1673976226325</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00026" summary="fix: links">
|
||||
<created>1673976805332</created>
|
||||
<option name="number" value="00026" />
|
||||
<option name="presentableId" value="LOCAL-00026" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1673976805332</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00027" summary="docs: add new plugins docs">
|
||||
<created>1673976828238</created>
|
||||
<option name="number" value="00027" />
|
||||
<option name="presentableId" value="LOCAL-00027" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1673976828238</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="28" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
<option name="TAB_STATES">
|
||||
<map>
|
||||
<entry key="MAIN">
|
||||
<value>
|
||||
<State />
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="feat: remove old index.html in static/" />
|
||||
<MESSAGE value="feat: edit action" />
|
||||
<MESSAGE value="feat: delete needless assets/dir" />
|
||||
<MESSAGE value="feat: action changes and edit link" />
|
||||
<MESSAGE value="feat: add favicon" />
|
||||
<MESSAGE value="fix: broken link" />
|
||||
<MESSAGE value="chore: edit link so no new windows" />
|
||||
<MESSAGE value="chore: fix typo" />
|
||||
<MESSAGE value="feat: adding width attr" />
|
||||
<MESSAGE value="feat: adding blogs" />
|
||||
<MESSAGE value="feat: blogwork" />
|
||||
<MESSAGE value="fix: try fiux" />
|
||||
<MESSAGE value="feat: change date of blog" />
|
||||
<MESSAGE value="feat: starting writing 2.0 release blog" />
|
||||
<MESSAGE value="feat: adding more to blog" />
|
||||
<MESSAGE value="feat: update docs and links" />
|
||||
<MESSAGE value="feat: fix blog links" />
|
||||
<MESSAGE value="feat: update blog" />
|
||||
<MESSAGE value="feat: update typedoc" />
|
||||
<MESSAGE value="feat: try again" />
|
||||
<MESSAGE value="feat: add image" />
|
||||
<MESSAGE value="feat: update docs and some blog progress" />
|
||||
<MESSAGE value="feat: update documentation and clarify documentation" />
|
||||
<MESSAGE value="fix: links" />
|
||||
<MESSAGE value="docs: add new plugins docs" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="docs: add new plugins docs" />
|
||||
</component>
|
||||
</project>
|
||||
12
.vscode/settings.json
vendored
Normal file
12
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"files.exclude": {
|
||||
"**/.git": true,
|
||||
"**/.svn": true,
|
||||
"**/.hg": true,
|
||||
"**/CVS": true,
|
||||
"**/.DS_Store": true,
|
||||
"**/Thumbs.db": true,
|
||||
".idea": true,
|
||||
".vscode": true
|
||||
}
|
||||
}
|
||||
30
404.html
Normal file
30
404.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<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">
|
||||
<meta name="theme-color" content="#fff">
|
||||
<meta name="twitter:card" content="summary">
|
||||
|
||||
<meta property="og:title" content="sern">
|
||||
<meta property="og:description" content="sern’s clean, modern and web interface.">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="https://sern-handler.js.org/">
|
||||
<meta property="og:locale" content="en_US">
|
||||
<meta name="description" content="sern’s clean, modern and user-friendly web interface.">
|
||||
|
||||
<title>sern - Page Not Found</title>
|
||||
</head>
|
||||
<body style="color: #444; margin:0;font: normal 14px/20px Arial, Helvetica, sans-serif; height:100%; background-color: #fff;">
|
||||
<div style="height:auto; min-height:100%; "> <div style="text-align: center; width:800px; margin-left: -400px; position:absolute; top: 30%; left:50%;">
|
||||
<h1 style="margin:0; font-size:150px; line-height:150px; font-weight:bold;">404</h1>
|
||||
<h2 style="margin-top:20px;font-size: 30px;">Not Found
|
||||
</h2>
|
||||
<p>The link you visited is may be broken or invalid.</p>
|
||||
<div class="button">
|
||||
<h2>
|
||||
<a href="http://sern-handler.js.org" title="Back to home" style="color: #444;">Back to homepage</a>
|
||||
</h2>
|
||||
</div>
|
||||
</div></div></body></html>
|
||||
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Sern
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1 +1,3 @@
|
||||
# docs
|
||||
# Website
|
||||
|
||||
sern's clean, modern and user-friendly web interface.
|
||||
|
||||
11625
assets/css/style.css
11625
assets/css/style.css
File diff suppressed because it is too large
Load Diff
@@ -1,2 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
3
babel.config.js
Normal file
3
babel.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
|
||||
};
|
||||
79
blog/2022-09-28-mdx-blog-post.md
Normal file
79
blog/2022-09-28-mdx-blog-post.md
Normal file
@@ -0,0 +1,79 @@
|
||||
---
|
||||
slug: 1.2.0
|
||||
title: Release 1.2.0
|
||||
authors: [jacoobes]
|
||||
tags: [release]
|
||||
---
|
||||
|
||||
## Class-based modules
|
||||
|
||||
Today we're announcing the ability to create class based modules!
|
||||
To get started, install
|
||||
```
|
||||
npm install @sern/handler@latest
|
||||
```
|
||||
|
||||
Quick List of changes!
|
||||
- [Class based modules](#class-based-modules)
|
||||
- [Deprecation Warnings](#deprecation-warnings)
|
||||
- [Dependencies update](#dependencies-update)
|
||||
|
||||
|
||||
### Class based modules
|
||||
Incorporate class based modules into your project instead of the traditional `commandModule` or `eventModule`
|
||||
Extend the new [CommandExecutable](docs/api/classes/CommandExecutable) or [EventExecutable](docs/api/classes/EventExecutable)
|
||||
```ts title="commands/meaning-of-life.ts"
|
||||
import { CommandType, CommandExecutable, type Args, type Context } from '@sern/handler';
|
||||
import { publish } from '../plugins/publish.js';
|
||||
import { serendipityOnly } from '../plugins/serendipityOnly.js';
|
||||
|
||||
export default class extends CommandExecutable<CommandType.Both> {
|
||||
type = CommandType.Both as const;
|
||||
description = 'What is the meaning of life?'
|
||||
override onEvent = [
|
||||
serendipityOnly()
|
||||
];
|
||||
override plugins = [
|
||||
publish(),
|
||||
];
|
||||
// highlight-next-line
|
||||
execute = async (ctx: Context, args: Args) => {
|
||||
await ctx.reply('42')
|
||||
};
|
||||
}
|
||||
```
|
||||
:::caution
|
||||
|
||||
execute must not be a method of the class. It should be as above, a property on the class!
|
||||
|
||||
:::
|
||||
|
||||
```ts title="events/guildMemberAdd.ts"
|
||||
import { CommandType, EventExecutable, type EventType } from '@sern/handler';
|
||||
import type { GuildMember } from 'discord.js'
|
||||
|
||||
export default class extends EventExecutable<EventType.Discord> {
|
||||
type = EventType.Discord as const;
|
||||
// highlight-next-line
|
||||
execute = (member: GuildMember) => {
|
||||
console.log(member)
|
||||
};
|
||||
}
|
||||
```
|
||||
Now, you might ask **why** this feature was added. <br /> Simply put, to give flexibility to the developers.
|
||||
I believe that you should build your own structures however you might like and customize to your liking.
|
||||
In addition, **decorators now unofficially work with modules!**
|
||||
Feel free to use TypeScript experimental decorators to augment and customize your classes.
|
||||
|
||||
### Deprecation Warnings
|
||||
The next update will bring sern v2 with some important features. Here are some things to watch out for.
|
||||
|
||||
- [Wrapper#client](docs/api/interfaces/Wrapper) will be deprecated
|
||||
- [Wrapper#sernEmitter](docs/api/interfaces/Wrapper) will be deprecated
|
||||
- a SernEmitter will be automatically created once Sern#init is called
|
||||
- The option to pass in a function or array for [Wrapper#events](docs/api/interfaces/Wrapper) will be deprecated. Only strings are accepted.
|
||||
- [Sern#addExternal](docs/api/classes/SernEmitter) will be deprecated in favor of a better way.
|
||||
|
||||
### Dependencies Update
|
||||
- TypeScript has been updated to 4.8.3
|
||||
- Discord.js has been upgraded to 14.5
|
||||
62
blog/2022-09-30-mdx-blog-post.md
Normal file
62
blog/2022-09-30-mdx-blog-post.md
Normal file
@@ -0,0 +1,62 @@
|
||||
---
|
||||
slug: getting-started
|
||||
title: How to get started with sern!
|
||||
authors: [Sr Izan]
|
||||
tags: [guides]
|
||||
---
|
||||
|
||||
## Hello everyone!
|
||||
|
||||
I'm Sr Izan, your fellow user and contributor.
|
||||
|
||||
Today I'm going to show you how to get started with sern and all its cool features.
|
||||
|
||||
### Step 1: Install the CLI.
|
||||
|
||||
Install the CLI:
|
||||
```
|
||||
npm i -g @sern/cli
|
||||
```
|
||||
and then run
|
||||
```
|
||||
sern init
|
||||
```
|
||||
:::tip
|
||||
You can also run `sern init -y` if you want to use the default options.
|
||||
:::
|
||||
|
||||
The CLI is written in Typescript and open-sourced on [Github](https://github.com/sern-handler/cli). (thanks [evo](https://github.com/EvolutionX-10)!)
|
||||
|
||||
### Step 2: Have some way to store secrets.
|
||||
|
||||
Normally you'd need a way to store secrets, and the best way to do that is by installing another package: `dotenv`
|
||||
|
||||
just `npm i dotenv` in the project folder and add `require('dotenv').config()` to your import section. Then, when you login, `process.env.TOKEN` (or however you have it named on your `.env` file) should do the trick.
|
||||
|
||||
:::caution
|
||||
If you're using ESM, configure dotenv with `import 'dotenv/config'` instead of `require('dotenv').config()`.
|
||||
:::
|
||||
|
||||
### 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.
|
||||
|
||||
### Extra: Video tutorial!
|
||||
|
||||
<video width="400" controls>
|
||||
<source src="https://srizan.s-ul.eu/wtJBVsZU" type="video/mp4" />
|
||||
</video>
|
||||
|
||||
## FAQ
|
||||
|
||||
**Q**: How do I publish a slash command?
|
||||
**A**: Install the publish extension. Little video:
|
||||
<video width="400" controls>
|
||||
<source src="https://srizan.s-ul.eu/uHzPhfcS" type="video/mp4" />
|
||||
</video>
|
||||
|
||||
**Q**: Any snippet VSCode extension?
|
||||
**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!
|
||||
191
blog/2022-12-13-mdx-blog-post.md
Normal file
191
blog/2022-12-13-mdx-blog-post.md
Normal file
@@ -0,0 +1,191 @@
|
||||
---
|
||||
slug: 2.0.0
|
||||
title: Release 2.0.0
|
||||
authors: [jacoobes]
|
||||
tags: [release]
|
||||
---
|
||||
|
||||
## 2.0 Release
|
||||
Join our [discord](https://sern.dev/discord)! <br />
|
||||
Wow! We're finally increasing our semantic versioning by +`1.7.9.` <br />
|
||||
What does this mean?
|
||||
|
||||
### Plugin Support for Event Modules
|
||||
You can now use plugins for event modules. Previous version would throw an error if the
|
||||
`plugins` field was populated.
|
||||
|
||||
```typescript
|
||||
export function commandPlTest() : SernEmitterPlugin {
|
||||
return {
|
||||
type: PluginType.Command,
|
||||
execute: ({ mod}, controller) => {
|
||||
if(mod.name === 'module.register') {
|
||||
console.log('Event Module created correctly')
|
||||
return controller.next()
|
||||
}
|
||||
console.log('event name is wrong')
|
||||
return controller.stop()
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
Applying this plugin to some `eventModule`:
|
||||
```typescript
|
||||
export default eventModule({
|
||||
name: 'error',
|
||||
type: EventType.Sern,
|
||||
plugins: [commandPlTest()],
|
||||
execute(m) {
|
||||
console.log(m)
|
||||
},
|
||||
})
|
||||
```
|
||||
## Dependency Injection and Decoupling
|
||||
|
||||
The powerful npm package `iti` decouples sern even more.
|
||||
Decoupling data structures with the Inversion of Control pattern separates data from logic, which will help speed production
|
||||
and make sern even more customizable than before.
|
||||
|
||||
### How do I start?
|
||||
```typescript title="src/index.ts"
|
||||
//With typescript, you can customize / augment your typings.
|
||||
interface MyDependencies extends Dependencies {
|
||||
'@sern/client' : Singleton<Client>;
|
||||
'@sern/logger' : Singleton<DefaultLogging>
|
||||
}
|
||||
|
||||
export const useContainer = Sern.makeDependencies<MyDependencies>({
|
||||
// exclude: new Set(['@sern/logger']), don't autofill optional dependencies
|
||||
build: root => root
|
||||
.add({ '@sern/client': single(client) })
|
||||
.add({ '@sern/logger': single(new DefaultLogging()) })
|
||||
});
|
||||
|
||||
Sern.init({
|
||||
defaultPrefix: '!', // removing defaultPrefix will shut down text commands
|
||||
commands: 'src/commands',
|
||||
// events: 'src/events' (optional),
|
||||
containerConfig : {
|
||||
get: useContainer //pass in your dependency getter here
|
||||
}
|
||||
});
|
||||
|
||||
```
|
||||
Using the `Sern#makeDependencies` function, inject your dependencies.
|
||||
We'll use specific dependencies that are created with the `@sern/keyword`
|
||||
key.
|
||||
Using typescript to display all `keywords` and what they represent:
|
||||
```typescript
|
||||
export interface Dependencies {
|
||||
'@sern/client': Singleton<EventEmitter>; //Discord Client
|
||||
'@sern/logger'?: Singleton<Logging>; //Logger
|
||||
'@sern/emitter': Singleton<SernEmitter>; //SernEmitter
|
||||
'@sern/store' : Singleton<ModuleStore>; //Stores all Command Modules
|
||||
'@sern/modules' : Singleton<ModuleManager>; //Manages Modules
|
||||
'@sern/errors': Singleton<ErrorHandling>; //A Lifetime / Crash Handler
|
||||
}
|
||||
```
|
||||
:::danger
|
||||
Sern#addExternal has been deprecated and removed in favor of Sern#makeDependencies
|
||||
:::
|
||||
At the moment, one optional dependency, `@sern/logger`, exists. If not added explicitly,
|
||||
we'll **autofill** with a [DefaultLogger](https://sern.dev/docs/api/classes/defaultlogging).
|
||||
|
||||
:::tip
|
||||
If you don't want a logger, add it to the
|
||||
`exclude` field while composing dependencies.
|
||||
:::
|
||||
|
||||
Use your generated dependency getter `useContainer` (use whatever name you want), access them
|
||||
from anywhere.
|
||||
:::note
|
||||
the function [useContainerRaw](https://sern.dev/docs/api/modules#usecontainerraw) is provided for direct access to dependencies and the internal
|
||||
data structure. Use this wisely as no guarantees are made and crashes can happen.
|
||||
:::
|
||||
|
||||
The `build` field follows [createContainer](https://itijs.org/docs/quick-start#usage) function call.
|
||||
|
||||
## New CommandTypes
|
||||
2.0 includes all the new role select menus. `CommandType.MenuSelect` has been renamed into
|
||||
`CommandType.StringSelect`. The remaining SelectMenus are
|
||||
`CommandType.RoleSelect`, `CommandType.ChannelSelect`, `CommandType.UserSelect`, `CommandType.MentionableSelect`
|
||||
```typescript title="commands/roleselect.ts"
|
||||
export default commandModule({
|
||||
type: CommandType.RoleSelect,
|
||||
execute(ctx) {
|
||||
ctx.reply('role select')
|
||||
},
|
||||
})
|
||||
```
|
||||
In addition, commandModules with ContextMenus have been renamed.
|
||||
```diff
|
||||
- CommandType.MenuUser, CommandType.MenuMsg
|
||||
+ CommandType.CtxUser, CommandType.CtxMsg
|
||||
```
|
||||
## Typings Simplification
|
||||
Pre 2.0:
|
||||
<img src="https://cdn.discordapp.com/attachments/820348341358952550/1038577974829666386/image.png" />
|
||||
<br/> <br/> <br/>
|
||||
Post 2.0:
|
||||
<br/>
|
||||
<img src="https://cdn.discordapp.com/attachments/820348341358952550/1052623728489550015/image.png" />
|
||||
|
||||
CommandPlugin<T\> and EventPlugin<T\> typings have also been static'ified, transformed from types to interfaces
|
||||
## Breaking Changes
|
||||
<img src="https://img.srizan.ml/Discord_z8Sn1UBfEe.png" />
|
||||
<br />
|
||||
All deprecation warnings from previous versions have taken effect, and are removed in 2.0.
|
||||
|
||||
```diff
|
||||
- type Module = EventModule | CommandModule
|
||||
+ type AnyModule = EventModule | CommandModule
|
||||
|
||||
-export type SpreadParams<T extends (...args: never) => unknown> = (
|
||||
- args: Parameters<T>[number],
|
||||
- ) => unknown;
|
||||
```
|
||||
Override type has been removed due to redundancy
|
||||
```diff
|
||||
- discord.js : 14.5
|
||||
+ discord.js : 14.7
|
||||
|
||||
-typescript: 4.7
|
||||
+ typescript: 4.9
|
||||
```
|
||||
```diff
|
||||
+ interface Wrapper {
|
||||
+ readonly defaultPrefix?: string;
|
||||
+ readonly commands: string;
|
||||
+ readonly events?: string;
|
||||
+ readonly containerConfig : {
|
||||
+ get: (...keys: (keyof Dependencies)[]) => unknown[];
|
||||
+ }
|
||||
+}
|
||||
|
||||
- interface Wrapper {
|
||||
- readonly client: Client;
|
||||
- readonly sernEmitter?: SernEmitter;
|
||||
- readonly defaultPrefix?: string;
|
||||
- readonly commands: string;
|
||||
- readonly events?:
|
||||
- | string
|
||||
- | { mod: EventModule; absPath: string }[]
|
||||
- | (() => { mod: EventModule; absPath: string }[]);
|
||||
-}
|
||||
```
|
||||
```diff
|
||||
+ DefaultLogger
|
||||
+ DefaultModuleManager
|
||||
+ SernEmitter
|
||||
+ DefaultErrorHandling
|
||||
+ type Singleton<T> = () => T
|
||||
+ type Transient<T> = () => () => T;
|
||||
+ type LogPayload<T = unknown> = { message: T }
|
||||
+ export const single = <T>() => T
|
||||
+ export const many = <T>() => () => T
|
||||
```
|
||||
Including the previous section, some names to symbols and data structures were altered to
|
||||
be better represented. view [changelog](/404.html)
|
||||
|
||||
## Context refactoring
|
||||
The context data structure has been internally altered to represent its dynamics better.
|
||||
31
blog/2023-01-12-mdx-blog-post.md
Normal file
31
blog/2023-01-12-mdx-blog-post.md
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
slug: 2.5.0
|
||||
title: Release 2.5.0
|
||||
authors: [jacoobes]
|
||||
tags: [release]
|
||||
---
|
||||
|
||||
## 2.5 Release
|
||||
|
||||
### Join our [discord](https://sern.dev/discord) <br />
|
||||
- Thank you for using sern in your projects. It's only going to get better!
|
||||
- I apologize for the sudden small breaking change. After this update, there won't be any for a while.
|
||||
Wow! We're increasing our semantic versioning by `+0.3.9` <br />
|
||||
What does this mean?
|
||||
### Breaking changes
|
||||
- [controller](../docs/api/modules#controller) parameter for plugins has been removed
|
||||
- You'll need to import it instead
|
||||
- This **breaks** old [CommandPlugin](../docs/api/interfaces/CommandPlugin), but **not** old [EventPlugin](../docs/api/interfaces/EventPlugin)
|
||||
### Deprecations
|
||||
- [CommandPlugin](../docs/api/interfaces/CommandPlugin) and [EventPlugin](../docs/api/interfaces/EventPlugin) have been renamed [InitPlugin](../docs/api/interfaces/InitPlugin) and [ControlPlugin](../docs/api/interfaces/ControlPlugin)
|
||||
|
||||
### Reason
|
||||
- The naming of plugins was getting too complex. For example, plugin naming evolved into CommandModuleCommandPlugin, CommandModuleEventPlugin and more.
|
||||
- I realize that this affects all plugins. I have updated all [plugins](https://github.com/sern-handler/awesome-plugins/pull/68) to match these changes
|
||||
- The old way of declaring plugins has been deprecated in favor of newer functions that facilitate and ease typings
|
||||
- [CommandControlPlugin](../docs/api/modules#commandcontrolplugin)
|
||||
- [CommandInitPlugin](../docs/api/modules#commandinitplugin)
|
||||
- [EventControlPlugin](../docs/api/modules#eventcontrolplugin)
|
||||
- [EventInitPlugin](../docs/api/modules#eventinitplugin)
|
||||
- [DiscordEventControlPlugin](../docs/api/modules#discordeventcontrolplugin)
|
||||
This will probably be the last breaking change in a while. Thanks for using sern!
|
||||
15
blog/authors.yml
Normal file
15
blog/authors.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
jacoobes:
|
||||
name: jacoobes
|
||||
title: Head Dev
|
||||
url: https://github.com/jacoobes
|
||||
image_url: https://github.com/jacoobes.png
|
||||
Sr Izan:
|
||||
name: Sr Izan
|
||||
title: Contributor
|
||||
url: https://github.com/SrIzan10
|
||||
image_url: https://github.com/SrIzan10.png
|
||||
Murtatrxx:
|
||||
name: Murtatrxx
|
||||
title: Developer
|
||||
url: https://github.com/Murtatrxx
|
||||
image_url: https://github.com/Murtatrxx.png
|
||||
1
docs/api/_category_.yml
Normal file
1
docs/api/_category_.yml
Normal file
@@ -0,0 +1 @@
|
||||
label: "API"
|
||||
69
docs/api/classes/CommandExecutable.md
Normal file
69
docs/api/classes/CommandExecutable.md
Normal file
@@ -0,0 +1,69 @@
|
||||
---
|
||||
id: "CommandExecutable"
|
||||
title: "Class: CommandExecutable<Type>"
|
||||
sidebar_label: "CommandExecutable"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
**`Experimental`**
|
||||
|
||||
Will be refactored / changed in future
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `Type` | extends [`CommandType`](../enums/CommandType.md) |
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new CommandExecutable**<`Type`\>()
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `Type` | extends [`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`[]\>[] = `[]`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:119](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sern.ts#L119)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• `Abstract` **type**: `Type`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:118](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sern.ts#L118)
|
||||
259
docs/api/classes/Context.md
Normal file
259
docs/api/classes/Context.md
Normal file
@@ -0,0 +1,259 @@
|
||||
---
|
||||
id: "Context"
|
||||
title: "Class: Context"
|
||||
sidebar_label: "Context"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Provides values shared between
|
||||
Message and ChatInputCommandInteraction
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• `Private` **new Context**(`ctx`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `Result`<`Message`<`boolean`\>, `ChatInputCommandInteraction`<`CacheType`\>\> |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:22](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L22)
|
||||
|
||||
## Accessors
|
||||
|
||||
### channel
|
||||
|
||||
• `get` **channel**(): ``null`` \| `TextBasedChannel`
|
||||
|
||||
#### Returns
|
||||
|
||||
``null`` \| `TextBasedChannel`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:45](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L45)
|
||||
|
||||
___
|
||||
|
||||
### client
|
||||
|
||||
• `get` **client**(): `Client`<`boolean`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Client`<`boolean`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:75](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L75)
|
||||
|
||||
___
|
||||
|
||||
### createdTimestamp
|
||||
|
||||
• `get` **createdTimestamp**(): `number`
|
||||
|
||||
#### Returns
|
||||
|
||||
`number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:56](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L56)
|
||||
|
||||
___
|
||||
|
||||
### guild
|
||||
|
||||
• `get` **guild**(): ``null`` \| `Guild`
|
||||
|
||||
#### Returns
|
||||
|
||||
``null`` \| `Guild`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:60](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L60)
|
||||
|
||||
___
|
||||
|
||||
### guildId
|
||||
|
||||
• `get` **guildId**(): ``null`` \| `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
``null`` \| `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:64](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L64)
|
||||
|
||||
___
|
||||
|
||||
### id
|
||||
|
||||
• `get` **id**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:41](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L41)
|
||||
|
||||
___
|
||||
|
||||
### inGuild
|
||||
|
||||
• `get` **inGuild**(): `boolean`
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:79](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L79)
|
||||
|
||||
___
|
||||
|
||||
### 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
|
||||
|
||||
#### Returns
|
||||
|
||||
`ChatInputCommandInteraction`<`CacheType`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### member
|
||||
|
||||
• `get` **member**(): ``null`` \| `GuildMember` \| `APIInteractionGuildMember`
|
||||
|
||||
#### Returns
|
||||
|
||||
``null`` \| `GuildMember` \| `APIInteractionGuildMember`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:71](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L71)
|
||||
|
||||
___
|
||||
|
||||
### 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
|
||||
|
||||
#### Returns
|
||||
|
||||
`Message`<`boolean`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:29](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L29)
|
||||
|
||||
___
|
||||
|
||||
### user
|
||||
|
||||
• `get` **user**(): `User`
|
||||
|
||||
If context is holding a message, message.author
|
||||
else, interaction.user
|
||||
|
||||
#### Returns
|
||||
|
||||
`User`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:52](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L52)
|
||||
|
||||
## Methods
|
||||
|
||||
### isMessage
|
||||
|
||||
▸ **isMessage**(): `boolean`
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:82](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L82)
|
||||
|
||||
___
|
||||
|
||||
### isSlash
|
||||
|
||||
▸ **isSlash**(): `boolean`
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:86](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L86)
|
||||
|
||||
___
|
||||
|
||||
### reply
|
||||
|
||||
▸ **reply**(`content`): `Promise`<`Message`<`boolean`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `content` | [`ReplyOptions`](../modules.md#replyoptions) |
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<`Message`<`boolean`\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:97](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L97)
|
||||
|
||||
___
|
||||
|
||||
### wrap
|
||||
|
||||
▸ `Static` **wrap**(`wrappable`): [`Context`](Context.md)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `wrappable` | `Message`<`boolean`\> \| `ChatInputCommandInteraction`<`CacheType`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Context`](Context.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:90](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/context.ts#L90)
|
||||
85
docs/api/classes/DefaultErrorHandling.md
Normal file
85
docs/api/classes/DefaultErrorHandling.md
Normal file
@@ -0,0 +1,85 @@
|
||||
---
|
||||
id: "DefaultErrorHandling"
|
||||
title: "Class: DefaultErrorHandling"
|
||||
sidebar_label: "DefaultErrorHandling"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Implements
|
||||
|
||||
- [`ErrorHandling`](../interfaces/ErrorHandling.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new DefaultErrorHandling**()
|
||||
|
||||
## Properties
|
||||
|
||||
### keepAlive
|
||||
|
||||
• **keepAlive**: `number` = `5`
|
||||
|
||||
Number of times the process should throw an error until crashing and exiting
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ErrorHandling](../interfaces/ErrorHandling.md).[keepAlive](../interfaces/ErrorHandling.md#keepalive)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:24](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/errorHandling.ts#L24)
|
||||
|
||||
## Methods
|
||||
|
||||
### crash
|
||||
|
||||
▸ **crash**(`error`): `never`
|
||||
|
||||
Utility function to crash
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `error` | `Error` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`never`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ErrorHandling](../interfaces/ErrorHandling.md).[crash](../interfaces/ErrorHandling.md#crash)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:25](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/errorHandling.ts#L25)
|
||||
|
||||
___
|
||||
|
||||
### updateAlive
|
||||
|
||||
▸ **updateAlive**(`e`): `void`
|
||||
|
||||
A function that is called on every crash. Updates keepAlive
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `e` | `Error` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ErrorHandling](../interfaces/ErrorHandling.md).[updateAlive](../interfaces/ErrorHandling.md#updatealive)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:28](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/errorHandling.ts#L28)
|
||||
127
docs/api/classes/DefaultLogging.md
Normal file
127
docs/api/classes/DefaultLogging.md
Normal file
@@ -0,0 +1,127 @@
|
||||
---
|
||||
id: "DefaultLogging"
|
||||
title: "Class: DefaultLogging"
|
||||
sidebar_label: "DefaultLogging"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Implements
|
||||
|
||||
- [`Logging`](../interfaces/Logging.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new DefaultLogging**()
|
||||
|
||||
## Methods
|
||||
|
||||
### date
|
||||
|
||||
▸ `Private` **date**(): `Date`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Date`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:11](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L11)
|
||||
|
||||
___
|
||||
|
||||
### debug
|
||||
|
||||
▸ **debug**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`unknown`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[Logging](../interfaces/Logging.md).[debug](../interfaces/Logging.md#debug)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:12](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L12)
|
||||
|
||||
___
|
||||
|
||||
### error
|
||||
|
||||
▸ **error**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`unknown`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[Logging](../interfaces/Logging.md).[error](../interfaces/Logging.md#error)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:16](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L16)
|
||||
|
||||
___
|
||||
|
||||
### info
|
||||
|
||||
▸ **info**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`unknown`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[Logging](../interfaces/Logging.md).[info](../interfaces/Logging.md#info)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:20](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L20)
|
||||
|
||||
___
|
||||
|
||||
### warning
|
||||
|
||||
▸ **warning**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`unknown`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[Logging](../interfaces/Logging.md).[warning](../interfaces/Logging.md#warning)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:24](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L24)
|
||||
81
docs/api/classes/DefaultModuleManager.md
Normal file
81
docs/api/classes/DefaultModuleManager.md
Normal file
@@ -0,0 +1,81 @@
|
||||
---
|
||||
id: "DefaultModuleManager"
|
||||
title: "Class: DefaultModuleManager"
|
||||
sidebar_label: "DefaultModuleManager"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Implements
|
||||
|
||||
- [`ModuleManager`](../interfaces/ModuleManager.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new DefaultModuleManager**(`moduleStore`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `moduleStore` | [`ModuleStore`](ModuleStore.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/moduleManager.ts:13](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/moduleManager.ts#L13)
|
||||
|
||||
## Methods
|
||||
|
||||
### get
|
||||
|
||||
▸ **get**<`T`\>(`strat`): `undefined` \| [`Processed`](../modules.md#processed)<[`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]\>
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends [`CommandType`](../enums/CommandType.md) |
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `strat` | (`ms`: [`ModuleStore`](ModuleStore.md)) => `undefined` \| [`Processed`](../modules.md#processed)<[`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`Processed`](../modules.md#processed)<[`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ModuleManager](../interfaces/ModuleManager.md).[get](../interfaces/ModuleManager.md#get)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/moduleManager.ts:14](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/moduleManager.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
### set
|
||||
|
||||
▸ **set**(`strat`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `strat` | (`ms`: [`ModuleStore`](ModuleStore.md)) => `void` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ModuleManager](../interfaces/ModuleManager.md).[set](../interfaces/ModuleManager.md#set)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/moduleManager.ts:20](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/moduleManager.ts#L20)
|
||||
69
docs/api/classes/EventExecutable.md
Normal file
69
docs/api/classes/EventExecutable.md
Normal file
@@ -0,0 +1,69 @@
|
||||
---
|
||||
id: "EventExecutable"
|
||||
title: "Class: EventExecutable<Type>"
|
||||
sidebar_label: "EventExecutable"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
**`Experimental`**
|
||||
|
||||
Will be refactored in future
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `Type` | extends [`EventType`](../enums/EventType.md) |
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new EventExecutable**<`Type`\>()
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `Type` | extends [`EventType`](../enums/EventType.md) |
|
||||
|
||||
## 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`[]\>[] = `[]`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:128](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sern.ts#L128)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• `Abstract` **type**: `Type`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:127](https://github.com/sern-handler/handler/blob/33f1446/src/handler/sern.ts#L127)
|
||||
85
docs/api/classes/ModuleStore.md
Normal file
85
docs/api/classes/ModuleStore.md
Normal file
@@ -0,0 +1,85 @@
|
||||
---
|
||||
id: "ModuleStore"
|
||||
title: "Class: ModuleStore"
|
||||
sidebar_label: "ModuleStore"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Storing all command modules
|
||||
This dependency is usually injected into ModuleManager
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new ModuleStore**()
|
||||
|
||||
## Properties
|
||||
|
||||
### ApplicationCommands
|
||||
|
||||
• `Readonly` **ApplicationCommands**: `Object`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `1` | `Map`<`string`, [`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)\>\> |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/moduleStore.ts:11](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/moduleStore.ts#L11)
|
||||
|
||||
___
|
||||
|
||||
### BothCommands
|
||||
|
||||
• `Readonly` **BothCommands**: `Map`<`string`, [`Processed`](../modules.md#processed)<[`CommandModule`](../modules.md#commandmodule)\>\>
|
||||
|
||||
#### 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)
|
||||
1213
docs/api/classes/SernEmitter.md
Normal file
1213
docs/api/classes/SernEmitter.md
Normal file
File diff suppressed because it is too large
Load Diff
2
docs/api/classes/_category_.yml
Normal file
2
docs/api/classes/_category_.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
label: "Classes"
|
||||
position: 3
|
||||
160
docs/api/enums/CommandType.md
Normal file
160
docs/api/enums/CommandType.md
Normal file
@@ -0,0 +1,160 @@
|
||||
---
|
||||
id: "CommandType"
|
||||
title: "Enumeration: CommandType"
|
||||
sidebar_label: "CommandType"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
A bitfield that discriminates command modules
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts
|
||||
export default commandModule({
|
||||
// highlight-next-line
|
||||
type : CommandType.Text,
|
||||
name : 'a text command'
|
||||
execute(message) {
|
||||
console.log(message.content)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### Both
|
||||
|
||||
• **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)
|
||||
|
||||
___
|
||||
|
||||
### Button
|
||||
|
||||
• **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)
|
||||
|
||||
___
|
||||
|
||||
### ChannelSelect
|
||||
|
||||
• **ChannelSelect** = ``256``
|
||||
|
||||
The CommandType for the other SelectMenuInteractions
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:52](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L52)
|
||||
|
||||
___
|
||||
|
||||
### CtxMsg
|
||||
|
||||
• **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)
|
||||
|
||||
___
|
||||
|
||||
### CtxUser
|
||||
|
||||
• **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)
|
||||
|
||||
___
|
||||
|
||||
### MentionableSelect
|
||||
|
||||
• **MentionableSelect** = ``512``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:53](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L53)
|
||||
|
||||
___
|
||||
|
||||
### Modal
|
||||
|
||||
• **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)
|
||||
|
||||
___
|
||||
|
||||
### RoleSelect
|
||||
|
||||
• **RoleSelect** = ``1024``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:54](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L54)
|
||||
|
||||
___
|
||||
|
||||
### Slash
|
||||
|
||||
• **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)
|
||||
|
||||
___
|
||||
|
||||
### StringSelect
|
||||
|
||||
• **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)
|
||||
|
||||
___
|
||||
|
||||
### Text
|
||||
|
||||
• **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)
|
||||
|
||||
___
|
||||
|
||||
### UserSelect
|
||||
|
||||
• **UserSelect** = ``2048``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:55](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/enums.ts#L55)
|
||||
59
docs/api/enums/EventType.md
Normal file
59
docs/api/enums/EventType.md
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
id: "EventType"
|
||||
title: "Enumeration: EventType"
|
||||
sidebar_label: "EventType"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
A bitfield that discriminates event modules
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts
|
||||
export default eventModule({
|
||||
//highlight-next-line
|
||||
type : EventType.Discord,
|
||||
name : 'guildMemberAdd'
|
||||
execute(member : GuildMember) {
|
||||
console.log(member)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### Discord
|
||||
|
||||
• **Discord** = ``1``
|
||||
|
||||
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)
|
||||
|
||||
___
|
||||
|
||||
### External
|
||||
|
||||
• **External** = ``3``
|
||||
|
||||
The EventType for handling external events.
|
||||
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)
|
||||
|
||||
___
|
||||
|
||||
### Sern
|
||||
|
||||
• **Sern** = ``2``
|
||||
|
||||
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)
|
||||
43
docs/api/enums/PayloadType.md
Normal file
43
docs/api/enums/PayloadType.md
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
id: "PayloadType"
|
||||
title: "Enumeration: PayloadType"
|
||||
sidebar_label: "PayloadType"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### Failure
|
||||
|
||||
• **Failure** = ``"failure"``
|
||||
|
||||
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)
|
||||
|
||||
___
|
||||
|
||||
### Success
|
||||
|
||||
• **Success** = ``"success"``
|
||||
|
||||
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)
|
||||
|
||||
___
|
||||
|
||||
### Warning
|
||||
|
||||
• **Warning** = ``"warning"``
|
||||
|
||||
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)
|
||||
73
docs/api/enums/PluginType.md
Normal file
73
docs/api/enums/PluginType.md
Normal file
@@ -0,0 +1,73 @@
|
||||
---
|
||||
id: "PluginType"
|
||||
title: "Enumeration: PluginType"
|
||||
sidebar_label: "PluginType"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
A bitfield that discriminates plugins
|
||||
|
||||
**`Example`**
|
||||
|
||||
```ts
|
||||
export default function myPlugin() : EventPlugin<CommandType.Text> {
|
||||
//highlight-next-line
|
||||
type : PluginType.Event,
|
||||
execute([ctx, args], controller) {
|
||||
return controller.next();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 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``
|
||||
|
||||
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)
|
||||
|
||||
___
|
||||
|
||||
### Init
|
||||
|
||||
• **Init** = ``1``
|
||||
|
||||
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)
|
||||
104
docs/api/enums/SernError.md
Normal file
104
docs/api/enums/SernError.md
Normal file
@@ -0,0 +1,104 @@
|
||||
---
|
||||
id: "SernError"
|
||||
title: "Enumeration: SernError"
|
||||
sidebar_label: "SernError"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### InvalidModuleType
|
||||
|
||||
• **InvalidModuleType** = ``"Detected an unknown module type"``
|
||||
|
||||
Throws when registering an invalid module.
|
||||
This means it is undefined or an invalid command type was provided
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:9](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/errors.ts#L9)
|
||||
|
||||
___
|
||||
|
||||
### MismatchEvent
|
||||
|
||||
• **MismatchEvent** = ``"You cannot use message when an interaction fired or vice versa"``
|
||||
|
||||
A crash that occurs when accessing an invalid property of Context
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:29](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/errors.ts#L29)
|
||||
|
||||
___
|
||||
|
||||
### MismatchModule
|
||||
|
||||
• **MismatchModule** = ``"A module type mismatched with event emitted!"``
|
||||
|
||||
Attempted to lookup module in command module store. Nothing was found!
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:17](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/errors.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
### MissingRequired
|
||||
|
||||
• **MissingRequired** = ``"@sern/client is required but was not found"``
|
||||
|
||||
Required Dependency not found
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/errors.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### NotSupportedInteraction
|
||||
|
||||
• **NotSupportedInteraction** = ``"This interaction is not supported."``
|
||||
|
||||
Unsupported interaction at this moment.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:21](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/errors.ts#L21)
|
||||
|
||||
___
|
||||
|
||||
### NotSupportedYet
|
||||
|
||||
• **NotSupportedYet** = ``"This feature is not supported yet"``
|
||||
|
||||
Unsupported feature attempted to access at this time
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:33](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/errors.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### PluginFailure
|
||||
|
||||
• **PluginFailure** = ``"A plugin failed to call controller.next()"``
|
||||
|
||||
One plugin called `controller.stop()` (end command execution / loading)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:25](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/errors.ts#L25)
|
||||
|
||||
___
|
||||
|
||||
### UndefinedModule
|
||||
|
||||
• **UndefinedModule** = ``"A module could not be detected"``
|
||||
|
||||
Attempted to lookup module in command module store. Nothing was found!
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/errors.ts:13](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/errors.ts#L13)
|
||||
2
docs/api/enums/_category_.yml
Normal file
2
docs/api/enums/_category_.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
label: "Enumerations"
|
||||
position: 2
|
||||
127
docs/api/index.md
Normal file
127
docs/api/index.md
Normal file
@@ -0,0 +1,127 @@
|
||||
---
|
||||
id: "index"
|
||||
title: "@sern/handler"
|
||||
sidebar_label: "Readme"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<img src="https://raw.githubusercontent.com/sern-handler/.github/main/banner.png" width="900px" />
|
||||
</div>
|
||||
|
||||
<h1 align="center">Handlers. Redefined.</h1>
|
||||
<h4 align="center">A customizable, batteries-included, powerful discord.js framework to streamline bot development.</h4>
|
||||
|
||||
<div align="center" styles="margin-top: 10px">
|
||||
<img src="https://img.shields.io/badge/open-source-brightgreen" />
|
||||
<a href="https://www.npmjs.com/package/@sern/handler"><img src="https://img.shields.io/npm/v/@sern/handler?maxAge=3600" alt="NPM version" /></a>
|
||||
<a href="https://www.npmjs.com/package/@sern/handler"><img src="https://img.shields.io/npm/dt/@sern/handler?maxAge=3600" alt="NPM downloads" /></a>
|
||||
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-brightgreen" alt="License MIT" /></a>
|
||||
<a href="https://sern.dev"><img alt="docs.rs" src="https://img.shields.io/docsrs/docs" /></a>
|
||||
<img alt="Lines of code" src="https://img.shields.io/badge/total%20lines-2k-blue" />
|
||||
</div>
|
||||
|
||||
## 📜 Installation
|
||||
|
||||
```sh
|
||||
npm install @sern/handler
|
||||
```
|
||||
|
||||
```sh
|
||||
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
|
||||
|
||||
#### ` 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
|
||||
]
|
||||
});
|
||||
export const useContainer = Sern.makeDependencies({
|
||||
build: root => root
|
||||
.add({ '@sern/client': single(client) })
|
||||
.add({ '@sern/logger': single(new DefaultLogging()) })
|
||||
});
|
||||
|
||||
//View docs for all options
|
||||
Sern.init({
|
||||
defaultPrefix: '!', // removing defaultPrefix will shut down text commands
|
||||
commands: 'src/commands',
|
||||
// events: 'src/events' (optional),
|
||||
containerConfig : {
|
||||
get: useContainer
|
||||
}
|
||||
});
|
||||
|
||||
client.login(token);
|
||||
```
|
||||
|
||||
#### ` 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.
|
||||
|
||||
## 💻 CLI
|
||||
|
||||
It is **highly encouraged** to use the [command line interface](https://github.com/sern-handler/cli) for your project. Don't forget to view it.
|
||||
|
||||
## 🔗 Links
|
||||
|
||||
- [Official Documentation and Guide](https://sern.dev)
|
||||
- [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.
|
||||
55
docs/api/interfaces/AutocompleteCommand.md
Normal file
55
docs/api/interfaces/AutocompleteCommand.md
Normal file
@@ -0,0 +1,55 @@
|
||||
---
|
||||
id: "AutocompleteCommand"
|
||||
title: "Interface: AutocompleteCommand"
|
||||
sidebar_label: "AutocompleteCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- `Omit`<[`Module`](Module.md), ``"name"`` \| ``"type"`` \| ``"plugins"`` \| ``"description"``\>
|
||||
|
||||
↳ **`AutocompleteCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `AutocompleteInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `AutocompleteInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
Omit.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:111](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L111)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Overrides
|
||||
|
||||
Omit.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:110](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L110)
|
||||
88
docs/api/interfaces/AutocompletePlugin.md
Normal file
88
docs/api/interfaces/AutocompletePlugin.md
Normal file
@@ -0,0 +1,88 @@
|
||||
---
|
||||
id: "AutocompletePlugin"
|
||||
title: "Interface: AutocompletePlugin"
|
||||
sidebar_label: "AutocompletePlugin"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Plugin`](Plugin.md)
|
||||
|
||||
↳ **`AutocompletePlugin`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Plugin](Plugin.md).[description](Plugin.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`autocmp`: `AutocompleteInteraction`<`CacheType`\>, `controlller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`autocmp`, `controlller`): `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `autocmp` | `AutocompleteInteraction`<`CacheType`\> |
|
||||
| `controlller` | [`Controller`](Controller.md) |
|
||||
|
||||
##### Returns
|
||||
|
||||
`Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:73](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L73)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Plugin](Plugin.md).[name](Plugin.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Event`](../enums/PluginType.md#event)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Plugin](Plugin.md).[type](Plugin.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:72](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L72)
|
||||
132
docs/api/interfaces/BothCommand.md
Normal file
132
docs/api/interfaces/BothCommand.md
Normal file
@@ -0,0 +1,132 @@
|
||||
---
|
||||
id: "BothCommand"
|
||||
title: "Interface: BothCommand"
|
||||
sidebar_label: "BothCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`BothCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### alias
|
||||
|
||||
• `Optional` **alias**: `string`[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:57](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L57)
|
||||
|
||||
___
|
||||
|
||||
### description
|
||||
|
||||
• **description**: `string`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:58](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L58)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: [`Context`](../classes/Context.md), `args`: [`Args`](../modules.md#args)) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`, `args`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | [`Context`](../classes/Context.md) |
|
||||
| `args` | [`Args`](../modules.md#args) |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:60](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L60)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### options
|
||||
|
||||
• `Optional` **options**: ([`SernSubCommandData`](SernSubCommandData.md) \| [`SernSubCommandGroupData`](SernSubCommandGroupData.md) \| [`BaseOptions`](../modules.md#baseoptions))[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:59](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L59)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Both`](../enums/CommandType.md#both)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:56](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L56)
|
||||
111
docs/api/interfaces/ButtonCommand.md
Normal file
111
docs/api/interfaces/ButtonCommand.md
Normal file
@@ -0,0 +1,111 @@
|
||||
---
|
||||
id: "ButtonCommand"
|
||||
title: "Interface: ButtonCommand"
|
||||
sidebar_label: "ButtonCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`ButtonCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `ButtonInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `ButtonInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:75](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L75)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Button`](../enums/CommandType.md#button)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:74](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L74)
|
||||
111
docs/api/interfaces/ChannelSelectCommand.md
Normal file
111
docs/api/interfaces/ChannelSelectCommand.md
Normal file
@@ -0,0 +1,111 @@
|
||||
---
|
||||
id: "ChannelSelectCommand"
|
||||
title: "Interface: ChannelSelectCommand"
|
||||
sidebar_label: "ChannelSelectCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`ChannelSelectCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `ChannelSelectMenuInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `ChannelSelectMenuInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:85](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L85)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`ChannelSelect`](../enums/CommandType.md#channelselect)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:84](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L84)
|
||||
72
docs/api/interfaces/CommandPlugin.md
Normal file
72
docs/api/interfaces/CommandPlugin.md
Normal file
@@ -0,0 +1,72 @@
|
||||
---
|
||||
id: "CommandPlugin"
|
||||
title: "Interface: CommandPlugin<T>"
|
||||
sidebar_label: "CommandPlugin"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
Use the newer helper functions and import { controller } from '@sern/handler'
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends [`CommandType`](../enums/CommandType.md) = [`CommandType`](../enums/CommandType.md) |
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:51](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L51)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`m`: [`InitArgs`](InitArgs.md)<[`Processed`](../modules.md#processed)<[`CommandModule`](../modules.md#commandmodule)\>\>, `controller?`: [`Deprecated`](../modules.md#deprecated)<``"Please import controller instead"``\>) => [`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`m`, `controller?`): [`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `m` | [`InitArgs`](InitArgs.md)<[`Processed`](../modules.md#processed)<[`CommandModule`](../modules.md#commandmodule)\>\> |
|
||||
| `controller?` | [`Deprecated`](../modules.md#deprecated)<``"Please import controller instead"``\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
[`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:53](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L53)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:50](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L50)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Init`](../enums/PluginType.md#init)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:52](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L52)
|
||||
111
docs/api/interfaces/ContextMenuMsg.md
Normal file
111
docs/api/interfaces/ContextMenuMsg.md
Normal file
@@ -0,0 +1,111 @@
|
||||
---
|
||||
id: "ContextMenuMsg"
|
||||
title: "Interface: ContextMenuMsg"
|
||||
sidebar_label: "ContextMenuMsg"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`ContextMenuMsg`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `MessageContextMenuCommandInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `MessageContextMenuCommandInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:70](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L70)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`CtxMsg`](../enums/CommandType.md#ctxmsg)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:69](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L69)
|
||||
111
docs/api/interfaces/ContextMenuUser.md
Normal file
111
docs/api/interfaces/ContextMenuUser.md
Normal file
@@ -0,0 +1,111 @@
|
||||
---
|
||||
id: "ContextMenuUser"
|
||||
title: "Interface: ContextMenuUser"
|
||||
sidebar_label: "ContextMenuUser"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`ContextMenuUser`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `UserContextMenuCommandInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `UserContextMenuCommandInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:65](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L65)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`CtxUser`](../enums/CommandType.md#ctxuser)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:64](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L64)
|
||||
47
docs/api/interfaces/ControlPlugin.md
Normal file
47
docs/api/interfaces/ControlPlugin.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
id: "ControlPlugin"
|
||||
title: "Interface: ControlPlugin<Args>"
|
||||
sidebar_label: "ControlPlugin"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `Args` | extends `any`[] = `any`[] |
|
||||
|
||||
## Properties
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (...`args`: `Args`) => [`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (...`args`): [`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...args` | `Args` |
|
||||
|
||||
##### Returns
|
||||
|
||||
[`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:39](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L39)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Event`](../enums/PluginType.md#event)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L38)
|
||||
43
docs/api/interfaces/Controller.md
Normal file
43
docs/api/interfaces/Controller.md
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
id: "Controller"
|
||||
title: "Interface: Controller"
|
||||
sidebar_label: "Controller"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### next
|
||||
|
||||
• **next**: () => `Ok`<`void`\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (): `Ok`<`void`\>
|
||||
|
||||
##### Returns
|
||||
|
||||
`Ok`<`void`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:25](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L25)
|
||||
|
||||
___
|
||||
|
||||
### stop
|
||||
|
||||
• **stop**: () => `Err`<`void`\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (): `Err`<`void`\>
|
||||
|
||||
##### Returns
|
||||
|
||||
`Err`<`void`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:26](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L26)
|
||||
67
docs/api/interfaces/Dependencies.md
Normal file
67
docs/api/interfaces/Dependencies.md
Normal file
@@ -0,0 +1,67 @@
|
||||
---
|
||||
id: "Dependencies"
|
||||
title: "Interface: Dependencies"
|
||||
sidebar_label: "Dependencies"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### @sern/client
|
||||
|
||||
• **@sern/client**: [`Singleton`](../modules.md#singleton)<`__module`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:40](https://github.com/sern-handler/handler/blob/33f1446/src/types/handler.ts#L40)
|
||||
|
||||
___
|
||||
|
||||
### @sern/emitter
|
||||
|
||||
• **@sern/emitter**: [`Singleton`](../modules.md#singleton)<[`SernEmitter`](../classes/SernEmitter.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:42](https://github.com/sern-handler/handler/blob/33f1446/src/types/handler.ts#L42)
|
||||
|
||||
___
|
||||
|
||||
### @sern/errors
|
||||
|
||||
• **@sern/errors**: [`Singleton`](../modules.md#singleton)<[`ErrorHandling`](ErrorHandling.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:45](https://github.com/sern-handler/handler/blob/33f1446/src/types/handler.ts#L45)
|
||||
|
||||
___
|
||||
|
||||
### @sern/logger
|
||||
|
||||
• `Optional` **@sern/logger**: [`Singleton`](../modules.md#singleton)<[`Logging`](Logging.md)<`unknown`\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:41](https://github.com/sern-handler/handler/blob/33f1446/src/types/handler.ts#L41)
|
||||
|
||||
___
|
||||
|
||||
### @sern/modules
|
||||
|
||||
• **@sern/modules**: [`Singleton`](../modules.md#singleton)<[`ModuleManager`](ModuleManager.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:44](https://github.com/sern-handler/handler/blob/33f1446/src/types/handler.ts#L44)
|
||||
|
||||
___
|
||||
|
||||
### @sern/store
|
||||
|
||||
• **@sern/store**: [`Singleton`](../modules.md#singleton)<[`ModuleStore`](../classes/ModuleStore.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:43](https://github.com/sern-handler/handler/blob/33f1446/src/types/handler.ts#L43)
|
||||
47
docs/api/interfaces/DependencyConfiguration.md
Normal file
47
docs/api/interfaces/DependencyConfiguration.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
id: "DependencyConfiguration"
|
||||
title: "Interface: DependencyConfiguration<T>"
|
||||
sidebar_label: "DependencyConfiguration"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends [`Dependencies`](Dependencies.md) |
|
||||
|
||||
## Properties
|
||||
|
||||
### build
|
||||
|
||||
• **build**: (`root`: `Container`<`Omit`<[`Dependencies`](Dependencies.md), ``"@sern/client"``\>, {}\>) => `Container`<`T`, {}\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`root`): `Container`<`T`, {}\>
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `root` | `Container`<`Omit`<[`Dependencies`](Dependencies.md), ``"@sern/client"``\>, {}\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`Container`<`T`, {}\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:68](https://github.com/sern-handler/handler/blob/33f1446/src/types/handler.ts#L68)
|
||||
|
||||
___
|
||||
|
||||
### exclude
|
||||
|
||||
• `Optional` **exclude**: `Set`<``"@sern/logger"``\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:67](https://github.com/sern-handler/handler/blob/33f1446/src/types/handler.ts#L67)
|
||||
90
docs/api/interfaces/DiscordEmitterPlugin.md
Normal file
90
docs/api/interfaces/DiscordEmitterPlugin.md
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
id: "DiscordEmitterPlugin"
|
||||
title: "Interface: DiscordEmitterPlugin"
|
||||
sidebar_label: "DiscordEmitterPlugin"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Plugin`](Plugin.md)
|
||||
|
||||
↳ **`DiscordEmitterPlugin`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Plugin](Plugin.md).[description](Plugin.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`payload`: { `absPath`: `string` ; `mod`: `DiscordEventCommand`<keyof `ClientEvents`\> & { `name`: `string` } }, `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`payload`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | `Object` |
|
||||
| `payload.absPath` | `string` |
|
||||
| `payload.mod` | `DiscordEventCommand`<keyof `ClientEvents`\> & { `name`: `string` } |
|
||||
| `controller` | [`Controller`](Controller.md) |
|
||||
|
||||
##### Returns
|
||||
|
||||
`Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:49](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L49)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Plugin](Plugin.md).[name](Plugin.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Command`](../enums/PluginType.md#command)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Plugin](Plugin.md).[type](Plugin.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:48](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L48)
|
||||
113
docs/api/interfaces/DiscordEventCommand.md
Normal file
113
docs/api/interfaces/DiscordEventCommand.md
Normal file
@@ -0,0 +1,113 @@
|
||||
---
|
||||
id: "DiscordEventCommand"
|
||||
title: "Interface: DiscordEventCommand<T>"
|
||||
sidebar_label: "DiscordEventCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends keyof `ClientEvents` = keyof `ClientEvents` |
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`DiscordEventCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `T`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:123](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L123)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Discord`](../enums/EventType.md#discord)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:124](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L124)
|
||||
|
||||
## Methods
|
||||
|
||||
### execute
|
||||
|
||||
▸ **execute**(...`args`): `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...args` | `ClientEvents`[`T`] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:125](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L125)
|
||||
94
docs/api/interfaces/DiscordEventPlugin.md
Normal file
94
docs/api/interfaces/DiscordEventPlugin.md
Normal file
@@ -0,0 +1,94 @@
|
||||
---
|
||||
id: "DiscordEventPlugin"
|
||||
title: "Interface: DiscordEventPlugin<T>"
|
||||
sidebar_label: "DiscordEventPlugin"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends keyof `ClientEvents` = keyof `ClientEvents` |
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Plugin`](Plugin.md)
|
||||
|
||||
↳ **`DiscordEventPlugin`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Plugin](Plugin.md).[description](Plugin.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`args`: `ClientEvents`[`T`], `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`args`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `args` | `ClientEvents`[`T`] |
|
||||
| `controller` | [`Controller`](Controller.md) |
|
||||
|
||||
##### Returns
|
||||
|
||||
`Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:105](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L105)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `T`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Plugin](Plugin.md).[name](Plugin.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:103](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L103)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Event`](../enums/PluginType.md#event)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Plugin](Plugin.md).[type](Plugin.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:104](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L104)
|
||||
67
docs/api/interfaces/ErrorHandling.md
Normal file
67
docs/api/interfaces/ErrorHandling.md
Normal file
@@ -0,0 +1,67 @@
|
||||
---
|
||||
id: "ErrorHandling"
|
||||
title: "Interface: ErrorHandling"
|
||||
sidebar_label: "ErrorHandling"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`DefaultErrorHandling`](../classes/DefaultErrorHandling.md)
|
||||
|
||||
## Properties
|
||||
|
||||
### keepAlive
|
||||
|
||||
• **keepAlive**: `number`
|
||||
|
||||
Number of times the process should throw an error until crashing and exiting
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:8](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/errorHandling.ts#L8)
|
||||
|
||||
## Methods
|
||||
|
||||
### crash
|
||||
|
||||
▸ **crash**(`error`): `never`
|
||||
|
||||
Utility function to crash
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `error` | `Error` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`never`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:14](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/errorHandling.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
### updateAlive
|
||||
|
||||
▸ **updateAlive**(`error`): `void`
|
||||
|
||||
A function that is called on every crash. Updates keepAlive
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `error` | `Error` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:20](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/errorHandling.ts#L20)
|
||||
72
docs/api/interfaces/EventPlugin.md
Normal file
72
docs/api/interfaces/EventPlugin.md
Normal file
@@ -0,0 +1,72 @@
|
||||
---
|
||||
id: "EventPlugin"
|
||||
title: "Interface: EventPlugin<T>"
|
||||
sidebar_label: "EventPlugin"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
Use the newer helper functions
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends [`CommandType`](../enums/CommandType.md) |
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:61](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L61)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`args`: [`CommandArgs`](../modules.md#commandargs)<`T`, [`Event`](../enums/PluginType.md#event)\>, `controller?`: [`Controller`](Controller.md)) => [`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`args`, `controller?`): [`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `args` | [`CommandArgs`](../modules.md#commandargs)<`T`, [`Event`](../enums/PluginType.md#event)\> |
|
||||
| `controller?` | [`Controller`](Controller.md) |
|
||||
|
||||
##### Returns
|
||||
|
||||
[`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:63](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L63)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:60](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L60)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Event`](../enums/PluginType.md#event)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:62](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L62)
|
||||
90
docs/api/interfaces/ExternalEmitterPlugin.md
Normal file
90
docs/api/interfaces/ExternalEmitterPlugin.md
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
id: "ExternalEmitterPlugin"
|
||||
title: "Interface: ExternalEmitterPlugin"
|
||||
sidebar_label: "ExternalEmitterPlugin"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Plugin`](Plugin.md)
|
||||
|
||||
↳ **`ExternalEmitterPlugin`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Plugin](Plugin.md).[description](Plugin.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`payload`: { `absPath`: `string` ; `mod`: `ExternalEventCommand` & { `name`: `string` } }, `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`payload`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | `Object` |
|
||||
| `payload.absPath` | `string` |
|
||||
| `payload.mod` | `ExternalEventCommand` & { `name`: `string` } |
|
||||
| `controller` | [`Controller`](Controller.md) |
|
||||
|
||||
##### Returns
|
||||
|
||||
`Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:57](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L57)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Plugin](Plugin.md).[name](Plugin.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Command`](../enums/PluginType.md#command)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Plugin](Plugin.md).[type](Plugin.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:56](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L56)
|
||||
117
docs/api/interfaces/ExternalEventCommand.md
Normal file
117
docs/api/interfaces/ExternalEventCommand.md
Normal file
@@ -0,0 +1,117 @@
|
||||
---
|
||||
id: "ExternalEventCommand"
|
||||
title: "Interface: ExternalEventCommand"
|
||||
sidebar_label: "ExternalEventCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`ExternalEventCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### emitter
|
||||
|
||||
• **emitter**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:130](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L130)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:129](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L129)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`External`](../enums/EventType.md#external)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:131](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L131)
|
||||
|
||||
## Methods
|
||||
|
||||
### execute
|
||||
|
||||
▸ **execute**(...`args`): `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...args` | `unknown`[] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:132](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L132)
|
||||
88
docs/api/interfaces/ExternalEventPlugin.md
Normal file
88
docs/api/interfaces/ExternalEventPlugin.md
Normal file
@@ -0,0 +1,88 @@
|
||||
---
|
||||
id: "ExternalEventPlugin"
|
||||
title: "Interface: ExternalEventPlugin"
|
||||
sidebar_label: "ExternalEventPlugin"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Plugin`](Plugin.md)
|
||||
|
||||
↳ **`ExternalEventPlugin`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Plugin](Plugin.md).[description](Plugin.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`args`: `unknown`[], `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`args`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `args` | `unknown`[] |
|
||||
| `controller` | [`Controller`](Controller.md) |
|
||||
|
||||
##### Returns
|
||||
|
||||
`Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:99](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L99)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Plugin](Plugin.md).[name](Plugin.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Event`](../enums/PluginType.md#event)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Plugin](Plugin.md).[type](Plugin.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:98](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L98)
|
||||
33
docs/api/interfaces/InitArgs.md
Normal file
33
docs/api/interfaces/InitArgs.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
id: "InitArgs"
|
||||
title: "Interface: InitArgs<T>"
|
||||
sidebar_label: "InitArgs"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends [`Processed`](../modules.md#processed)<[`Module`](Module.md)\> |
|
||||
|
||||
## Properties
|
||||
|
||||
### absPath
|
||||
|
||||
• **absPath**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/args.ts:106](https://github.com/sern-handler/handler/blob/33f1446/src/handler/plugins/args.ts#L106)
|
||||
|
||||
___
|
||||
|
||||
### module
|
||||
|
||||
• **module**: `T`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/args.ts:105](https://github.com/sern-handler/handler/blob/33f1446/src/handler/plugins/args.ts#L105)
|
||||
47
docs/api/interfaces/InitPlugin.md
Normal file
47
docs/api/interfaces/InitPlugin.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
id: "InitPlugin"
|
||||
title: "Interface: InitPlugin<Args>"
|
||||
sidebar_label: "InitPlugin"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `Args` | extends `any`[] = `any`[] |
|
||||
|
||||
## Properties
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (...`args`: `Args`) => [`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (...`args`): [`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...args` | `Args` |
|
||||
|
||||
##### Returns
|
||||
|
||||
[`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Init`](../enums/PluginType.md#init)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:34](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L34)
|
||||
97
docs/api/interfaces/Logging.md
Normal file
97
docs/api/interfaces/Logging.md
Normal file
@@ -0,0 +1,97 @@
|
||||
---
|
||||
id: "Logging"
|
||||
title: "Interface: Logging<T>"
|
||||
sidebar_label: "Logging"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | `unknown` |
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`DefaultLogging`](../classes/DefaultLogging.md)
|
||||
|
||||
## Methods
|
||||
|
||||
### debug
|
||||
|
||||
▸ **debug**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`T`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:7](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L7)
|
||||
|
||||
___
|
||||
|
||||
### error
|
||||
|
||||
▸ **error**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`T`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:4](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L4)
|
||||
|
||||
___
|
||||
|
||||
### info
|
||||
|
||||
▸ **info**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`T`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:6](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L6)
|
||||
|
||||
___
|
||||
|
||||
### warning
|
||||
|
||||
▸ **warning**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`T`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:5](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/logging.ts#L5)
|
||||
111
docs/api/interfaces/MentionableSelectCommand.md
Normal file
111
docs/api/interfaces/MentionableSelectCommand.md
Normal file
@@ -0,0 +1,111 @@
|
||||
---
|
||||
id: "MentionableSelectCommand"
|
||||
title: "Interface: MentionableSelectCommand"
|
||||
sidebar_label: "MentionableSelectCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`MentionableSelectCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `MentionableSelectMenuInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `MentionableSelectMenuInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:95](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L95)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`MentionableSelect`](../enums/CommandType.md#mentionableselect)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:94](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L94)
|
||||
111
docs/api/interfaces/ModalSubmitCommand.md
Normal file
111
docs/api/interfaces/ModalSubmitCommand.md
Normal file
@@ -0,0 +1,111 @@
|
||||
---
|
||||
id: "ModalSubmitCommand"
|
||||
title: "Interface: ModalSubmitCommand"
|
||||
sidebar_label: "ModalSubmitCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`ModalSubmitCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `ModalSubmitInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `ModalSubmitInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:105](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L105)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Modal`](../enums/CommandType.md#modal)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:104](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L104)
|
||||
115
docs/api/interfaces/Module.md
Normal file
115
docs/api/interfaces/Module.md
Normal file
@@ -0,0 +1,115 @@
|
||||
---
|
||||
id: "Module"
|
||||
title: "Interface: Module"
|
||||
sidebar_label: "Module"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- **`Module`**
|
||||
|
||||
↳ [`TextCommand`](TextCommand.md)
|
||||
|
||||
↳ [`SlashCommand`](SlashCommand.md)
|
||||
|
||||
↳ [`BothCommand`](BothCommand.md)
|
||||
|
||||
↳ [`ContextMenuUser`](ContextMenuUser.md)
|
||||
|
||||
↳ [`ContextMenuMsg`](ContextMenuMsg.md)
|
||||
|
||||
↳ [`ButtonCommand`](ButtonCommand.md)
|
||||
|
||||
↳ [`StringSelectCommand`](StringSelectCommand.md)
|
||||
|
||||
↳ [`ChannelSelectCommand`](ChannelSelectCommand.md)
|
||||
|
||||
↳ [`RoleSelectCommand`](RoleSelectCommand.md)
|
||||
|
||||
↳ [`MentionableSelectCommand`](MentionableSelectCommand.md)
|
||||
|
||||
↳ [`UserSelectCommand`](UserSelectCommand.md)
|
||||
|
||||
↳ [`ModalSubmitCommand`](ModalSubmitCommand.md)
|
||||
|
||||
↳ [`SernEventCommand`](SernEventCommand.md)
|
||||
|
||||
↳ [`DiscordEventCommand`](DiscordEventCommand.md)
|
||||
|
||||
↳ [`ExternalEventCommand`](ExternalEventCommand.md)
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (...`args`: `any`[]) => `any`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (...`args`): `any`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...args` | `any`[] |
|
||||
|
||||
##### Returns
|
||||
|
||||
`any`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:39](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L39)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`CommandType`](../enums/CommandType.md) \| [`EventType`](../enums/EventType.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:34](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L34)
|
||||
57
docs/api/interfaces/ModuleManager.md
Normal file
57
docs/api/interfaces/ModuleManager.md
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
id: "ModuleManager"
|
||||
title: "Interface: ModuleManager"
|
||||
sidebar_label: "ModuleManager"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`DefaultModuleManager`](../classes/DefaultModuleManager.md)
|
||||
|
||||
## Methods
|
||||
|
||||
### get
|
||||
|
||||
▸ **get**<`T`\>(`strat`): `undefined` \| [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends [`CommandType`](../enums/CommandType.md) |
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `strat` | (`ms`: [`ModuleStore`](../classes/ModuleStore.md)) => `undefined` \| [`Processed`](../modules.md#processed)<[`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/moduleManager.ts:6](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/moduleManager.ts#L6)
|
||||
|
||||
___
|
||||
|
||||
### set
|
||||
|
||||
▸ **set**(`strat`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `strat` | (`ms`: [`ModuleStore`](../classes/ModuleStore.md)) => `void` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/moduleManager.ts:9](https://github.com/sern-handler/handler/blob/33f1446/src/handler/contracts/moduleManager.ts#L9)
|
||||
47
docs/api/interfaces/Plugin.md
Normal file
47
docs/api/interfaces/Plugin.md
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
id: "Plugin"
|
||||
title: "Interface: Plugin<Args>"
|
||||
sidebar_label: "Plugin"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `Args` | extends `any`[] = `any`[] |
|
||||
|
||||
## Properties
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (...`args`: `Args`) => [`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (...`args`): [`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...args` | `Args` |
|
||||
|
||||
##### Returns
|
||||
|
||||
[`PluginResult`](../modules.md#pluginresult)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:30](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L30)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`PluginType`](../enums/PluginType.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/plugin.ts:29](https://github.com/sern-handler/handler/blob/33f1446/src/types/plugin.ts#L29)
|
||||
111
docs/api/interfaces/RoleSelectCommand.md
Normal file
111
docs/api/interfaces/RoleSelectCommand.md
Normal file
@@ -0,0 +1,111 @@
|
||||
---
|
||||
id: "RoleSelectCommand"
|
||||
title: "Interface: RoleSelectCommand"
|
||||
sidebar_label: "RoleSelectCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`RoleSelectCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `RoleSelectMenuInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `RoleSelectMenuInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:90](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L90)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`RoleSelect`](../enums/CommandType.md#roleselect)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:89](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L89)
|
||||
113
docs/api/interfaces/SernAutocompleteData.md
Normal file
113
docs/api/interfaces/SernAutocompleteData.md
Normal file
@@ -0,0 +1,113 @@
|
||||
---
|
||||
id: "SernAutocompleteData"
|
||||
title: "Interface: SernAutocompleteData"
|
||||
sidebar_label: "SernAutocompleteData"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- `Omit`<`BaseApplicationCommandOptionsData`, ``"autocomplete"``\>
|
||||
|
||||
↳ **`SernAutocompleteData`**
|
||||
|
||||
## Properties
|
||||
|
||||
### autocomplete
|
||||
|
||||
• **autocomplete**: ``true``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:177](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L177)
|
||||
|
||||
___
|
||||
|
||||
### command
|
||||
|
||||
• **command**: [`AutocompleteCommand`](AutocompleteCommand.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:182](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L182)
|
||||
|
||||
___
|
||||
|
||||
### description
|
||||
|
||||
• **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
Omit.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4200
|
||||
|
||||
___
|
||||
|
||||
### descriptionLocalizations
|
||||
|
||||
• `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`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
Omit.descriptionLocalizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4201
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
Omit.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4198
|
||||
|
||||
___
|
||||
|
||||
### nameLocalizations
|
||||
|
||||
• `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`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
Omit.nameLocalizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4199
|
||||
|
||||
___
|
||||
|
||||
### required
|
||||
|
||||
• `Optional` **required**: `boolean`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
Omit.required
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4202
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: `String` \| `Integer` \| `Number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:178](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L178)
|
||||
90
docs/api/interfaces/SernEmitterPlugin.md
Normal file
90
docs/api/interfaces/SernEmitterPlugin.md
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
id: "SernEmitterPlugin"
|
||||
title: "Interface: SernEmitterPlugin"
|
||||
sidebar_label: "SernEmitterPlugin"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Plugin`](Plugin.md)
|
||||
|
||||
↳ **`SernEmitterPlugin`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Plugin](Plugin.md).[description](Plugin.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`payload`: { `absPath`: `string` ; `mod`: `SernEventCommand`<keyof [`SernEventsMapping`](../modules.md#serneventsmapping)\> & { `name`: `string` } }, `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`payload`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | `Object` |
|
||||
| `payload.absPath` | `string` |
|
||||
| `payload.mod` | `SernEventCommand`<keyof [`SernEventsMapping`](../modules.md#serneventsmapping)\> & { `name`: `string` } |
|
||||
| `controller` | [`Controller`](Controller.md) |
|
||||
|
||||
##### Returns
|
||||
|
||||
`Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:65](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L65)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Plugin](Plugin.md).[name](Plugin.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Command`](../enums/PluginType.md#command)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Plugin](Plugin.md).[type](Plugin.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:64](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L64)
|
||||
113
docs/api/interfaces/SernEventCommand.md
Normal file
113
docs/api/interfaces/SernEventCommand.md
Normal file
@@ -0,0 +1,113 @@
|
||||
---
|
||||
id: "SernEventCommand"
|
||||
title: "Interface: SernEventCommand<T>"
|
||||
sidebar_label: "SernEventCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends keyof [`SernEventsMapping`](../modules.md#serneventsmapping) = keyof [`SernEventsMapping`](../modules.md#serneventsmapping) |
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`SernEventCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `T`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:116](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L116)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Sern`](../enums/EventType.md#sern)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:117](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L117)
|
||||
|
||||
## Methods
|
||||
|
||||
### execute
|
||||
|
||||
▸ **execute**(...`args`): `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...args` | [`SernEventsMapping`](../modules.md#serneventsmapping)[`T`] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:118](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L118)
|
||||
94
docs/api/interfaces/SernEventPlugin.md
Normal file
94
docs/api/interfaces/SernEventPlugin.md
Normal file
@@ -0,0 +1,94 @@
|
||||
---
|
||||
id: "SernEventPlugin"
|
||||
title: "Interface: SernEventPlugin<T>"
|
||||
sidebar_label: "SernEventPlugin"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends keyof [`SernEventsMapping`](../modules.md#serneventsmapping) = keyof [`SernEventsMapping`](../modules.md#serneventsmapping) |
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Plugin`](Plugin.md)
|
||||
|
||||
↳ **`SernEventPlugin`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Plugin](Plugin.md).[description](Plugin.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`args`: [`SernEventsMapping`](../modules.md#serneventsmapping)[`T`], `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`args`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `args` | [`SernEventsMapping`](../modules.md#serneventsmapping)[`T`] |
|
||||
| `controller` | [`Controller`](Controller.md) |
|
||||
|
||||
##### Returns
|
||||
|
||||
`Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:91](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L91)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `T`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Plugin](Plugin.md).[name](Plugin.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:89](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L89)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Event`](../enums/PluginType.md#event)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Plugin](Plugin.md).[type](Plugin.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:90](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L90)
|
||||
117
docs/api/interfaces/SernSubCommandData.md
Normal file
117
docs/api/interfaces/SernSubCommandData.md
Normal file
@@ -0,0 +1,117 @@
|
||||
---
|
||||
id: "SernSubCommandData"
|
||||
title: "Interface: SernSubCommandData"
|
||||
sidebar_label: "SernSubCommandData"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- `BaseApplicationCommandOptionsData`
|
||||
|
||||
↳ **`SernSubCommandData`**
|
||||
|
||||
## Properties
|
||||
|
||||
### autocomplete
|
||||
|
||||
• `Optional` **autocomplete**: `undefined`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.autocomplete
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4203
|
||||
|
||||
___
|
||||
|
||||
### description
|
||||
|
||||
• **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4200
|
||||
|
||||
___
|
||||
|
||||
### descriptionLocalizations
|
||||
|
||||
• `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`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.descriptionLocalizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4201
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4198
|
||||
|
||||
___
|
||||
|
||||
### nameLocalizations
|
||||
|
||||
• `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`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.nameLocalizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4199
|
||||
|
||||
___
|
||||
|
||||
### options
|
||||
|
||||
• `Optional` **options**: [`BaseOptions`](../modules.md#baseoptions)[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:214](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L214)
|
||||
|
||||
___
|
||||
|
||||
### required
|
||||
|
||||
• `Optional` **required**: `undefined`
|
||||
|
||||
#### Overrides
|
||||
|
||||
BaseApplicationCommandOptionsData.required
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:213](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L213)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: `Subcommand`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:212](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L212)
|
||||
117
docs/api/interfaces/SernSubCommandGroupData.md
Normal file
117
docs/api/interfaces/SernSubCommandGroupData.md
Normal file
@@ -0,0 +1,117 @@
|
||||
---
|
||||
id: "SernSubCommandGroupData"
|
||||
title: "Interface: SernSubCommandGroupData"
|
||||
sidebar_label: "SernSubCommandGroupData"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- `BaseApplicationCommandOptionsData`
|
||||
|
||||
↳ **`SernSubCommandGroupData`**
|
||||
|
||||
## Properties
|
||||
|
||||
### autocomplete
|
||||
|
||||
• `Optional` **autocomplete**: `undefined`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.autocomplete
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4203
|
||||
|
||||
___
|
||||
|
||||
### description
|
||||
|
||||
• **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4200
|
||||
|
||||
___
|
||||
|
||||
### descriptionLocalizations
|
||||
|
||||
• `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`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.descriptionLocalizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4201
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4198
|
||||
|
||||
___
|
||||
|
||||
### nameLocalizations
|
||||
|
||||
• `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`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.nameLocalizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/.pnpm/discord.js@14.7.1/node_modules/discord.js/typings/index.d.ts:4199
|
||||
|
||||
___
|
||||
|
||||
### options
|
||||
|
||||
• `Optional` **options**: [`SernSubCommandData`](SernSubCommandData.md)[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:220](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L220)
|
||||
|
||||
___
|
||||
|
||||
### required
|
||||
|
||||
• `Optional` **required**: `undefined`
|
||||
|
||||
#### Overrides
|
||||
|
||||
BaseApplicationCommandOptionsData.required
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:219](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L219)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: `SubcommandGroup`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:218](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L218)
|
||||
122
docs/api/interfaces/SlashCommand.md
Normal file
122
docs/api/interfaces/SlashCommand.md
Normal file
@@ -0,0 +1,122 @@
|
||||
---
|
||||
id: "SlashCommand"
|
||||
title: "Interface: SlashCommand"
|
||||
sidebar_label: "SlashCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`SlashCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• **description**: `string`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:50](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L50)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: [`Context`](../classes/Context.md), `args`: [``"slash"``, [`SlashOptions`](../modules.md#slashoptions)]) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`, `args`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | [`Context`](../classes/Context.md) |
|
||||
| `args` | [``"slash"``, [`SlashOptions`](../modules.md#slashoptions)] |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:52](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L52)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### options
|
||||
|
||||
• `Optional` **options**: ([`SernSubCommandData`](SernSubCommandData.md) \| [`SernSubCommandGroupData`](SernSubCommandGroupData.md) \| [`BaseOptions`](../modules.md#baseoptions))[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:51](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L51)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Slash`](../enums/CommandType.md#slash)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:49](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L49)
|
||||
111
docs/api/interfaces/StringSelectCommand.md
Normal file
111
docs/api/interfaces/StringSelectCommand.md
Normal file
@@ -0,0 +1,111 @@
|
||||
---
|
||||
id: "StringSelectCommand"
|
||||
title: "Interface: StringSelectCommand"
|
||||
sidebar_label: "StringSelectCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`StringSelectCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `StringSelectMenuInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `StringSelectMenuInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:80](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L80)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`StringSelect`](../enums/CommandType.md#stringselect)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:79](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L79)
|
||||
122
docs/api/interfaces/TextCommand.md
Normal file
122
docs/api/interfaces/TextCommand.md
Normal file
@@ -0,0 +1,122 @@
|
||||
---
|
||||
id: "TextCommand"
|
||||
title: "Interface: TextCommand"
|
||||
sidebar_label: "TextCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`TextCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### alias
|
||||
|
||||
• `Optional` **alias**: `string`[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:44](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L44)
|
||||
|
||||
___
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: [`Context`](../classes/Context.md), `args`: [``"text"``, `string`[]]) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`, `args`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | [`Context`](../classes/Context.md) |
|
||||
| `args` | [``"text"``, `string`[]] |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:45](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L45)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Text`](../enums/CommandType.md#text)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:43](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L43)
|
||||
111
docs/api/interfaces/UserSelectCommand.md
Normal file
111
docs/api/interfaces/UserSelectCommand.md
Normal file
@@ -0,0 +1,111 @@
|
||||
---
|
||||
id: "UserSelectCommand"
|
||||
title: "Interface: UserSelectCommand"
|
||||
sidebar_label: "UserSelectCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`UserSelectCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `UserSelectMenuInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `UserSelectMenuInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:100](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L100)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[onEvent](Module.md#onevent)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[plugins](Module.md#plugins)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`UserSelect`](../enums/CommandType.md#userselect)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:99](https://github.com/sern-handler/handler/blob/33f1446/src/types/module.ts#L99)
|
||||
55
docs/api/interfaces/Wrapper.md
Normal file
55
docs/api/interfaces/Wrapper.md
Normal file
@@ -0,0 +1,55 @@
|
||||
---
|
||||
id: "Wrapper"
|
||||
title: "Interface: Wrapper"
|
||||
sidebar_label: "Wrapper"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
An object to be passed into Sern#init() function.
|
||||
|
||||
## Properties
|
||||
|
||||
### commands
|
||||
|
||||
• `Readonly` **commands**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/wrapper.ts:9](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/wrapper.ts#L9)
|
||||
|
||||
___
|
||||
|
||||
### containerConfig
|
||||
|
||||
• `Readonly` **containerConfig**: `Object`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `get` | (...`keys`: keyof [`Dependencies`](Dependencies.md)[]) => `unknown`[] |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/wrapper.ts:11](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/wrapper.ts#L11)
|
||||
|
||||
___
|
||||
|
||||
### defaultPrefix
|
||||
|
||||
• `Optional` `Readonly` **defaultPrefix**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/wrapper.ts:8](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/wrapper.ts#L8)
|
||||
|
||||
___
|
||||
|
||||
### events
|
||||
|
||||
• `Optional` `Readonly` **events**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/wrapper.ts:10](https://github.com/sern-handler/handler/blob/33f1446/src/handler/structures/wrapper.ts#L10)
|
||||
2
docs/api/interfaces/_category_.yml
Normal file
2
docs/api/interfaces/_category_.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
label: "Interfaces"
|
||||
position: 4
|
||||
1032
docs/api/modules.md
Normal file
1032
docs/api/modules.md
Normal file
File diff suppressed because it is too large
Load Diff
120
docs/api/namespaces/Sern.md
Normal file
120
docs/api/namespaces/Sern.md
Normal file
@@ -0,0 +1,120 @@
|
||||
---
|
||||
id: "Sern"
|
||||
title: "Namespace: Sern"
|
||||
sidebar_label: "Sern"
|
||||
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)
|
||||
|
||||
___
|
||||
|
||||
### controller
|
||||
|
||||
Re-exports [controller](../modules.md#controller)
|
||||
|
||||
___
|
||||
|
||||
### discordEvent
|
||||
|
||||
Re-exports [discordEvent](../modules.md#discordevent)
|
||||
|
||||
___
|
||||
|
||||
### eventModule
|
||||
|
||||
Re-exports [eventModule](../modules.md#eventmodule-1)
|
||||
|
||||
## Functions
|
||||
|
||||
### init
|
||||
|
||||
▸ **init**(`wrapper`): `void`
|
||||
|
||||
**`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 |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### 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)
|
||||
2
docs/api/namespaces/_category_.yml
Normal file
2
docs/api/namespaces/_category_.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
label: "Namespaces"
|
||||
position: 1
|
||||
0
docs/guide/.nojekyll
Normal file
0
docs/guide/.nojekyll
Normal file
25
docs/guide/README.md
Normal file
25
docs/guide/README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Introduction
|
||||
|
||||
Welcome to our official guide. This guide will go through all the core features of the framework.
|
||||
- 💖 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 v14 is the only supported library at the moment
|
||||
|
||||
## You will learn
|
||||
* [sern's goal](walkthrough/goal.md)
|
||||
* 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)
|
||||
|
||||
### Working with plugins
|
||||
* [Plugins](walkthrough/plugins.md)
|
||||
- [Command Plugins](walkthrough/plugins.md#command-plugins)
|
||||
- [Event Plugins](walkthrough/plugins.md#event-plugins)
|
||||
### Events
|
||||
* [The SernEmitter class](walkthrough/sern-emitter.md)
|
||||
* [Your first event](walkthrough/first-event.md)
|
||||
|
||||
### Good to know
|
||||
* [sern.config.json](walkthrough/good-to-know.md)
|
||||
9
docs/guide/getting-started/choose-ide.md
Normal file
9
docs/guide/getting-started/choose-ide.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Choosing an IDE
|
||||
|
||||
Choosing an IDE is a matter of personal preference. The following are some
|
||||
suggestions for choosing an IDE:
|
||||
|
||||
* [Visual Studio Code](https://code.visualstudio.com)
|
||||
* [Sublime Text](https://www.sublimetext.com/)
|
||||
* [NotePad++](https://notepad-plus-plus.org/)
|
||||
|
||||
16
docs/guide/getting-started/preparing.md
Normal file
16
docs/guide/getting-started/preparing.md
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
# Preparing to Code
|
||||
|
||||
After installing and 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
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
|
||||
If you want to do more with our CLI, continue reading our guides.
|
||||
34
docs/guide/walkthrough/cli.md
Normal file
34
docs/guide/walkthrough/cli.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# CLI
|
||||
|
||||
Setting up the [CLI](https://github.com/sern-handler/cli) is easy. <br />
|
||||
- To start a brand-new project, run :
|
||||
```sh
|
||||
sern init (-y)
|
||||
```
|
||||
|
||||
:::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.
|
||||
|
||||
- To install extra utilities into your project
|
||||
```
|
||||
sern extra
|
||||
```
|
||||
|
||||
8
docs/guide/walkthrough/conclusion.md
Normal file
8
docs/guide/walkthrough/conclusion.md
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
sidebar_position: 8
|
||||
---
|
||||
|
||||
# Conclusion
|
||||
If you reached this far, thank you for reading! We hope you have learned the necessities you need
|
||||
to create a bot with the sern framework. If you have any other questions, bugs, feature requests, concerns, please join our
|
||||
[community server](https://sern.dev/discord), and we'll be glad to answer your questions.
|
||||
115
docs/guide/walkthrough/first-command.md
Normal file
115
docs/guide/walkthrough/first-command.md
Normal file
@@ -0,0 +1,115 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# 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
|
||||
import { commandModule, CommandType } from '@sern/handler';
|
||||
|
||||
export default commandModule({
|
||||
type: CommandType.Both,
|
||||
plugins: [],
|
||||
description: 'A ping command',
|
||||
// alias : [],
|
||||
execute: async (ctx, args) => {
|
||||
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 🏓');
|
||||
},
|
||||
})
|
||||
```
|
||||
To view what each of these properties mean in depth, visit the [official documentation](https://sern.dev/docs/api/enums/CommandType).
|
||||
### Types of command modules
|
||||
Every command module `type` is part of an enum. This field allows type inference for the rest of a module's fields. <br />
|
||||
All the command types can be found in the [official documentation](https://sern.dev/docs/api/enums/CommandType)!
|
||||
<p>So, lets say you want to make a command module that listens to modals. </p>
|
||||
|
||||
**Note**: Keep in mind you'll need to send a modal with a custom id `dm-me`. This example below is the response to a modal being sent.
|
||||
<br />
|
||||
|
||||
Typescript:
|
||||
```typescript
|
||||
import { commandModule, CommandType } from '@sern/handler';
|
||||
export 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' })
|
||||
}
|
||||
});
|
||||
```
|
||||
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' })
|
||||
}
|
||||
});
|
||||
```
|
||||
Commands are straight forward. Keep in mind, every other property on the commandModule object is
|
||||
optional **except** the type and execute function.
|
||||
|
||||
# Context class
|
||||
The provided Context class helps with modules of `CommandType.Both` (A mixture of slash / legacy commands).
|
||||
|
||||
The Context class is passed into modules with type:
|
||||
- `CommandType.Both`
|
||||
- `CommandType.Slash`
|
||||
- `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!
|
||||
}
|
||||
});
|
||||
```
|
||||
63
docs/guide/walkthrough/first-event.md
Normal file
63
docs/guide/walkthrough/first-event.md
Normal file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# 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:
|
||||
```javascript
|
||||
exports.default = eventModule({
|
||||
type: EventType.Sern,
|
||||
plugins : [], //NOT SUPPORTED YET!!
|
||||
name: 'module.activate',
|
||||
execute(event) {
|
||||
console.log(event);
|
||||
}
|
||||
})
|
||||
```
|
||||
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.
|
||||
|
||||
### Another example of an event module
|
||||
|
||||
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}`);
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
Javascript:
|
||||
```javascript
|
||||
|
||||
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}`);
|
||||
}
|
||||
})
|
||||
```
|
||||
9
docs/guide/walkthrough/goal.md
Normal file
9
docs/guide/walkthrough/goal.md
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
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.
|
||||
24
docs/guide/walkthrough/good-to-know.md
Normal file
24
docs/guide/walkthrough/good-to-know.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
sidebar_position: 7
|
||||
---
|
||||
|
||||
# Good to know
|
||||
|
||||
## sern.config.json
|
||||
<p>A sern.config.json, although not necessary, allows your project to communicate with our cli.</p>
|
||||
|
||||
For example, when installing typescript plugins, the language property is necessary to install from our
|
||||
[open source repository](https://github.com/sern-handler/awesome-plugins). <br />
|
||||
|
||||
Using the cli and running `sern init --sync` on pre-existing projects should install this json file in the root directory given.
|
||||
Or, if this is a brand-new project, `sern init` automatically installs it.
|
||||
|
||||
```json
|
||||
{
|
||||
"language": "typescript",
|
||||
"paths": {
|
||||
"base": "src",
|
||||
"commands": "commands"
|
||||
}
|
||||
}
|
||||
```
|
||||
157
docs/guide/walkthrough/plugins.md
Normal file
157
docs/guide/walkthrough/plugins.md
Normal file
@@ -0,0 +1,157 @@
|
||||
---
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
# 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>
|
||||
|
||||
|
||||
<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();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<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.
|
||||
|
||||
<br /> At the moment, there are two types of plugins:
|
||||
|
||||
- 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 {
|
||||
next: () => Ok<void>;
|
||||
stop: () => Err<void>;
|
||||
}
|
||||
```
|
||||
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) {
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
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 />
|
||||
- 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.
|
||||
|
||||
<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`.
|
||||
- Before an event occurs, this command module will check if the user has the id `182326315813306368`.
|
||||
|
||||
:::tip
|
||||
Event Plugins are good for filtering, preconditions, parsing.
|
||||
:::
|
||||
|
||||
If all plugins return `controller.next()`, this command replies `Pong 🏓`
|
||||
14
docs/guide/walkthrough/sern-emitter.md
Normal file
14
docs/guide/walkthrough/sern-emitter.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
sidebar_position: 6
|
||||
---
|
||||
|
||||
# The SernEmitter class
|
||||
You're shipped with the SernEmitter. This EventEmitter listens to
|
||||
- command modules executing and its status, the `module.activate` event
|
||||
- command modules registered and its status, the `module.register` event
|
||||
- On default, sern creates a single SernEmitter for your bot process.
|
||||
- any error that occurs, the `error` event
|
||||
- `warn` events, where it is possible to throw errors
|
||||
|
||||
You can put these and other event listeners into [event modules](./first-event.md)!
|
||||
<br/>View all <a href="https://sern.dev/docs/api/modules#serneventsmapping">events</a>
|
||||
16
docs/intro.md
Normal file
16
docs/intro.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
sidebar_position: 0
|
||||
---
|
||||
|
||||
# Welcome!
|
||||
|
||||
## Content
|
||||
- [/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!
|
||||
|
||||
:::tip
|
||||
This site is open source! Please do contribute if you find any bugs, typos, or sections in need of improvements.
|
||||
:::
|
||||
:::tip
|
||||
If you have problems, join the discord server [here](https://sern.dev/discord)
|
||||
:::
|
||||
175
docusaurus.config.js
Normal file
175
docusaurus.config.js
Normal file
@@ -0,0 +1,175 @@
|
||||
// @ts-check
|
||||
// Note: type annotations allow type checking and IDEs autocompletion
|
||||
|
||||
const lightCodeTheme = require('prism-react-renderer/themes/nightOwlLight');
|
||||
const darkCodeTheme = require('prism-react-renderer/themes/oceanicNext');
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
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',
|
||||
baseUrl: '/',
|
||||
onBrokenLinks: 'ignore',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
favicon: '/img/favicon.ico', // this currently not working
|
||||
|
||||
// GitHub pages deployment config.
|
||||
// If you aren't using GitHub pages, you don't need these.
|
||||
organizationName: 'sern-handler', // Usually your GitHub org/user name.
|
||||
projectName: 'website', // Usually your repo name.
|
||||
deploymentBranch: 'main',
|
||||
trailingSlash: false,
|
||||
|
||||
// Even if you don't use internalization, you can use this field to set useful
|
||||
// metadata like html lang. For example, if your site is Chinese, you may want
|
||||
// to replace "en" with "zh-Hans".
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en', 'fr', 'tr'],
|
||||
},
|
||||
|
||||
presets: [
|
||||
[
|
||||
'classic',
|
||||
/** @type {import('@docusaurus/preset-classic').Options} */
|
||||
({
|
||||
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/',
|
||||
},
|
||||
blog: {
|
||||
showReadingTime: true,
|
||||
// Please change this to your repo.
|
||||
// Remove this to remove the "edit this page" links.
|
||||
editUrl:
|
||||
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
||||
},
|
||||
pages : {
|
||||
path: 'src/pages',
|
||||
routeBasePath: '/',
|
||||
include: ['**/*.{js,jsx,ts,tsx,md,mdx}'],
|
||||
exclude: [
|
||||
'**/_*.{js,jsx,ts,tsx,md,mdx}',
|
||||
'**/_*/**',
|
||||
'**/*.test.{js,jsx,ts,tsx}',
|
||||
'**/__tests__/**',
|
||||
],
|
||||
},
|
||||
theme: {
|
||||
customCss: require.resolve('./src/css/custom.css'),
|
||||
},
|
||||
}),
|
||||
],
|
||||
],
|
||||
|
||||
themeConfig:
|
||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||
({
|
||||
navbar: {
|
||||
title: 'Home',
|
||||
logo: {
|
||||
alt: 'logo logo',
|
||||
src: 'img/favicon.ico',
|
||||
},
|
||||
items: [
|
||||
{
|
||||
type: 'doc',
|
||||
docId: 'intro',
|
||||
position: 'left',
|
||||
label: 'Docs & Guide',
|
||||
},
|
||||
{to: '/blog', label: 'Blog', position: 'left'},
|
||||
{
|
||||
href: 'https://github.com/sern-handler',
|
||||
label: 'GitHub',
|
||||
position: 'right',
|
||||
},
|
||||
{
|
||||
to: '/plugins',
|
||||
label: 'Plugins',
|
||||
position: 'left'
|
||||
}
|
||||
],
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
links: [
|
||||
{
|
||||
title: 'Information',
|
||||
items: [
|
||||
{
|
||||
label: 'Docs & Guide',
|
||||
to: '/docs/intro',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'Community',
|
||||
items: [
|
||||
{
|
||||
label: 'Stack Overflow',
|
||||
href: 'https://stackoverflow.com/questions/tagged/sern-handler',
|
||||
},
|
||||
{
|
||||
label: 'Discord',
|
||||
href: 'https://discord.gg/DwbF5H5JgQ',
|
||||
},
|
||||
{
|
||||
label : 'Open Collective',
|
||||
href: 'https://opencollective.com/sern'
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'More',
|
||||
items: [
|
||||
{
|
||||
label: 'Blog',
|
||||
to: '/blog',
|
||||
},
|
||||
{
|
||||
label: 'GitHub',
|
||||
href: 'https://github.com/sern-handler',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
copyright: `Built with ❤️ by the sern Handler team and its contributors`,
|
||||
},
|
||||
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:url', content: 'https://sern.dev' },
|
||||
{ name: 'og:type', content: 'website' },
|
||||
{ name: 'twitter:card', content: 'summary_large_image' },
|
||||
{ name: 'twitter:site', content: '@sern-handler' },
|
||||
{ name: 'twitter:title', content: 'sern - Handlers. Redefined.' },
|
||||
{ name: 'twitter:description', content: 'A customizable, batteries-included, powerful discord.js framework to automate and streamline bot development' },
|
||||
{ name: 'twitter:image', content: './assets/images/logo.png' },
|
||||
{ name: 'twitter:url', content: 'https://sern.dev' },
|
||||
{ name: 'theme-color', content: '#cb547c' }
|
||||
],
|
||||
prism: {
|
||||
theme: lightCodeTheme,
|
||||
darkTheme: darkCodeTheme,
|
||||
},
|
||||
}),
|
||||
plugins : [
|
||||
process.env.TEST
|
||||
? [
|
||||
'docusaurus-plugin-typedoc',
|
||||
{
|
||||
//if you're editing website, please change this to your local branch of sern to generate documentation
|
||||
entryPoints: ['../handler/src/index.ts'],
|
||||
tsconfig: '../handler/tsconfig-esm.json',
|
||||
},
|
||||
] : []
|
||||
]
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
71
index.html
71
index.html
@@ -1,71 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Sern - A batteries-included & powerful discord.js framework</title>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/>
|
||||
<link rel="stylesheet" href="assets/css/style.css">
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
||||
<link rel="shortcut icon" href="assets/images/icon.png" type="image/x-icon"/>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.3/font/bootstrap-icons.css">
|
||||
|
||||
<meta name="og:title" content="Sern - A batteries-included & powerful discord.js framework">
|
||||
<meta name="og:description" content="A customizable, batteries-included, powerful discord.js framework to automate and streamline bot development">
|
||||
<meta name="og:image" content="assets/images/icon.png">
|
||||
<meta name="og:url" content="https://github.com/sern-handler/handler">
|
||||
<meta name="og:type" content="website">
|
||||
|
||||
<script src="assets/js/main.js"></script>
|
||||
</head>
|
||||
<body class="user-select-none">
|
||||
<nav class="navbar navbar-expand-lg py-1.25 navbar-light bg-light shadow-rm">
|
||||
<div class="container">
|
||||
<a href="#" class="navbar-brand">
|
||||
<img src="assets/images/logo.png" width="42" height="40" alt="" class="d-inline-block align-middle mr-2">
|
||||
<span class="text font-weight-bold font-family-ubuntu hover-zoom">SernHandlerㅤ</span>
|
||||
<span>7 <i class="bi bi-star-fill padding-7px"></i>・270 <i class="bi bi-cloud-arrow-down-fill"></i></span>
|
||||
</a>
|
||||
|
||||
<button type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation" class="navbar-toggler"><span class="navbar-toggler-icon"></span></button>
|
||||
|
||||
<div id="navbarSupportedContent" class="collapse navbar-collapse">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-puzzle-fill mr-2"></i>Plugins (UD)</a></li>
|
||||
<li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-github mr-2"></i>Github Profile</a></li>
|
||||
<li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-compass-fill mr-2"></i>Guide</a></li>
|
||||
<li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-bookmarks-fill mr-2"></i>Documentation</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<header class="masthead">
|
||||
<div class="container px-5">
|
||||
<div class="row gx-5 align-items-center">
|
||||
<div class="col-lg-6">
|
||||
<div class="mb-5 mb-lg-0 text-center text-lg-start">
|
||||
<h1 class="display-1 lh-1 mb-3 fw-bold text-bold">Handlers. Redefined.</h1>
|
||||
<p class="lead fw-normal text-muted mb-5 text-align-left">With the support of the community made plugins and powerful CLI, it's more than just a handler.</p>
|
||||
<div class="d-flex flex-column flex-lg-row align-items-center">
|
||||
<img class="app-badge" src="assets/images/R.png" alt="..." /><p class="fw-bold font-family-ubuntu text ml-2 mt-3 qi">• npm install @sern/handler</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="masthead-device-mockup">
|
||||
<div class="device-wrapper">
|
||||
<div class="device" data-device="iPhoneX" data-orientation="portrait" data-color="black">
|
||||
<div class="screen">
|
||||
<img src="assets/images/logo.png" class="hero-img" height="120%">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</body>
|
||||
</html>
|
||||
4
netlify.toml
Normal file
4
netlify.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
[build]
|
||||
publish = "/build"
|
||||
command = "npm run build"
|
||||
environment = { TEST = "yeah" }
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user