Compare commits
307 Commits
1.1
...
feat/quick
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
67154cedd5 | ||
|
|
3e032e70d8 | ||
|
|
e714241ecc | ||
|
|
73e1a4f39c | ||
|
|
1f66a7d195 | ||
|
|
c0b74d72ab | ||
|
|
2a01fe44fa | ||
|
|
66c8858533 | ||
|
|
69a4f07e8b | ||
|
|
af0eea3dd1 | ||
| b3096c1072 | |||
| 425d7cc739 | |||
| 49f1ea6b57 | |||
| 90cea45453 | |||
| bfaf83d60c | |||
|
|
087b8aee86 | ||
|
|
b793b8ca77 | ||
|
|
c1773b8b40 | ||
|
|
3e3cc36ec8 | ||
|
|
54d269375c | ||
|
|
663410eaed | ||
|
|
515d2ced78 | ||
|
|
8e9d895d1a | ||
|
|
5055daac9b | ||
|
|
1da3e57866 | ||
|
|
9d2c3f6582 | ||
|
|
d5cee30e4f | ||
|
|
daabc51b93 | ||
|
|
3abe33b75d | ||
|
|
cafecdc532 | ||
|
|
b4284e4d1a | ||
|
|
21f70725bb | ||
|
|
bdedc81993 | ||
|
|
c3c16be90f | ||
|
|
d16c8f7e64 | ||
|
|
a8118c58dc | ||
| 34864fecea | |||
|
|
29d61f7b0e | ||
|
|
9e17b952b5 | ||
| cca08b8812 | |||
|
|
aaff2a0c49 | ||
|
|
b016cf1665 | ||
|
|
4542c9263d | ||
|
|
74ee21ffc6 | ||
| 2bfe4bc6c1 | |||
|
|
57fdb2ba6c | ||
|
|
28c2a3d29f | ||
| 9dcc8d587d | |||
| 4f4a28e9d5 | |||
|
|
ddf443f51e | ||
|
|
d6a3ddc48f | ||
|
|
8d7d356bd5 | ||
|
|
15d6008ba3 | ||
|
|
3a3370b635 | ||
|
|
0ac2b02e24 | ||
|
|
6329c6802a | ||
|
|
2d1f133bca | ||
|
|
d25c1ed4ac | ||
|
|
b4a95d374f | ||
|
|
fbd5688aa8 | ||
|
|
1687538a71 | ||
|
|
1f6bd9f315 | ||
|
|
134ac19836 | ||
|
|
3fa02ec79a | ||
|
|
a1955894ee | ||
|
|
1ee9099ede | ||
|
|
d85822601d | ||
|
|
3ed7e3fefd | ||
|
|
85b93e01cf | ||
|
|
00e63c260f | ||
| 92fccd1e63 | |||
|
|
8e7dfd7a7e | ||
|
|
b5dc4f4cb1 | ||
|
|
df7616482b | ||
|
|
c4f0c16b36 | ||
|
|
c1542d8346 | ||
|
|
9077a640c0 | ||
|
|
7ea8d0bcfe | ||
|
|
68ee39407b | ||
|
|
f6b3fd038b | ||
|
|
2349813860 | ||
|
|
0deed60247 | ||
|
|
30137eafaf | ||
|
|
3dc5b74cbe | ||
|
|
c93e38fe6c | ||
|
|
27d3feab67 | ||
|
|
5678001351 | ||
|
|
966a5b5727 | ||
|
|
3907687e2b | ||
|
|
e540a14dd9 | ||
|
|
c13abec8e0 | ||
|
|
7309c321ea | ||
|
|
95e79d3969 | ||
|
|
e1a0d47153 | ||
|
|
b9aa726564 | ||
|
|
58509a86ce | ||
|
|
b2d44cf58e | ||
|
|
2a086abb09 | ||
|
|
85ecc72418 | ||
|
|
2e769800dd | ||
|
|
b524fa7008 | ||
|
|
fb736be2d2 | ||
|
|
5abf123935 | ||
|
|
ee8d2b3960 | ||
|
|
05838646ca | ||
|
|
591f7ba61f | ||
|
|
9c193b14c8 | ||
|
|
1d05d9a29b | ||
|
|
b33e3ddb8c | ||
|
|
0b28832000 | ||
|
|
ead095ba61 | ||
|
|
ae0f356f78 | ||
|
|
92435fd3cf | ||
|
|
01a5a70c3f | ||
|
|
5ac909e1aa | ||
|
|
79cbe92934 | ||
|
|
1a029fdc23 | ||
|
|
184e56486e | ||
|
|
761579a09c | ||
|
|
b3b98676c4 | ||
|
|
1c6c0f8ec5 | ||
|
|
8b177a8f40 | ||
|
|
e5efba21db | ||
|
|
50c086e6ec | ||
|
|
a055d098eb | ||
|
|
bec379b882 | ||
|
|
1c0ef3b273 | ||
|
|
e43df2f5a7 | ||
|
|
812788e610 | ||
|
|
ad25263a7d | ||
|
|
6de5b4c7a6 | ||
|
|
55715a2a84 | ||
|
|
f43a51c7b1 | ||
|
|
441af2e4aa | ||
|
|
96e71610ad | ||
|
|
deec96d45d | ||
|
|
136a8f4f43 | ||
|
|
bc59a4ae9b | ||
|
|
f581fb260d | ||
|
|
fdf1d78c92 | ||
|
|
09b55ae035 | ||
|
|
397f028c9f | ||
|
|
128b32b261 | ||
|
|
301e60a0ef | ||
|
|
f044bf3819 | ||
|
|
93772f5b84 | ||
|
|
a441e57439 | ||
|
|
a2fc1f66c0 | ||
|
|
39f5be584e | ||
|
|
2513e3e233 | ||
|
|
c83dbf2f94 | ||
|
|
e6ffca3bc8 | ||
|
|
529e6fccf5 | ||
|
|
40a2e39fc8 | ||
|
|
b6c9174230 | ||
|
|
b0f713b312 | ||
|
|
46f0d12e87 | ||
|
|
ff5c732ecf | ||
|
|
c5a80836be | ||
|
|
6ff3328990 | ||
|
|
9780e9349b | ||
|
|
01164761a9 | ||
|
|
2529e1c9c2 | ||
|
|
fd4fd9ee03 | ||
|
|
54c49c239a | ||
| 3955337bee | |||
|
|
f6f60dee0d | ||
| 5b6f7c4647 | |||
| 5c998e8505 | |||
| b03ff6a2be | |||
| e217af622e | |||
|
|
90f1dd6d41 | ||
|
|
bfee22f66d | ||
|
|
efd1bb09a5 | ||
|
|
af9e70c515 | ||
|
|
6d3b0163e4 | ||
|
|
afc48eae3c | ||
|
|
85341b03d6 | ||
|
|
7e389c8efa | ||
|
|
d97855e5dd | ||
|
|
03aa453f63 | ||
|
|
e25146788b | ||
|
|
4d00dabc55 | ||
|
|
2081a2d63a | ||
|
|
5f574edd6f | ||
|
|
71feb7e9c3 | ||
|
|
a229f2cc6d | ||
|
|
ebf13ede37 | ||
|
|
c3cb994eae | ||
|
|
54943e37aa | ||
|
|
b29faf80ea | ||
|
|
b850f7d25a | ||
|
|
ee2066632e | ||
|
|
5bae733dff | ||
|
|
bb190f2d81 | ||
|
|
767acedea7 | ||
|
|
1c3a1c5587 | ||
|
|
24e7497555 | ||
|
|
63ba2ac1e0 | ||
| 71f4a22c0c | |||
| db15c21617 | |||
| 33932ee255 | |||
| 5d04413dbe | |||
|
|
b6c2a3c92e | ||
| aba602380d | |||
| aebc4fd49c | |||
|
|
48423d7a89 | ||
|
|
83d3877102 | ||
|
|
e2ffc93116 | ||
| 78be0a3faa | |||
|
|
208061040f | ||
|
|
71735a778e | ||
|
|
23ed21fbf7 | ||
|
|
62ebeec1d9 | ||
|
|
7821e065e6 | ||
|
|
bc9c900197 | ||
|
|
d14ca62954 | ||
|
|
7dd24d8a6e | ||
|
|
c9d8ef511a | ||
|
|
1e14ce2a76 | ||
|
|
6907748dbf | ||
|
|
ae72c3eedc | ||
|
|
a69e19503c | ||
|
|
edd1d1492d | ||
|
|
92959c3319 | ||
|
|
b14a033c86 | ||
|
|
55a691e787 | ||
|
|
0bd5ab15cb | ||
| 4cd89d146f | |||
| a37d077848 | |||
| 7e444894c7 | |||
| c0b5631bc7 | |||
|
|
6fb9c98a47 | ||
|
|
c7a06a0779 | ||
|
|
c047c3b1cc | ||
|
|
a48f96841a | ||
|
|
828471eba7 | ||
|
|
1b49dc80b5 | ||
|
|
82605f326b | ||
|
|
3b5795c0e6 | ||
|
|
f2388eb23d | ||
|
|
948b3bb8cf | ||
| ce43790214 | |||
|
|
3eb3690232 | ||
|
|
74b259e1b6 | ||
|
|
76eb15c793 | ||
|
|
2689b95e85 | ||
|
|
e64667b31c | ||
|
|
749b706a02 | ||
|
|
2f757710e1 | ||
|
|
d77ee3f7f5 | ||
|
|
1d142db329 | ||
|
|
71f100d079 | ||
|
|
0b8de88344 | ||
|
|
bfc4d6ac8e | ||
|
|
b06251f499 | ||
|
|
19db611a9b | ||
|
|
ef452e678a | ||
|
|
c7a8611476 | ||
|
|
9802586bf7 | ||
|
|
d59674eca2 | ||
|
|
9168f61c09 | ||
|
|
c1d64d1172 | ||
|
|
2b3cdc2374 | ||
|
|
530a622c36 | ||
|
|
c46f074926 | ||
|
|
3cc8b38390 | ||
|
|
ef6420a669 | ||
|
|
e10e6cbd2f | ||
|
|
d531eb7340 | ||
|
|
332399bb43 | ||
|
|
b97bc9dde7 | ||
|
|
d447a40f98 | ||
|
|
eca35e1309 | ||
|
|
44645d89de | ||
|
|
66bdaf7f9f | ||
|
|
d9a69a4b6b | ||
|
|
70ff70a1bf | ||
|
|
59b6096423 | ||
|
|
ee11018d48 | ||
|
|
e547c0f485 | ||
| 75140b3d38 | |||
|
|
f1917da3e6 | ||
|
|
7a80638a1b | ||
|
|
4c6b6f9177 | ||
|
|
49a910f90a | ||
|
|
05e470b99b | ||
|
|
ebe5c84ba3 | ||
|
|
a4d12af7f2 | ||
|
|
b8377ec5a4 | ||
|
|
b8be42b1d7 | ||
|
|
9eebee836a | ||
|
|
64adb7b0ca | ||
|
|
51a9774b58 | ||
|
|
4feb242b61 | ||
| 24a2098402 | |||
|
|
6ab8f09271 | ||
|
|
04a7824983 | ||
|
|
994f0ca0e8 | ||
|
|
a60c20545e | ||
|
|
9923ad226d | ||
|
|
a418273592 | ||
|
|
cefbc62823 | ||
|
|
437b8759cb | ||
|
|
7e0c9c012f | ||
|
|
9087c085c4 | ||
|
|
adfbe3b8a4 |
39
.github/workflows/docusaurus.yml
vendored
@@ -1,39 +0,0 @@
|
||||
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
|
||||
31
.github/workflows/github-pages.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Deploy to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy to GitHub Pages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Install Dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Build
|
||||
run: bun run build
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.AUTOMATA_TOKEN }}
|
||||
publish_dir: ./dist
|
||||
user_name: sernbot
|
||||
user_email: ${{ secrets.AUTOMATA_EMAIL }}
|
||||
34
.github/workflows/lunaria.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
name: Lunaria
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize]
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
lunaria-overview:
|
||||
name: Generate Lunaria Overview
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Install Dependencies
|
||||
run: bun install
|
||||
|
||||
- name: Generate Lunaria Overview
|
||||
uses: yanthomasdev/lunaria-action@main
|
||||
with:
|
||||
token: ${{ secrets.AUTOMATA_TOKEN }}
|
||||
34
.gitignore
vendored
@@ -1,20 +1,24 @@
|
||||
# Dependencies
|
||||
/node_modules
|
||||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# Production
|
||||
/build
|
||||
|
||||
# Generated files
|
||||
.docusaurus
|
||||
.cache-loader
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
||||
# logs
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
|
||||
# environment variables
|
||||
.env
|
||||
.env.production
|
||||
|
||||
# macOS-specific files
|
||||
.DS_Store
|
||||
|
||||
sern-handler-*
|
||||
/tools/
|
||||
|
||||
119
.idea/workspace.xml
generated
@@ -4,9 +4,8 @@
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="53dd69d3-e01a-4656-b414-c727f5aa549a" name="Changes" comment="feat: add image">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/blog/2022-12-13-mdx-blog-post.md" beforeDir="false" afterPath="$PROJECT_DIR$/blog/2022-12-13-mdx-blog-post.md" afterDir="false" />
|
||||
<list default="true" id="53dd69d3-e01a-4656-b414-c727f5aa549a" name="Changes" comment="limit description characters to 100">
|
||||
<change beforePath="$PROJECT_DIR$/src/pages/index.module.css" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/index.module.css" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -44,26 +43,35 @@
|
||||
<component name="MarkdownSettingsMigration">
|
||||
<option name="stateVersion" value="1" />
|
||||
</component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"associatedIndex": 5
|
||||
}</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 name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||
"Git.Branch.Popup.ShowAllRemotes": "true",
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"git-widget-placeholder": "feat/pluginPage",
|
||||
"kotlin-language-version-configured": "true",
|
||||
"last_opened_file_path": "C:/Users/jacob/OneDrive/Desktop/Projects/sern/website",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"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": "/home/srizan/Documents/Development/sern-website/node_modules/typescript/lib",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}</component>
|
||||
}]]></component>
|
||||
<component name="RecentsManager">
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="C:\Users\jacob\IdeaProjects\website\static\img" />
|
||||
@@ -133,6 +141,10 @@
|
||||
<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" />
|
||||
<workItem from="1713448008567" duration="8323000" />
|
||||
<workItem from="1714235989637" duration="2619000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="feat: remove old index.html in static/">
|
||||
<created>1660418841831</created>
|
||||
@@ -295,7 +307,59 @@
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1671123452807</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="24" />
|
||||
<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>
|
||||
<task id="LOCAL-00028" summary="initial built from the ground up page done">
|
||||
<option name="closed" value="true" />
|
||||
<created>1713463473768</created>
|
||||
<option name="number" value="00028" />
|
||||
<option name="presentableId" value="LOCAL-00028" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1713463473768</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00029" summary="copilot leak">
|
||||
<option name="closed" value="true" />
|
||||
<created>1714242192383</created>
|
||||
<option name="number" value="00029" />
|
||||
<option name="presentableId" value="LOCAL-00029" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1714242192383</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00030" summary="limit description characters to 100">
|
||||
<option name="closed" value="true" />
|
||||
<created>1714243202496</created>
|
||||
<option name="number" value="00030" />
|
||||
<option name="presentableId" value="LOCAL-00030" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1714243202496</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="31" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
@@ -313,10 +377,6 @@
|
||||
</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" />
|
||||
@@ -324,7 +384,6 @@
|
||||
<MESSAGE value="feat: adding width attr" />
|
||||
<MESSAGE value="feat: adding blogs" />
|
||||
<MESSAGE value="feat: blogwork" />
|
||||
<MESSAGE value="fix: links" />
|
||||
<MESSAGE value="fix: try fiux" />
|
||||
<MESSAGE value="feat: change date of blog" />
|
||||
<MESSAGE value="feat: starting writing 2.0 release blog" />
|
||||
@@ -335,6 +394,18 @@
|
||||
<MESSAGE value="feat: update typedoc" />
|
||||
<MESSAGE value="feat: try again" />
|
||||
<MESSAGE value="feat: add image" />
|
||||
<option name="LAST_COMMIT_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" />
|
||||
<MESSAGE value="initial built from the ground up page done" />
|
||||
<MESSAGE value="wow such feature" />
|
||||
<MESSAGE value="copilot leak" />
|
||||
<MESSAGE value="limit description characters to 100" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="limit description characters to 100" />
|
||||
</component>
|
||||
<component name="XSLT-Support.FileAssociations.UIState">
|
||||
<expand />
|
||||
<select />
|
||||
</component>
|
||||
</project>
|
||||
12
.prettierrc.mjs
Normal file
@@ -0,0 +1,12 @@
|
||||
/** @type {import("prettier").Config} */
|
||||
export default {
|
||||
plugins: ["prettier-plugin-astro", "prettier-plugin-tailwindcss"],
|
||||
overrides: [
|
||||
{
|
||||
files: "*.astro",
|
||||
options: {
|
||||
parser: "astro",
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
30
404.html
@@ -1,30 +0,0 @@
|
||||
<!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
@@ -1,21 +0,0 @@
|
||||
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,3 +1,3 @@
|
||||
# Website
|
||||
# Website (v2)
|
||||
|
||||
sern's clean, modern and user-friendly web interface.
|
||||
sern's clean, modern, and user-friendly web interface. (now built with [Starlight](https://starlight.astro.build/))
|
||||
|
||||
181
astro.config.mjs
Normal file
@@ -0,0 +1,181 @@
|
||||
import { defineConfig } from "astro/config";
|
||||
import starlight from "@astrojs/starlight";
|
||||
import starlightBlog from "starlight-blog";
|
||||
import tailwind from "@astrojs/tailwind";
|
||||
import { createStarlightTypeDocPlugin } from "starlight-typedoc";
|
||||
import lunaria from "@lunariajs/starlight";
|
||||
import { GITHUB_URL, DISCORD_URL } from "./src/utils/consts";
|
||||
import starlightLinksValidator from 'starlight-links-validator';
|
||||
import react from "@astrojs/react";
|
||||
const [typeDocV3, typeDocV3Sidebar] = createStarlightTypeDocPlugin();
|
||||
const [typeDocV4, typeDocV4Sidebar] = createStarlightTypeDocPlugin();
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
// TODO: Change this whenever site is deployed to `sern.dev`
|
||||
site: 'https://sern.dev/',
|
||||
integrations: [starlight({
|
||||
title: "sern",
|
||||
lastUpdated: true,
|
||||
defaultLocale: "root",
|
||||
locales: {
|
||||
root: {
|
||||
label: "English",
|
||||
lang: "en"
|
||||
},
|
||||
es: {
|
||||
label: "Español"
|
||||
},
|
||||
tr: {
|
||||
label: "Türkçe"
|
||||
}
|
||||
},
|
||||
social: {
|
||||
github: GITHUB_URL,
|
||||
discord: DISCORD_URL
|
||||
},
|
||||
editLink: {
|
||||
baseUrl: GITHUB_URL + "/website/edit/main/"
|
||||
},
|
||||
components: {
|
||||
Head: "~/overrides/Head.astro",
|
||||
SiteTitle: "~/overrides/SiteTitle.astro",
|
||||
ThemeSelect: "~/overrides/ThemeSelect.astro",
|
||||
Sidebar: "~/overrides/Sidebar.astro",
|
||||
FallbackContentNotice: "~/overrides/FallbackContentNotice.astro"
|
||||
},
|
||||
logo: {
|
||||
src: "~/assets/logo/navbar-icon.png",
|
||||
replacesTitle: true
|
||||
},
|
||||
customCss: ["~/styles/global.css"],
|
||||
sidebar: [
|
||||
{
|
||||
label: "v4",
|
||||
items: [{
|
||||
...typeDocV4Sidebar,
|
||||
badge: {
|
||||
text: "Generated"
|
||||
}
|
||||
}, {
|
||||
label: "CLI",
|
||||
autogenerate: {
|
||||
directory: "v4/cli"
|
||||
}
|
||||
}, {
|
||||
label: "Reference",
|
||||
autogenerate: {
|
||||
directory: "v4/reference"
|
||||
}
|
||||
}, {
|
||||
label: "Snippets",
|
||||
autogenerate: {
|
||||
directory: "v4/snippets"
|
||||
}
|
||||
}, {
|
||||
label: "Transition",
|
||||
autogenerate: {
|
||||
directory: "v4/transition"
|
||||
}
|
||||
}, {
|
||||
label: "Tools",
|
||||
autogenerate: {
|
||||
directory: "v4/tools"
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
label: "v3",
|
||||
items: [{
|
||||
...typeDocV3Sidebar,
|
||||
badge: {
|
||||
text: "Generated"
|
||||
}
|
||||
}, {
|
||||
label: "CLI",
|
||||
autogenerate: {
|
||||
directory: "v3/cli"
|
||||
}
|
||||
}, {
|
||||
label: "Guide",
|
||||
items: [{
|
||||
label: "Getting Started",
|
||||
autogenerate: {
|
||||
directory: "v3/guide/getting-started"
|
||||
}
|
||||
}, {
|
||||
label: "Walkthrough",
|
||||
autogenerate: {
|
||||
directory: "v3/guide/walkthrough"
|
||||
}
|
||||
}]
|
||||
}]
|
||||
},
|
||||
],
|
||||
head: [
|
||||
!import.meta.env.DEV ? {
|
||||
tag: 'script',
|
||||
attrs: {
|
||||
src: 'https://analytics.sern.dev/ua.js',
|
||||
'data-website-id': 'db608ae9-3ae2-49ed-9f7c-3ba0d5abe1b6',
|
||||
defer: true,
|
||||
},
|
||||
} : {
|
||||
tag: 'meta',
|
||||
attrs: {
|
||||
name: 'isdev',
|
||||
content: 'true',
|
||||
},
|
||||
},
|
||||
],
|
||||
plugins: [starlightBlog({
|
||||
authors: {
|
||||
jacoobes: {
|
||||
name: "jacoobes",
|
||||
title: "Head Dev",
|
||||
url: "https://github.com/jacoobes",
|
||||
picture: "https://github.com/jacoobes.png"
|
||||
},
|
||||
ethan: {
|
||||
name: "Sr Izan",
|
||||
title: "Head Dev",
|
||||
url: "https://github.com/SrIzan10",
|
||||
picture: "https://github.com/SrIzan10.png"
|
||||
},
|
||||
sern: {
|
||||
name: "sern Team",
|
||||
url: GITHUB_URL,
|
||||
picture: "https://github.com/sernbot.png"
|
||||
},
|
||||
murtatrxx: {
|
||||
name: "Murtatrxx",
|
||||
title: "Head Dev",
|
||||
url: "https://github.com/Murtatrxx",
|
||||
picture: "https://github.com/Murtatrxx.png"
|
||||
},
|
||||
duro: {
|
||||
name: "Duro",
|
||||
title: "Developer",
|
||||
url: "https://github.com/DuroCodes",
|
||||
picture: "https://github.com/DuroCodes.png"
|
||||
}
|
||||
}
|
||||
}), typeDocV3({
|
||||
tsconfig: './sern-handler-v3/tsconfig.json',
|
||||
entryPoints: ['./sern-handler-v3/src/index.ts'],
|
||||
output: 'v3/api',
|
||||
sidebar: {
|
||||
collapsed: true
|
||||
}
|
||||
}), typeDocV4({
|
||||
tsconfig: './sern-handler-v4/tsconfig.json',
|
||||
entryPoints: ['./sern-handler-v4/src/index.ts'],
|
||||
output: 'v4/api',
|
||||
sidebar: {
|
||||
collapsed: true
|
||||
}
|
||||
}), lunaria(), starlightLinksValidator({
|
||||
exclude: ['/plugins', '?(../../../..?(/../..))/v{3,4}/api/**/*']
|
||||
})]
|
||||
}), tailwind(), react()]
|
||||
});
|
||||
@@ -1,3 +0,0 @@
|
||||
module.exports = {
|
||||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
|
||||
};
|
||||
@@ -1,79 +0,0 @@
|
||||
---
|
||||
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
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
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!
|
||||
@@ -1,15 +0,0 @@
|
||||
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
|
||||
17
components.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"$schema": "https://ui.shadcn.com/schema.json",
|
||||
"style": "default",
|
||||
"rsc": false,
|
||||
"tsx": true,
|
||||
"tailwind": {
|
||||
"config": "tailwind.config.mjs",
|
||||
"css": "src/styles/global.css",
|
||||
"baseColor": "neutral",
|
||||
"cssVariables": false,
|
||||
"prefix": ""
|
||||
},
|
||||
"aliases": {
|
||||
"components": "~/components",
|
||||
"utils": "~/utils"
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
label: "API"
|
||||
@@ -1,65 +0,0 @@
|
||||
---
|
||||
id: "CommandExecutable"
|
||||
title: "Class: CommandExecutable<Type>"
|
||||
sidebar_label: "CommandExecutable"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## 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:101](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L101)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`EventPlugin`](../interfaces/EventPlugin.md)<`Type`\>[] = `[]`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:100](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L100)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`CommandPlugin`](../interfaces/CommandPlugin.md)<`Type`\>[] = `[]`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:99](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L99)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• `Abstract` **type**: `Type`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:98](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L98)
|
||||
@@ -1,259 +0,0 @@
|
||||
---
|
||||
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:23](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L23)
|
||||
|
||||
## Accessors
|
||||
|
||||
### channel
|
||||
|
||||
• `get` **channel**(): ``null`` \| `TextBasedChannel`
|
||||
|
||||
#### Returns
|
||||
|
||||
``null`` \| `TextBasedChannel`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:51](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L51)
|
||||
|
||||
___
|
||||
|
||||
### client
|
||||
|
||||
• `get` **client**(): `Client`<`boolean`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Client`<`boolean`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:98](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L98)
|
||||
|
||||
___
|
||||
|
||||
### createdTimestamp
|
||||
|
||||
• `get` **createdTimestamp**(): `number`
|
||||
|
||||
#### Returns
|
||||
|
||||
`number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:67](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L67)
|
||||
|
||||
___
|
||||
|
||||
### guild
|
||||
|
||||
• `get` **guild**(): ``null`` \| `Guild`
|
||||
|
||||
#### Returns
|
||||
|
||||
``null`` \| `Guild`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:74](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L74)
|
||||
|
||||
___
|
||||
|
||||
### guildId
|
||||
|
||||
• `get` **guildId**(): ``null`` \| `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
``null`` \| `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:81](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L81)
|
||||
|
||||
___
|
||||
|
||||
### id
|
||||
|
||||
• `get` **id**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:44](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L44)
|
||||
|
||||
___
|
||||
|
||||
### inGuild
|
||||
|
||||
• `get` **inGuild**(): `boolean`
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:105](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L105)
|
||||
|
||||
___
|
||||
|
||||
### 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:40](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L40)
|
||||
|
||||
___
|
||||
|
||||
### member
|
||||
|
||||
• `get` **member**(): ``null`` \| `GuildMember` \| `APIInteractionGuildMember`
|
||||
|
||||
#### Returns
|
||||
|
||||
``null`` \| `GuildMember` \| `APIInteractionGuildMember`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:91](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L91)
|
||||
|
||||
___
|
||||
|
||||
### 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:32](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
### user
|
||||
|
||||
• `get` **user**(): `User`
|
||||
|
||||
If context is holding a message, message.author
|
||||
else, interaction.user
|
||||
|
||||
#### Returns
|
||||
|
||||
`User`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:60](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L60)
|
||||
|
||||
## Methods
|
||||
|
||||
### isMessage
|
||||
|
||||
▸ **isMessage**(): `boolean`
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:111](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L111)
|
||||
|
||||
___
|
||||
|
||||
### isSlash
|
||||
|
||||
▸ **isSlash**(): `boolean`
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/context.ts:115](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L115)
|
||||
|
||||
___
|
||||
|
||||
### 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:126](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L126)
|
||||
|
||||
___
|
||||
|
||||
### 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:119](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/context.ts#L119)
|
||||
@@ -1,85 +0,0 @@
|
||||
---
|
||||
id: "DefaultErrorHandling"
|
||||
title: "Class: DefaultErrorHandling"
|
||||
sidebar_label: "DefaultErrorHandling"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Implements
|
||||
|
||||
- [`ErrorHandling`](../interfaces/ErrorHandling.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new DefaultErrorHandling**()
|
||||
|
||||
## Properties
|
||||
|
||||
### keepAlive
|
||||
|
||||
• **keepAlive**: `number` = `5`
|
||||
|
||||
Number of times the process should throw an error until crashing and exiting
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ErrorHandling](../interfaces/ErrorHandling.md).[keepAlive](../interfaces/ErrorHandling.md#keepalive)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:25](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/errorHandling.ts#L25)
|
||||
|
||||
## Methods
|
||||
|
||||
### crash
|
||||
|
||||
▸ **crash**(`error`): `never`
|
||||
|
||||
Utility function to crash
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `error` | `Error` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`never`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ErrorHandling](../interfaces/ErrorHandling.md).[crash](../interfaces/ErrorHandling.md#crash)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:26](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/errorHandling.ts#L26)
|
||||
|
||||
___
|
||||
|
||||
### updateAlive
|
||||
|
||||
▸ **updateAlive**(`e`): `void`
|
||||
|
||||
A function that is called on every crash. Updates keepAlive
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `e` | `Error` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ErrorHandling](../interfaces/ErrorHandling.md).[updateAlive](../interfaces/ErrorHandling.md#updatealive)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:29](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/errorHandling.ts#L29)
|
||||
@@ -1,127 +0,0 @@
|
||||
---
|
||||
id: "DefaultLogging"
|
||||
title: "Class: DefaultLogging"
|
||||
sidebar_label: "DefaultLogging"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Implements
|
||||
|
||||
- [`Logging`](../interfaces/Logging.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new DefaultLogging**()
|
||||
|
||||
## Methods
|
||||
|
||||
### date
|
||||
|
||||
▸ `Private` **date**(): `Date`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Date`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:11](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L11)
|
||||
|
||||
___
|
||||
|
||||
### debug
|
||||
|
||||
▸ **debug**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`unknown`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[Logging](../interfaces/Logging.md).[debug](../interfaces/Logging.md#debug)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:12](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L12)
|
||||
|
||||
___
|
||||
|
||||
### error
|
||||
|
||||
▸ **error**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`unknown`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[Logging](../interfaces/Logging.md).[error](../interfaces/Logging.md#error)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:16](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L16)
|
||||
|
||||
___
|
||||
|
||||
### info
|
||||
|
||||
▸ **info**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`unknown`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[Logging](../interfaces/Logging.md).[info](../interfaces/Logging.md#info)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:20](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L20)
|
||||
|
||||
___
|
||||
|
||||
### warning
|
||||
|
||||
▸ **warning**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`unknown`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[Logging](../interfaces/Logging.md).[warning](../interfaces/Logging.md#warning)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:24](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L24)
|
||||
@@ -1,81 +0,0 @@
|
||||
---
|
||||
id: "DefaultModuleManager"
|
||||
title: "Class: DefaultModuleManager"
|
||||
sidebar_label: "DefaultModuleManager"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Implements
|
||||
|
||||
- [`ModuleManager`](../interfaces/ModuleManager.md)
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new DefaultModuleManager**(`moduleStore`)
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `moduleStore` | [`ModuleStore`](ModuleStore.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/moduleManager.ts:12](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/moduleManager.ts#L12)
|
||||
|
||||
## Methods
|
||||
|
||||
### get
|
||||
|
||||
▸ **get**<`T`\>(`strat`): `undefined` \| [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends [`CommandType`](../enums/CommandType.md) |
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `strat` | (`ms`: [`ModuleStore`](ModuleStore.md)) => `undefined` \| [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ModuleManager](../interfaces/ModuleManager.md).[get](../interfaces/ModuleManager.md#get)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/moduleManager.ts:13](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/moduleManager.ts#L13)
|
||||
|
||||
___
|
||||
|
||||
### set
|
||||
|
||||
▸ **set**(`strat`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `strat` | (`ms`: [`ModuleStore`](ModuleStore.md)) => `void` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[ModuleManager](../interfaces/ModuleManager.md).[set](../interfaces/ModuleManager.md#set)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/moduleManager.ts:17](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/moduleManager.ts#L17)
|
||||
@@ -1,65 +0,0 @@
|
||||
---
|
||||
id: "EventExecutable"
|
||||
title: "Class: EventExecutable<Type>"
|
||||
sidebar_label: "EventExecutable"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## 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:108](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L108)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`EventModuleEventPluginDefs`](../modules.md#eventmoduleeventplugindefs)[`Type`][] = `[]`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:107](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L107)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`EventModuleCommandPluginDefs`](../modules.md#eventmodulecommandplugindefs)[`Type`][] = `[]`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:106](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L106)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• `Abstract` **type**: `Type`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:105](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L105)
|
||||
@@ -1,85 +0,0 @@
|
||||
---
|
||||
id: "ModuleStore"
|
||||
title: "Class: ModuleStore"
|
||||
sidebar_label: "ModuleStore"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
Storing all command modules
|
||||
This dependency is usually injected into ModuleManager
|
||||
|
||||
## Constructors
|
||||
|
||||
### constructor
|
||||
|
||||
• **new ModuleStore**()
|
||||
|
||||
## Properties
|
||||
|
||||
### ApplicationCommands
|
||||
|
||||
• `Readonly` **ApplicationCommands**: `Object`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `1` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
|
||||
| `2` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
|
||||
| `3` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/moduleStore.ts:10](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/moduleStore.ts#L10)
|
||||
|
||||
___
|
||||
|
||||
### BothCommands
|
||||
|
||||
• `Readonly` **BothCommands**: `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/moduleStore.ts:9](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/moduleStore.ts#L9)
|
||||
|
||||
___
|
||||
|
||||
### InteractionHandlers
|
||||
|
||||
• `Readonly` **InteractionHandlers**: `Object`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `2` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
|
||||
| `3` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
|
||||
| `5` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
|
||||
| `6` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
|
||||
| `7` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
|
||||
| `8` | `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\> |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/moduleStore.ts:17](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/moduleStore.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
### ModalSubmit
|
||||
|
||||
• `Readonly` **ModalSubmit**: `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/moduleStore.ts:15](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/moduleStore.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
### TextCommands
|
||||
|
||||
• `Readonly` **TextCommands**: `Map`<`string`, [`CommandModule`](../modules.md#commandmodule)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/moduleStore.ts:16](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/moduleStore.ts#L16)
|
||||
@@ -1,2 +0,0 @@
|
||||
label: "Classes"
|
||||
position: 3
|
||||
@@ -1,160 +0,0 @@
|
||||
---
|
||||
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/3daacfc/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/3daacfc/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/3daacfc/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/3daacfc/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/3daacfc/src/handler/structures/enums.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
### MentionableSelect
|
||||
|
||||
• **MentionableSelect** = ``512``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:53](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L53)
|
||||
|
||||
___
|
||||
|
||||
### Modal
|
||||
|
||||
• **Modal** = ``64``
|
||||
|
||||
The CommandType for ModalSubmitInteraction commands
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:48](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L48)
|
||||
|
||||
___
|
||||
|
||||
### RoleSelect
|
||||
|
||||
• **RoleSelect** = ``1024``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:54](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L54)
|
||||
|
||||
___
|
||||
|
||||
### Slash
|
||||
|
||||
• **Slash** = ``2``
|
||||
|
||||
The CommandType for slash commands
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:24](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L24)
|
||||
|
||||
___
|
||||
|
||||
### StringSelect
|
||||
|
||||
• **StringSelect** = ``32``
|
||||
|
||||
The CommandType for StringSelectMenuInteraction commands
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:44](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L44)
|
||||
|
||||
___
|
||||
|
||||
### Text
|
||||
|
||||
• **Text** = ``1``
|
||||
|
||||
The CommandType for text commands
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:20](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L20)
|
||||
|
||||
___
|
||||
|
||||
### UserSelect
|
||||
|
||||
• **UserSelect** = ``2048``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:55](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L55)
|
||||
@@ -1,59 +0,0 @@
|
||||
---
|
||||
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/3daacfc/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/3daacfc/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/3daacfc/src/handler/structures/enums.ts#L81)
|
||||
@@ -1,43 +0,0 @@
|
||||
---
|
||||
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:124](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L124)
|
||||
|
||||
___
|
||||
|
||||
### Success
|
||||
|
||||
• **Success** = ``"success"``
|
||||
|
||||
The PayloadType for a SernEmitter success event
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:120](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L120)
|
||||
|
||||
___
|
||||
|
||||
### Warning
|
||||
|
||||
• **Warning** = ``"warning"``
|
||||
|
||||
The PayloadType for a SernEmitter warning event
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:128](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L128)
|
||||
@@ -1,45 +0,0 @@
|
||||
---
|
||||
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``
|
||||
|
||||
The PluginType for CommandPlugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:107](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L107)
|
||||
|
||||
___
|
||||
|
||||
### Event
|
||||
|
||||
• **Event** = ``2``
|
||||
|
||||
The PluginType for EventPlugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/enums.ts:111](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/enums.ts#L111)
|
||||
@@ -1,2 +0,0 @@
|
||||
label: "Enumerations"
|
||||
position: 2
|
||||
@@ -1,112 +0,0 @@
|
||||
---
|
||||
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-handler.js.org"><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
|
||||
```
|
||||
|
||||
## 👀 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
|
||||
]
|
||||
});
|
||||
|
||||
Sern.init({
|
||||
client,
|
||||
defaultPrefix,
|
||||
commands : 'src/commands',
|
||||
});
|
||||
|
||||
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-handler.js.org)
|
||||
- [Support Server](https://discord.com/invite/mmyCTnYtbF)
|
||||
|
||||
## 👋 Contribute
|
||||
|
||||
- Read our contribution [guidelines](https://github.com/sern-handler/handler) 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.
|
||||
@@ -1,93 +0,0 @@
|
||||
---
|
||||
id: "AutocompleteCommand"
|
||||
title: "Interface: AutocompleteCommand"
|
||||
sidebar_label: "AutocompleteCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`AutocompleteCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `undefined`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:132](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L132)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `AutocompleteInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `AutocompleteInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:135](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L135)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `undefined`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:131](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L131)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`AutocompletePlugin`](AutocompletePlugin.md)[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:134](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L134)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• `Optional` **type**: `undefined`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:133](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L133)
|
||||
@@ -1,88 +0,0 @@
|
||||
---
|
||||
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)
|
||||
@@ -1,124 +0,0 @@
|
||||
---
|
||||
id: "BothCommand"
|
||||
title: "Interface: BothCommand"
|
||||
sidebar_label: "BothCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`BothCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### alias
|
||||
|
||||
• `Optional` **alias**: `string`[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:62](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L62)
|
||||
|
||||
___
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: [`Context`](../classes/Context.md), `args`: [`Args`](../modules.md#args)) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`, `args`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | [`Context`](../classes/Context.md) |
|
||||
| `args` | [`Args`](../modules.md#args) |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:64](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L64)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`EventPlugin`](EventPlugin.md)<[`Both`](../enums/CommandType.md#both)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:60](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L60)
|
||||
|
||||
___
|
||||
|
||||
### options
|
||||
|
||||
• `Optional` **options**: ([`SernSubCommandData`](SernSubCommandData.md) \| [`SernSubCommandGroupData`](SernSubCommandGroupData.md) \| [`BaseOptions`](../modules.md#baseoptions))[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:63](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L63)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:61](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L61)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Both`](../enums/CommandType.md#both)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:59](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L59)
|
||||
@@ -1,103 +0,0 @@
|
||||
---
|
||||
id: "ButtonCommand"
|
||||
title: "Interface: ButtonCommand"
|
||||
sidebar_label: "ButtonCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`ButtonCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `ButtonInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `ButtonInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:85](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L85)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`EventPlugin`](EventPlugin.md)<[`Button`](../enums/CommandType.md#button)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:83](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L83)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:84](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L84)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Button`](../enums/CommandType.md#button)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:82](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L82)
|
||||
@@ -1,103 +0,0 @@
|
||||
---
|
||||
id: "ChannelSelectCommand"
|
||||
title: "Interface: ChannelSelectCommand"
|
||||
sidebar_label: "ChannelSelectCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`ChannelSelectCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `ChannelSelectMenuInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `ChannelSelectMenuInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:99](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L99)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`EventPlugin`](EventPlugin.md)<[`ChannelSelect`](../enums/CommandType.md#channelselect)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:97](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L97)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:98](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L98)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`ChannelSelect`](../enums/CommandType.md#channelselect)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:96](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L96)
|
||||
@@ -1,96 +0,0 @@
|
||||
---
|
||||
id: "CommandPlugin"
|
||||
title: "Interface: CommandPlugin<T>"
|
||||
sidebar_label: "CommandPlugin"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs) = keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs) |
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Plugin`](Plugin.md)
|
||||
|
||||
↳ **`CommandPlugin`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Plugin](Plugin.md).[description](Plugin.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`payload`: { `absPath`: `string` ; `mod`: [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`] & { `description`: `string` ; `name`: `string` } }, `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`payload`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | `Object` |
|
||||
| `payload.absPath` | `string` |
|
||||
| `payload.mod` | [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`] & { `description`: `string` ; `name`: `string` } |
|
||||
| `controller` | [`Controller`](Controller.md) |
|
||||
|
||||
##### Returns
|
||||
|
||||
`Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:39](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L39)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Plugin](Plugin.md).[name](Plugin.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Command`](../enums/PluginType.md#command)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Plugin](Plugin.md).[type](Plugin.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L38)
|
||||
@@ -1,103 +0,0 @@
|
||||
---
|
||||
id: "ContextMenuMsg"
|
||||
title: "Interface: ContextMenuMsg"
|
||||
sidebar_label: "ContextMenuMsg"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`ContextMenuMsg`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `MessageContextMenuCommandInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `MessageContextMenuCommandInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:78](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L78)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`EventPlugin`](EventPlugin.md)<[`CtxMsg`](../enums/CommandType.md#ctxmsg)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:76](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L76)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:77](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L77)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`CtxMsg`](../enums/CommandType.md#ctxmsg)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:75](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L75)
|
||||
@@ -1,103 +0,0 @@
|
||||
---
|
||||
id: "ContextMenuUser"
|
||||
title: "Interface: ContextMenuUser"
|
||||
sidebar_label: "ContextMenuUser"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`ContextMenuUser`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `UserContextMenuCommandInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `UserContextMenuCommandInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:71](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L71)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`EventPlugin`](EventPlugin.md)<[`CtxUser`](../enums/CommandType.md#ctxuser)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:69](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L69)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:70](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L70)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`CtxUser`](../enums/CommandType.md#ctxuser)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:68](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L68)
|
||||
@@ -1,43 +0,0 @@
|
||||
---
|
||||
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/handler/plugins/plugin.ts:26](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L26)
|
||||
|
||||
___
|
||||
|
||||
### stop
|
||||
|
||||
• **stop**: () => `Err`<`void`\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (): `Err`<`void`\>
|
||||
|
||||
##### Returns
|
||||
|
||||
`Err`<`void`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:27](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L27)
|
||||
@@ -1,67 +0,0 @@
|
||||
---
|
||||
id: "Dependencies"
|
||||
title: "Interface: Dependencies"
|
||||
sidebar_label: "Dependencies"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### @sern/client
|
||||
|
||||
• **@sern/client**: [`Singleton`](../modules.md#singleton)<`__module`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:41](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L41)
|
||||
|
||||
___
|
||||
|
||||
### @sern/emitter
|
||||
|
||||
• **@sern/emitter**: [`Singleton`](../modules.md#singleton)<[`SernEmitter`](../classes/SernEmitter.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:43](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L43)
|
||||
|
||||
___
|
||||
|
||||
### @sern/errors
|
||||
|
||||
• **@sern/errors**: [`Singleton`](../modules.md#singleton)<[`ErrorHandling`](ErrorHandling.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:46](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L46)
|
||||
|
||||
___
|
||||
|
||||
### @sern/logger
|
||||
|
||||
• `Optional` **@sern/logger**: [`Singleton`](../modules.md#singleton)<[`Logging`](Logging.md)<`unknown`\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:42](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L42)
|
||||
|
||||
___
|
||||
|
||||
### @sern/modules
|
||||
|
||||
• **@sern/modules**: [`Singleton`](../modules.md#singleton)<[`ModuleManager`](ModuleManager.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:45](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L45)
|
||||
|
||||
___
|
||||
|
||||
### @sern/store
|
||||
|
||||
• **@sern/store**: [`Singleton`](../modules.md#singleton)<[`ModuleStore`](../classes/ModuleStore.md)\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:44](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L44)
|
||||
@@ -1,90 +0,0 @@
|
||||
---
|
||||
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)
|
||||
@@ -1,94 +0,0 @@
|
||||
---
|
||||
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)
|
||||
@@ -1,67 +0,0 @@
|
||||
---
|
||||
id: "ErrorHandling"
|
||||
title: "Interface: ErrorHandling"
|
||||
sidebar_label: "ErrorHandling"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`DefaultErrorHandling`](../classes/DefaultErrorHandling.md)
|
||||
|
||||
## Properties
|
||||
|
||||
### keepAlive
|
||||
|
||||
• **keepAlive**: `number`
|
||||
|
||||
Number of times the process should throw an error until crashing and exiting
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:9](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/errorHandling.ts#L9)
|
||||
|
||||
## Methods
|
||||
|
||||
### crash
|
||||
|
||||
▸ **crash**(`error`): `never`
|
||||
|
||||
Utility function to crash
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `error` | `Error` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`never`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:15](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/errorHandling.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
### updateAlive
|
||||
|
||||
▸ **updateAlive**(`error`): `void`
|
||||
|
||||
A function that is called on every crash. Updates keepAlive
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `error` | `Error` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/errorHandling.ts:21](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/errorHandling.ts#L21)
|
||||
@@ -1,94 +0,0 @@
|
||||
---
|
||||
id: "EventPlugin"
|
||||
title: "Interface: EventPlugin<K>"
|
||||
sidebar_label: "EventPlugin"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `K` | extends keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs) = keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs) |
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Plugin`](Plugin.md)
|
||||
|
||||
↳ **`EventPlugin`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Plugin](Plugin.md).[description](Plugin.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`event`: `Parameters`<[`CommandModuleDefs`](../modules.md#commandmoduledefs)[`K`][``"execute"``]\>, `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`event`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `event` | `Parameters`<[`CommandModuleDefs`](../modules.md#commandmoduledefs)[`K`][``"execute"``]\> |
|
||||
| `controller` | [`Controller`](Controller.md) |
|
||||
|
||||
##### Returns
|
||||
|
||||
`Awaitable`<`Result`<`void`, `void`\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:82](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L82)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Plugin](Plugin.md).[name](Plugin.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Event`](../enums/PluginType.md#event)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Plugin](Plugin.md).[type](Plugin.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:81](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L81)
|
||||
@@ -1,90 +0,0 @@
|
||||
---
|
||||
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)
|
||||
@@ -1,88 +0,0 @@
|
||||
---
|
||||
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)
|
||||
@@ -1,97 +0,0 @@
|
||||
---
|
||||
id: "Logging"
|
||||
title: "Interface: Logging<T>"
|
||||
sidebar_label: "Logging"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | `unknown` |
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`DefaultLogging`](../classes/DefaultLogging.md)
|
||||
|
||||
## Methods
|
||||
|
||||
### debug
|
||||
|
||||
▸ **debug**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`T`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:7](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L7)
|
||||
|
||||
___
|
||||
|
||||
### error
|
||||
|
||||
▸ **error**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`T`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:4](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L4)
|
||||
|
||||
___
|
||||
|
||||
### info
|
||||
|
||||
▸ **info**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`T`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:6](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L6)
|
||||
|
||||
___
|
||||
|
||||
### warning
|
||||
|
||||
▸ **warning**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `payload` | [`LogPayload`](../modules.md#logpayload)<`T`\> |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/logging.ts:5](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/logging.ts#L5)
|
||||
@@ -1,103 +0,0 @@
|
||||
---
|
||||
id: "MentionableSelectCommand"
|
||||
title: "Interface: MentionableSelectCommand"
|
||||
sidebar_label: "MentionableSelectCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`MentionableSelectCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `MentionableSelectMenuInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `MentionableSelectMenuInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:113](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L113)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`EventPlugin`](EventPlugin.md)<[`MentionableSelect`](../enums/CommandType.md#mentionableselect)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:111](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L111)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:112](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L112)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`MentionableSelect`](../enums/CommandType.md#mentionableselect)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:110](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L110)
|
||||
@@ -1,103 +0,0 @@
|
||||
---
|
||||
id: "ModalSubmitCommand"
|
||||
title: "Interface: ModalSubmitCommand"
|
||||
sidebar_label: "ModalSubmitCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`ModalSubmitCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `ModalSubmitInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `ModalSubmitInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:127](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L127)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`EventPlugin`](EventPlugin.md)<[`Modal`](../enums/CommandType.md#modal)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:125](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L125)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:126](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L126)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Modal`](../enums/CommandType.md#modal)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:124](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L124)
|
||||
@@ -1,91 +0,0 @@
|
||||
---
|
||||
id: "Module"
|
||||
title: "Interface: Module"
|
||||
sidebar_label: "Module"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- **`Module`**
|
||||
|
||||
↳ [`TextCommand`](TextCommand.md)
|
||||
|
||||
↳ [`SlashCommand`](SlashCommand.md)
|
||||
|
||||
↳ [`BothCommand`](BothCommand.md)
|
||||
|
||||
↳ [`ContextMenuUser`](ContextMenuUser.md)
|
||||
|
||||
↳ [`ContextMenuMsg`](ContextMenuMsg.md)
|
||||
|
||||
↳ [`ButtonCommand`](ButtonCommand.md)
|
||||
|
||||
↳ [`StringSelectCommand`](StringSelectCommand.md)
|
||||
|
||||
↳ [`ChannelSelectCommand`](ChannelSelectCommand.md)
|
||||
|
||||
↳ [`RoleSelectCommand`](RoleSelectCommand.md)
|
||||
|
||||
↳ [`MentionableSelectCommand`](MentionableSelectCommand.md)
|
||||
|
||||
↳ [`UserSelectCommand`](UserSelectCommand.md)
|
||||
|
||||
↳ [`ModalSubmitCommand`](ModalSubmitCommand.md)
|
||||
|
||||
↳ [`AutocompleteCommand`](AutocompleteCommand.md)
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (...`args`: `any`[]) => `any`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (...`args`): `any`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...args` | `any`[] |
|
||||
|
||||
##### Returns
|
||||
|
||||
`any`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:39](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L39)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• `Optional` **type**: [`CommandType`](../enums/CommandType.md) \| [`EventType`](../enums/EventType.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L36)
|
||||
@@ -1,57 +0,0 @@
|
||||
---
|
||||
id: "ModuleManager"
|
||||
title: "Interface: ModuleManager"
|
||||
sidebar_label: "ModuleManager"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Implemented by
|
||||
|
||||
- [`DefaultModuleManager`](../classes/DefaultModuleManager.md)
|
||||
|
||||
## Methods
|
||||
|
||||
### get
|
||||
|
||||
▸ **get**<`T`\>(`strat`): `undefined` \| [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends [`CommandType`](../enums/CommandType.md) |
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `strat` | (`ms`: [`ModuleStore`](../classes/ModuleStore.md)) => `undefined` \| [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`] |
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| [`CommandModuleDefs`](../modules.md#commandmoduledefs)[`T`]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/moduleManager.ts:7](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/moduleManager.ts#L7)
|
||||
|
||||
___
|
||||
|
||||
### set
|
||||
|
||||
▸ **set**(`strat`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `strat` | (`ms`: [`ModuleStore`](../classes/ModuleStore.md)) => `void` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/contracts/moduleManager.ts:8](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/contracts/moduleManager.ts#L8)
|
||||
@@ -1,67 +0,0 @@
|
||||
---
|
||||
id: "Plugin"
|
||||
title: "Interface: Plugin"
|
||||
sidebar_label: "Plugin"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- **`Plugin`**
|
||||
|
||||
↳ [`CommandPlugin`](CommandPlugin.md)
|
||||
|
||||
↳ [`DiscordEmitterPlugin`](DiscordEmitterPlugin.md)
|
||||
|
||||
↳ [`ExternalEmitterPlugin`](ExternalEmitterPlugin.md)
|
||||
|
||||
↳ [`SernEmitterPlugin`](SernEmitterPlugin.md)
|
||||
|
||||
↳ [`AutocompletePlugin`](AutocompletePlugin.md)
|
||||
|
||||
↳ [`EventPlugin`](EventPlugin.md)
|
||||
|
||||
↳ [`SernEventPlugin`](SernEventPlugin.md)
|
||||
|
||||
↳ [`ExternalEventPlugin`](ExternalEventPlugin.md)
|
||||
|
||||
↳ [`DiscordEventPlugin`](DiscordEventPlugin.md)
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
will be removed in the next update
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`PluginType`](../enums/PluginType.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:34](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L34)
|
||||
@@ -1,103 +0,0 @@
|
||||
---
|
||||
id: "RoleSelectCommand"
|
||||
title: "Interface: RoleSelectCommand"
|
||||
sidebar_label: "RoleSelectCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`RoleSelectCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `RoleSelectMenuInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `RoleSelectMenuInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:106](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L106)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`EventPlugin`](EventPlugin.md)<[`RoleSelect`](../enums/CommandType.md#roleselect)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:104](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L104)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:105](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L105)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`RoleSelect`](../enums/CommandType.md#roleselect)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:103](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L103)
|
||||
@@ -1,113 +0,0 @@
|
||||
---
|
||||
id: "SernAutocompleteData"
|
||||
title: "Interface: SernAutocompleteData"
|
||||
sidebar_label: "SernAutocompleteData"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- `Omit`<`BaseApplicationCommandOptionsData`, ``"autocomplete"``\>
|
||||
|
||||
↳ **`SernAutocompleteData`**
|
||||
|
||||
## Properties
|
||||
|
||||
### autocomplete
|
||||
|
||||
• **autocomplete**: ``true``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:179](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L179)
|
||||
|
||||
___
|
||||
|
||||
### command
|
||||
|
||||
• **command**: [`AutocompleteCommand`](AutocompleteCommand.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:184](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L184)
|
||||
|
||||
___
|
||||
|
||||
### description
|
||||
|
||||
• **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
Omit.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/discord.js/typings/index.d.ts:4200
|
||||
|
||||
___
|
||||
|
||||
### descriptionLocalizations
|
||||
|
||||
• `Optional` **descriptionLocalizations**: `Partial`<`Record`<``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
Omit.descriptionLocalizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/discord.js/typings/index.d.ts:4201
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
Omit.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/discord.js/typings/index.d.ts:4198
|
||||
|
||||
___
|
||||
|
||||
### nameLocalizations
|
||||
|
||||
• `Optional` **nameLocalizations**: `Partial`<`Record`<``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
Omit.nameLocalizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/discord.js/typings/index.d.ts:4199
|
||||
|
||||
___
|
||||
|
||||
### required
|
||||
|
||||
• `Optional` **required**: `boolean`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
Omit.required
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/discord.js/typings/index.d.ts:4202
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: `String` \| `Integer` \| `Number`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:180](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L180)
|
||||
@@ -1,90 +0,0 @@
|
||||
---
|
||||
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)
|
||||
@@ -1,94 +0,0 @@
|
||||
---
|
||||
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)
|
||||
@@ -1,117 +0,0 @@
|
||||
---
|
||||
id: "SernSubCommandData"
|
||||
title: "Interface: SernSubCommandData"
|
||||
sidebar_label: "SernSubCommandData"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- `BaseApplicationCommandOptionsData`
|
||||
|
||||
↳ **`SernSubCommandData`**
|
||||
|
||||
## Properties
|
||||
|
||||
### autocomplete
|
||||
|
||||
• `Optional` **autocomplete**: `undefined`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.autocomplete
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/discord.js/typings/index.d.ts:4203
|
||||
|
||||
___
|
||||
|
||||
### description
|
||||
|
||||
• **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/discord.js/typings/index.d.ts:4200
|
||||
|
||||
___
|
||||
|
||||
### descriptionLocalizations
|
||||
|
||||
• `Optional` **descriptionLocalizations**: `Partial`<`Record`<``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.descriptionLocalizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/discord.js/typings/index.d.ts:4201
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/discord.js/typings/index.d.ts:4198
|
||||
|
||||
___
|
||||
|
||||
### nameLocalizations
|
||||
|
||||
• `Optional` **nameLocalizations**: `Partial`<`Record`<``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.nameLocalizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/discord.js/typings/index.d.ts:4199
|
||||
|
||||
___
|
||||
|
||||
### options
|
||||
|
||||
• `Optional` **options**: [`BaseOptions`](../modules.md#baseoptions)[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:201](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L201)
|
||||
|
||||
___
|
||||
|
||||
### required
|
||||
|
||||
• `Optional` **required**: `undefined`
|
||||
|
||||
#### Overrides
|
||||
|
||||
BaseApplicationCommandOptionsData.required
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:200](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L200)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: `Subcommand`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:199](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L199)
|
||||
@@ -1,117 +0,0 @@
|
||||
---
|
||||
id: "SernSubCommandGroupData"
|
||||
title: "Interface: SernSubCommandGroupData"
|
||||
sidebar_label: "SernSubCommandGroupData"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- `BaseApplicationCommandOptionsData`
|
||||
|
||||
↳ **`SernSubCommandGroupData`**
|
||||
|
||||
## Properties
|
||||
|
||||
### autocomplete
|
||||
|
||||
• `Optional` **autocomplete**: `undefined`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.autocomplete
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/discord.js/typings/index.d.ts:4203
|
||||
|
||||
___
|
||||
|
||||
### description
|
||||
|
||||
• **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/discord.js/typings/index.d.ts:4200
|
||||
|
||||
___
|
||||
|
||||
### descriptionLocalizations
|
||||
|
||||
• `Optional` **descriptionLocalizations**: `Partial`<`Record`<``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.descriptionLocalizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/discord.js/typings/index.d.ts:4201
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/discord.js/typings/index.d.ts:4198
|
||||
|
||||
___
|
||||
|
||||
### nameLocalizations
|
||||
|
||||
• `Optional` **nameLocalizations**: `Partial`<`Record`<``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
BaseApplicationCommandOptionsData.nameLocalizations
|
||||
|
||||
#### Defined in
|
||||
|
||||
node_modules/discord.js/typings/index.d.ts:4199
|
||||
|
||||
___
|
||||
|
||||
### options
|
||||
|
||||
• `Optional` **options**: [`SernSubCommandData`](SernSubCommandData.md)[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:207](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L207)
|
||||
|
||||
___
|
||||
|
||||
### required
|
||||
|
||||
• `Optional` **required**: `undefined`
|
||||
|
||||
#### Overrides
|
||||
|
||||
BaseApplicationCommandOptionsData.required
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:206](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L206)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: `SubcommandGroup`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:205](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L205)
|
||||
@@ -1,114 +0,0 @@
|
||||
---
|
||||
id: "SlashCommand"
|
||||
title: "Interface: SlashCommand"
|
||||
sidebar_label: "SlashCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`SlashCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: [`Context`](../classes/Context.md), `args`: [``"slash"``, [`SlashOptions`](../modules.md#slashoptions)]) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`, `args`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | [`Context`](../classes/Context.md) |
|
||||
| `args` | [``"slash"``, [`SlashOptions`](../modules.md#slashoptions)] |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:55](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L55)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`EventPlugin`](EventPlugin.md)<[`Slash`](../enums/CommandType.md#slash)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:52](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L52)
|
||||
|
||||
___
|
||||
|
||||
### options
|
||||
|
||||
• `Optional` **options**: ([`SernSubCommandData`](SernSubCommandData.md) \| [`SernSubCommandGroupData`](SernSubCommandGroupData.md) \| [`BaseOptions`](../modules.md#baseoptions))[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:54](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L54)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:53](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L53)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Slash`](../enums/CommandType.md#slash)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:51](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L51)
|
||||
@@ -1,103 +0,0 @@
|
||||
---
|
||||
id: "StringSelectCommand"
|
||||
title: "Interface: StringSelectCommand"
|
||||
sidebar_label: "StringSelectCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`StringSelectCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `StringSelectMenuInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `StringSelectMenuInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:92](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L92)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`EventPlugin`](EventPlugin.md)<[`StringSelect`](../enums/CommandType.md#stringselect)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:90](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L90)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:91](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L91)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`StringSelect`](../enums/CommandType.md#stringselect)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:89](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L89)
|
||||
@@ -1,114 +0,0 @@
|
||||
---
|
||||
id: "TextCommand"
|
||||
title: "Interface: TextCommand"
|
||||
sidebar_label: "TextCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`TextCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### alias
|
||||
|
||||
• `Optional` **alias**: `string`[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:46](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L46)
|
||||
|
||||
___
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: [`Context`](../classes/Context.md), `args`: [``"text"``, `string`[]]) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`, `args`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | [`Context`](../classes/Context.md) |
|
||||
| `args` | [``"text"``, `string`[]] |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:47](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L47)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`EventPlugin`](EventPlugin.md)<[`Text`](../enums/CommandType.md#text)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:44](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L44)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:45](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L45)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`Text`](../enums/CommandType.md#text)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:43](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L43)
|
||||
@@ -1,103 +0,0 @@
|
||||
---
|
||||
id: "UserSelectCommand"
|
||||
title: "Interface: UserSelectCommand"
|
||||
sidebar_label: "UserSelectCommand"
|
||||
sidebar_position: 0
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Hierarchy
|
||||
|
||||
- [`Module`](Module.md)
|
||||
|
||||
↳ **`UserSelectCommand`**
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
• `Optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[description](Module.md#description)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### execute
|
||||
|
||||
• **execute**: (`ctx`: `UserSelectMenuInteraction`<`CacheType`\>) => `unknown`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (`ctx`): `unknown`
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `ctx` | `UserSelectMenuInteraction`<`CacheType`\> |
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[execute](Module.md#execute)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:120](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L120)
|
||||
|
||||
___
|
||||
|
||||
### name
|
||||
|
||||
• `Optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
[Module](Module.md).[name](Module.md#name)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### onEvent
|
||||
|
||||
• **onEvent**: [`EventPlugin`](EventPlugin.md)<[`UserSelect`](../enums/CommandType.md#userselect)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:118](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L118)
|
||||
|
||||
___
|
||||
|
||||
### plugins
|
||||
|
||||
• **plugins**: [`CommandPlugin`](CommandPlugin.md)<keyof [`CommandModuleDefs`](../modules.md#commandmoduledefs)\>[]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:119](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L119)
|
||||
|
||||
___
|
||||
|
||||
### type
|
||||
|
||||
• **type**: [`UserSelect`](../enums/CommandType.md#userselect)
|
||||
|
||||
#### Overrides
|
||||
|
||||
[Module](Module.md).[type](Module.md#type)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:117](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L117)
|
||||
@@ -1,55 +0,0 @@
|
||||
---
|
||||
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/3daacfc/src/handler/structures/wrapper.ts#L9)
|
||||
|
||||
___
|
||||
|
||||
### containerConfig
|
||||
|
||||
• `Readonly` **containerConfig**: `Object`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `get` | (...`keys`: keyof [`Dependencies`](Dependencies.md)[]) => `unknown`[] |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/wrapper.ts:11](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/wrapper.ts#L11)
|
||||
|
||||
___
|
||||
|
||||
### defaultPrefix
|
||||
|
||||
• `Optional` `Readonly` **defaultPrefix**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/wrapper.ts:8](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/wrapper.ts#L8)
|
||||
|
||||
___
|
||||
|
||||
### events
|
||||
|
||||
• `Optional` `Readonly` **events**: `string`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/structures/wrapper.ts:10](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/structures/wrapper.ts#L10)
|
||||
@@ -1,2 +0,0 @@
|
||||
label: "Interfaces"
|
||||
position: 4
|
||||
@@ -1,630 +0,0 @@
|
||||
---
|
||||
id: "modules"
|
||||
title: "@sern/handler"
|
||||
sidebar_label: "Exports"
|
||||
sidebar_position: 0.5
|
||||
custom_edit_url: null
|
||||
---
|
||||
|
||||
## Namespaces
|
||||
|
||||
- [Sern](namespaces/Sern.md)
|
||||
|
||||
## Enumerations
|
||||
|
||||
- [CommandType](enums/CommandType.md)
|
||||
- [EventType](enums/EventType.md)
|
||||
- [PayloadType](enums/PayloadType.md)
|
||||
- [PluginType](enums/PluginType.md)
|
||||
|
||||
## Classes
|
||||
|
||||
- [CommandExecutable](classes/CommandExecutable.md)
|
||||
- [Context](classes/Context.md)
|
||||
- [DefaultErrorHandling](classes/DefaultErrorHandling.md)
|
||||
- [DefaultLogging](classes/DefaultLogging.md)
|
||||
- [DefaultModuleManager](classes/DefaultModuleManager.md)
|
||||
- [EventExecutable](classes/EventExecutable.md)
|
||||
- [ModuleStore](classes/ModuleStore.md)
|
||||
- [SernEmitter](classes/SernEmitter.md)
|
||||
|
||||
## Interfaces
|
||||
|
||||
- [AutocompleteCommand](interfaces/AutocompleteCommand.md)
|
||||
- [AutocompletePlugin](interfaces/AutocompletePlugin.md)
|
||||
- [BothCommand](interfaces/BothCommand.md)
|
||||
- [ButtonCommand](interfaces/ButtonCommand.md)
|
||||
- [ChannelSelectCommand](interfaces/ChannelSelectCommand.md)
|
||||
- [CommandPlugin](interfaces/CommandPlugin.md)
|
||||
- [ContextMenuMsg](interfaces/ContextMenuMsg.md)
|
||||
- [ContextMenuUser](interfaces/ContextMenuUser.md)
|
||||
- [Controller](interfaces/Controller.md)
|
||||
- [Dependencies](interfaces/Dependencies.md)
|
||||
- [DiscordEmitterPlugin](interfaces/DiscordEmitterPlugin.md)
|
||||
- [DiscordEventPlugin](interfaces/DiscordEventPlugin.md)
|
||||
- [ErrorHandling](interfaces/ErrorHandling.md)
|
||||
- [EventPlugin](interfaces/EventPlugin.md)
|
||||
- [ExternalEmitterPlugin](interfaces/ExternalEmitterPlugin.md)
|
||||
- [ExternalEventPlugin](interfaces/ExternalEventPlugin.md)
|
||||
- [Logging](interfaces/Logging.md)
|
||||
- [MentionableSelectCommand](interfaces/MentionableSelectCommand.md)
|
||||
- [ModalSubmitCommand](interfaces/ModalSubmitCommand.md)
|
||||
- [Module](interfaces/Module.md)
|
||||
- [ModuleManager](interfaces/ModuleManager.md)
|
||||
- [Plugin](interfaces/Plugin.md)
|
||||
- [RoleSelectCommand](interfaces/RoleSelectCommand.md)
|
||||
- [SernAutocompleteData](interfaces/SernAutocompleteData.md)
|
||||
- [SernEmitterPlugin](interfaces/SernEmitterPlugin.md)
|
||||
- [SernEventPlugin](interfaces/SernEventPlugin.md)
|
||||
- [SernSubCommandData](interfaces/SernSubCommandData.md)
|
||||
- [SernSubCommandGroupData](interfaces/SernSubCommandGroupData.md)
|
||||
- [SlashCommand](interfaces/SlashCommand.md)
|
||||
- [StringSelectCommand](interfaces/StringSelectCommand.md)
|
||||
- [TextCommand](interfaces/TextCommand.md)
|
||||
- [UserSelectCommand](interfaces/UserSelectCommand.md)
|
||||
- [Wrapper](interfaces/Wrapper.md)
|
||||
|
||||
## Type Aliases
|
||||
|
||||
### AnyDefinedModule
|
||||
|
||||
Ƭ **AnyDefinedModule**: [`DefinedCommandModule`](modules.md#definedcommandmodule) \| [`DefinedEventModule`](modules.md#definedeventmodule)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:25](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L25)
|
||||
|
||||
___
|
||||
|
||||
### AnyModule
|
||||
|
||||
Ƭ **AnyModule**: [`CommandModule`](modules.md#commandmodule) \| [`EventModule`](modules.md#eventmodule)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:153](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L153)
|
||||
|
||||
___
|
||||
|
||||
### Args
|
||||
|
||||
Ƭ **Args**: [`ParseType`](modules.md#parsetype)<{ `slash`: [`SlashOptions`](modules.md#slashoptions) ; `text`: `string`[] }\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:15](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
### BaseOptions
|
||||
|
||||
Ƭ **BaseOptions**: `ApplicationCommandChoicesData` \| `ApplicationCommandNonOptionsData` \| `ApplicationCommandChannelOptionData` \| `ApplicationCommandNumericOptionData` \| `ApplicationCommandAttachmentOption` \| [`SernAutocompleteData`](interfaces/SernAutocompleteData.md)
|
||||
|
||||
Type that replaces autocomplete with [SernAutocompleteData](interfaces/SernAutocompleteData.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:190](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L190)
|
||||
|
||||
___
|
||||
|
||||
### CommandModule
|
||||
|
||||
Ƭ **CommandModule**: [`TextCommand`](interfaces/TextCommand.md) \| [`SlashCommand`](interfaces/SlashCommand.md) \| [`BothCommand`](interfaces/BothCommand.md) \| [`ContextMenuUser`](interfaces/ContextMenuUser.md) \| [`ContextMenuMsg`](interfaces/ContextMenuMsg.md) \| [`ButtonCommand`](interfaces/ButtonCommand.md) \| [`StringSelectCommand`](interfaces/StringSelectCommand.md) \| [`MentionableSelectCommand`](interfaces/MentionableSelectCommand.md) \| [`UserSelectCommand`](interfaces/UserSelectCommand.md) \| [`ChannelSelectCommand`](interfaces/ChannelSelectCommand.md) \| [`RoleSelectCommand`](interfaces/RoleSelectCommand.md) \| [`ModalSubmitCommand`](interfaces/ModalSubmitCommand.md)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:139](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L139)
|
||||
|
||||
___
|
||||
|
||||
### CommandModuleDefs
|
||||
|
||||
Ƭ **CommandModuleDefs**: `Object`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `1` | [`TextCommand`](interfaces/TextCommand.md) |
|
||||
| `1024` | [`RoleSelectCommand`](interfaces/RoleSelectCommand.md) |
|
||||
| `16` | [`ButtonCommand`](interfaces/ButtonCommand.md) |
|
||||
| `2` | [`SlashCommand`](interfaces/SlashCommand.md) |
|
||||
| `2048` | [`UserSelectCommand`](interfaces/UserSelectCommand.md) |
|
||||
| `256` | [`ChannelSelectCommand`](interfaces/ChannelSelectCommand.md) |
|
||||
| `3` | [`BothCommand`](interfaces/BothCommand.md) |
|
||||
| `32` | [`StringSelectCommand`](interfaces/StringSelectCommand.md) |
|
||||
| `4` | [`ContextMenuUser`](interfaces/ContextMenuUser.md) |
|
||||
| `512` | [`MentionableSelectCommand`](interfaces/MentionableSelectCommand.md) |
|
||||
| `64` | [`ModalSubmitCommand`](interfaces/ModalSubmitCommand.md) |
|
||||
| `8` | [`ContextMenuMsg`](interfaces/ContextMenuMsg.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:157](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L157)
|
||||
|
||||
___
|
||||
|
||||
### CommandModuleNoPlugins
|
||||
|
||||
Ƭ **CommandModuleNoPlugins**: { [T in CommandType]: Omit<CommandModuleDefs[T], "plugins" \| "onEvent"\> }
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:108](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L108)
|
||||
|
||||
___
|
||||
|
||||
### CommandModulePlugin
|
||||
|
||||
Ƭ **CommandModulePlugin**<`T`\>: [`EventPlugin`](interfaces/EventPlugin.md)<`T`\> \| [`CommandPlugin`](interfaces/CommandPlugin.md)<`T`\>
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends [`CommandType`](enums/CommandType.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:136](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L136)
|
||||
|
||||
___
|
||||
|
||||
### DefinedCommandModule
|
||||
|
||||
Ƭ **DefinedCommandModule**: [`CommandModule`](modules.md#commandmodule) & { `description`: `string` ; `name`: `string` }
|
||||
|
||||
After modules are transformed, name and description are given default values if none
|
||||
are provided to Module. This type represents that transformation
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:23](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L23)
|
||||
|
||||
___
|
||||
|
||||
### DefinedEventModule
|
||||
|
||||
Ƭ **DefinedEventModule**: [`EventModule`](modules.md#eventmodule) & { `name`: `string` }
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:24](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L24)
|
||||
|
||||
___
|
||||
|
||||
### EventModule
|
||||
|
||||
Ƭ **EventModule**: `DiscordEventCommand` \| `SernEventCommand` \| `ExternalEventCommand`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:138](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L138)
|
||||
|
||||
___
|
||||
|
||||
### EventModuleCommandPluginDefs
|
||||
|
||||
Ƭ **EventModuleCommandPluginDefs**: `Object`
|
||||
|
||||
Event Module Command Plugins
|
||||
|
||||
#### Type declaration
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `1` | [`DiscordEmitterPlugin`](interfaces/DiscordEmitterPlugin.md) |
|
||||
| `2` | [`SernEmitterPlugin`](interfaces/SernEmitterPlugin.md) |
|
||||
| `3` | [`ExternalEmitterPlugin`](interfaces/ExternalEmitterPlugin.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:126](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L126)
|
||||
|
||||
___
|
||||
|
||||
### EventModuleDefs
|
||||
|
||||
Ƭ **EventModuleDefs**: `Object`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `1` | `DiscordEventCommand` |
|
||||
| `2` | `SernEventCommand` |
|
||||
| `3` | `ExternalEventCommand` |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:172](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L172)
|
||||
|
||||
___
|
||||
|
||||
### EventModuleEventPluginDefs
|
||||
|
||||
Ƭ **EventModuleEventPluginDefs**: `Object`
|
||||
|
||||
Event Module Event Plugins
|
||||
|
||||
#### Type declaration
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `1` | [`DiscordEventPlugin`](interfaces/DiscordEventPlugin.md) |
|
||||
| `2` | [`SernEventPlugin`](interfaces/SernEventPlugin.md) |
|
||||
| `3` | [`ExternalEventPlugin`](interfaces/ExternalEventPlugin.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:117](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L117)
|
||||
|
||||
___
|
||||
|
||||
### EventModulePlugin
|
||||
|
||||
Ƭ **EventModulePlugin**<`T`\>: [`EventModuleEventPluginDefs`](modules.md#eventmoduleeventplugindefs)[`T`] \| [`EventModuleCommandPluginDefs`](modules.md#eventmodulecommandplugindefs)[`T`]
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends [`EventType`](enums/EventType.md) |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:132](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L132)
|
||||
|
||||
___
|
||||
|
||||
### EventModulesNoPlugins
|
||||
|
||||
Ƭ **EventModulesNoPlugins**: { [T in EventType]: Omit<EventModuleDefs[T], "plugins" \| "onEvent"\> }
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:111](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L111)
|
||||
|
||||
___
|
||||
|
||||
### InputCommandModule
|
||||
|
||||
Ƭ **InputCommandModule**: { [T in CommandType]: CommandModuleNoPlugins[T] & Object }[[`CommandType`](enums/CommandType.md)]
|
||||
|
||||
User inputs this type. Sern processes behind the scenes for better usage
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:141](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L141)
|
||||
|
||||
___
|
||||
|
||||
### InputEventModule
|
||||
|
||||
Ƭ **InputEventModule**: { [T in EventType]: EventModulesNoPlugins[T] & Object }[[`EventType`](enums/EventType.md)]
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/plugins/plugin.ts:145](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L145)
|
||||
|
||||
___
|
||||
|
||||
### LogPayload
|
||||
|
||||
Ƭ **LogPayload**<`T`\>: `Object`
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | `unknown` |
|
||||
|
||||
#### Type declaration
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `message` | `T` |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:36](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
### MapDeps
|
||||
|
||||
Ƭ **MapDeps**<`Deps`, `T`\>: `T` extends [infer First, ...(infer Rest extends readonly unknown[])] ? [`UnpackFunction`<`Deps`[`First`]\>, ...(MapDeps<Deps, Rest\> extends [never] ? [] : MapDeps<Deps, Rest\>)] : [`never`]
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `Deps` | extends [`Dependencies`](interfaces/Dependencies.md) |
|
||||
| `T` | extends readonly `unknown`[] |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:51](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L51)
|
||||
|
||||
___
|
||||
|
||||
### OptionalDependencies
|
||||
|
||||
Ƭ **OptionalDependencies**: ``"@sern/logger"``
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:57](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L57)
|
||||
|
||||
___
|
||||
|
||||
### ParseType
|
||||
|
||||
Ƭ **ParseType**<`T`\>: { [K in keyof T]: T[K] extends unknown ? [k: K, args: T[K]] : never }[keyof `T`]
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name |
|
||||
| :------ |
|
||||
| `T` |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:11](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L11)
|
||||
|
||||
___
|
||||
|
||||
### Payload
|
||||
|
||||
Ƭ **Payload**: { `module`: [`AnyModule`](modules.md#anymodule) ; `type`: [`Success`](enums/PayloadType.md#success) } \| { `module?`: [`AnyModule`](modules.md#anymodule) ; `reason`: `string` \| `Error` ; `type`: [`Failure`](enums/PayloadType.md#failure) } \| { `reason`: `string` ; `type`: [`Warning`](enums/PayloadType.md#warning) }
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:26](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L26)
|
||||
|
||||
___
|
||||
|
||||
### ReplyOptions
|
||||
|
||||
Ƭ **ReplyOptions**: `string` \| `Omit`<`InteractionReplyOptions`, ``"fetchReply"``\> \| `MessageReplyOptions`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:49](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L49)
|
||||
|
||||
___
|
||||
|
||||
### SernEventsMapping
|
||||
|
||||
Ƭ **SernEventsMapping**: `Object`
|
||||
|
||||
#### Type declaration
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `error` | [[`Payload`](modules.md#payload)] |
|
||||
| `module.activate` | [[`Payload`](modules.md#payload)] |
|
||||
| `module.register` | [[`Payload`](modules.md#payload)] |
|
||||
| `warning` | [[`Payload`](modules.md#payload)] |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:30](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L30)
|
||||
|
||||
___
|
||||
|
||||
### SernOptionsData
|
||||
|
||||
Ƭ **SernOptionsData**<`U`\>: `U` extends `ApplicationCommandSubCommandData` ? [`SernSubCommandData`](interfaces/SernSubCommandData.md) : `U` extends `ApplicationCommandSubGroupData` ? [`SernSubCommandGroupData`](interfaces/SernSubCommandGroupData.md) : [`BaseOptions`](modules.md#baseoptions)
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `U` | extends `ApplicationCommandOptionData` = `ApplicationCommandOptionData` |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/module.ts:210](https://github.com/sern-handler/handler/blob/3daacfc/src/types/module.ts#L210)
|
||||
|
||||
___
|
||||
|
||||
### Singleton
|
||||
|
||||
Ƭ **Singleton**<`T`\>: () => `T`
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name |
|
||||
| :------ |
|
||||
| `T` |
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (): `T`
|
||||
|
||||
##### Returns
|
||||
|
||||
`T`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:37](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
### SlashOptions
|
||||
|
||||
Ƭ **SlashOptions**: `Omit`<`CommandInteractionOptionResolver`, ``"getMessage"`` \| ``"getFocused"``\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:17](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
### Transient
|
||||
|
||||
Ƭ **Transient**<`T`\>: () => () => `T`
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name |
|
||||
| :------ |
|
||||
| `T` |
|
||||
|
||||
#### Type declaration
|
||||
|
||||
▸ (): () => `T`
|
||||
|
||||
##### Returns
|
||||
|
||||
`fn`
|
||||
|
||||
▸ (): `T`
|
||||
|
||||
##### Returns
|
||||
|
||||
`T`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/handler.ts:38](https://github.com/sern-handler/handler/blob/3daacfc/src/types/handler.ts#L38)
|
||||
|
||||
## Functions
|
||||
|
||||
### commandModule
|
||||
|
||||
▸ **commandModule**(`mod`): [`CommandModule`](modules.md#commandmodule)
|
||||
|
||||
The wrapper function to define command modules for sern
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `mod` | [`InputCommandModule`](modules.md#inputcommandmodule) |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`CommandModule`](modules.md#commandmodule)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:64](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L64)
|
||||
|
||||
___
|
||||
|
||||
### eventModule
|
||||
|
||||
▸ **eventModule**(`mod`): [`EventModule`](modules.md#eventmodule)
|
||||
|
||||
The wrapper function to define event modules for sern
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `mod` | [`InputEventModule`](modules.md#inputeventmodule) |
|
||||
|
||||
#### Returns
|
||||
|
||||
[`EventModule`](modules.md#eventmodule)
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:76](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L76)
|
||||
|
||||
___
|
||||
|
||||
### many
|
||||
|
||||
▸ **many**<`T`\>(`value`): () => () => `T`
|
||||
|
||||
A function that returns another function
|
||||
Used for transient in iti
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name |
|
||||
| :------ |
|
||||
| `T` |
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `value` | `T` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`fn`
|
||||
|
||||
▸ (): () => `T`
|
||||
|
||||
##### Returns
|
||||
|
||||
`fn`
|
||||
|
||||
▸ (): `T`
|
||||
|
||||
##### Returns
|
||||
|
||||
`T`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/utilities/functions.ts:16](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/utilities/functions.ts#L16)
|
||||
|
||||
___
|
||||
|
||||
### single
|
||||
|
||||
▸ **single**<`T`\>(`value`): () => `T`
|
||||
|
||||
A function that returns whatever value is provided.
|
||||
Used for singleton in iti
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name |
|
||||
| :------ |
|
||||
| `T` |
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `value` | `T` |
|
||||
|
||||
#### Returns
|
||||
|
||||
`fn`
|
||||
|
||||
▸ (): `T`
|
||||
|
||||
##### Returns
|
||||
|
||||
`T`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/utilities/functions.ts:10](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/utilities/functions.ts#L10)
|
||||
|
||||
___
|
||||
|
||||
### useContainerRaw
|
||||
|
||||
▸ **useContainerRaw**(): ``null`` \| `Container`<[`Dependencies`](interfaces/Dependencies.md), `Partial`<[`Dependencies`](interfaces/Dependencies.md)\>\>
|
||||
|
||||
Returns the underlying data structure holding all dependencies.
|
||||
Exposes some methods from iti
|
||||
|
||||
#### Returns
|
||||
|
||||
``null`` \| `Container`<[`Dependencies`](interfaces/Dependencies.md), `Partial`<[`Dependencies`](interfaces/Dependencies.md)\>\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/dependencies/provider.ts:74](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/dependencies/provider.ts#L74)
|
||||
@@ -1,129 +0,0 @@
|
||||
---
|
||||
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)
|
||||
|
||||
___
|
||||
|
||||
### eventModule
|
||||
|
||||
Re-exports [eventModule](../modules.md#eventmodule-1)
|
||||
|
||||
## Variables
|
||||
|
||||
### controller
|
||||
|
||||
• `Const` **controller**: `Object`
|
||||
|
||||
The object passed into every plugin to control a command's behavior
|
||||
|
||||
#### Type declaration
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `next` | () => `OkImpl`<`void`\> |
|
||||
| `stop` | () => `ErrImpl`<`void`\> |
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:55](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L55)
|
||||
|
||||
## 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/3daacfc/src/handler/sern.ts#L38)
|
||||
|
||||
___
|
||||
|
||||
### makeDependencies
|
||||
|
||||
▸ **makeDependencies**<`T`\>(`conf`): <V\>(...`keys`: [...V[]]) => [`MapDeps`](../modules.md#mapdeps)<`T`, `V`\>
|
||||
|
||||
#### Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `T` | extends [`Dependencies`](../interfaces/Dependencies.md) |
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| :------ | :------ | :------ |
|
||||
| `conf` | `Object` | a configuration for creating your project dependencies |
|
||||
| `conf.build` | (`root`: `Container`<`Record`<`string`, `unknown`\>, {}\>) => `Container`<`Partial`<`T`\>, {}\> | - |
|
||||
| `conf.exclude?` | `Set`<``"@sern/logger"``\> | - |
|
||||
|
||||
#### Returns
|
||||
|
||||
`fn`
|
||||
|
||||
▸ <`V`\>(...`keys`): [`MapDeps`](../modules.md#mapdeps)<`T`, `V`\>
|
||||
|
||||
##### Type parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `V` | extends keyof `T`[] |
|
||||
|
||||
##### Parameters
|
||||
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `...keys` | [...V[]] |
|
||||
|
||||
##### Returns
|
||||
|
||||
[`MapDeps`](../modules.md#mapdeps)<`T`, `V`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/handler/sern.ts:87](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/sern.ts#L87)
|
||||
@@ -1,2 +0,0 @@
|
||||
label: "Namespaces"
|
||||
position: 1
|
||||
@@ -1,25 +0,0 @@
|
||||
# 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)
|
||||
@@ -1,9 +0,0 @@
|
||||
# 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/)
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
|
||||
# Preparing to Code
|
||||
|
||||
After installing and IDE you need to install node.
|
||||
|
||||
You can download the LTS version of node right [here](https://nodejs.org/en/download/)
|
||||
|
||||
Install discord.js with
|
||||
```shell
|
||||
npm install discord.js@latest
|
||||
```
|
||||
@@ -1,34 +0,0 @@
|
||||
---
|
||||
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
|
||||
```
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
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.
|
||||
@@ -1,115 +0,0 @@
|
||||
---
|
||||
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!
|
||||
}
|
||||
});
|
||||
```
|
||||
@@ -1,63 +0,0 @@
|
||||
---
|
||||
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}`);
|
||||
}
|
||||
})
|
||||
```
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
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.
|
||||
@@ -1,24 +0,0 @@
|
||||
---
|
||||
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"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -1,157 +0,0 @@
|
||||
---
|
||||
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 🏓`
|
||||
@@ -1,14 +0,0 @@
|
||||
---
|
||||
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>
|
||||
@@ -1,16 +0,0 @@
|
||||
---
|
||||
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)
|
||||
:::
|
||||
@@ -1,174 +0,0 @@
|
||||
// @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: 'throw',
|
||||
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 : [
|
||||
// [
|
||||
// 'docusaurus-plugin-typedoc',
|
||||
// {
|
||||
// //if you're editing website, please change this to your local branch of sern to generate documentation
|
||||
// entryPoints: ['../sernHandlerV2/src/index.ts'],
|
||||
// tsconfig: '../sernHandlerV2/tsconfig-esm.json',
|
||||
// },
|
||||
// ]
|
||||
// ]
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
14
ec.config.mjs
Normal file
@@ -0,0 +1,14 @@
|
||||
import { defineEcConfig } from '@astrojs/starlight/expressive-code';
|
||||
import { pluginLineNumbers } from '@expressive-code/plugin-line-numbers';
|
||||
|
||||
export default defineEcConfig({
|
||||
plugins: [pluginLineNumbers()],
|
||||
defaultProps: {
|
||||
showLineNumbers: false,
|
||||
overridesByLang: {
|
||||
'js,javascript,typescript,ts,json': {
|
||||
showLineNumbers: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
31
lunaria.config.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"$schema": "./node_modules/@lunariajs/core/config.schema.json",
|
||||
"repository": {
|
||||
"name": "sern-handler/website"
|
||||
},
|
||||
"defaultLocale": {
|
||||
"label": "English",
|
||||
"lang": "en"
|
||||
},
|
||||
"locales": [
|
||||
{
|
||||
"label": "English",
|
||||
"lang": "en"
|
||||
},
|
||||
{
|
||||
"label": "Español",
|
||||
"lang": "es"
|
||||
},
|
||||
{
|
||||
"label": "Türkçe",
|
||||
"lang": "tr"
|
||||
}
|
||||
],
|
||||
"files": [
|
||||
{
|
||||
"location": "src/content/docs/**/*.mdx",
|
||||
"pattern": "src/content/docs/@lang/@path",
|
||||
"type": "universal"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
[build]
|
||||
publish = "/build"
|
||||
command = "npm run build"
|
||||
publish = "dist"
|
||||
command = "bun run build"
|
||||
22659
package-lock.json
generated
102
package.json
@@ -1,62 +1,54 @@
|
||||
{
|
||||
"name": "@sern/website",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"description": "Our modern, clean and beginner friendly web interface",
|
||||
"main": "index.js",
|
||||
"name": "sern-docs",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"docusaurus": "docusaurus",
|
||||
"start": "docusaurus start",
|
||||
"build": "docusaurus build",
|
||||
"swizzle": "docusaurus swizzle",
|
||||
"deploy": "docusaurus deploy",
|
||||
"clear": "docusaurus clear",
|
||||
"serve": "docusaurus serve",
|
||||
"write-translations": "docusaurus write-translations",
|
||||
"write-heading-ids": "docusaurus write-heading-ids",
|
||||
"typedoc-json": "typedoc --json ../sern-community/docs.json --pretty --entryPoints ../sernHandlerV2/src/index.ts --tsconfig ../sernHandlerV2/tsconfig-esm.json --excludeExternals"
|
||||
"dev": "astro dev",
|
||||
"start": "astro dev",
|
||||
"build": "astro check && astro build",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro",
|
||||
"postinstall": "bun run setup.ts",
|
||||
"lunaria:build": "lunaria build",
|
||||
"lunaria:preview": "lunaria preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "2.0.0-rc.1",
|
||||
"@docusaurus/plugin-content-pages": "^2.0.1",
|
||||
"@docusaurus/preset-classic": "2.0.0-rc.1",
|
||||
"@docusaurus/theme-search-algolia": "^2.0.0-rc.1",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"clsx": "^1.2.1",
|
||||
"jsdoc-parse-plus": "^1.3.0",
|
||||
"prism-react-renderer": "^1.3.5",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2"
|
||||
"@astrojs/check": "0.7.0",
|
||||
"@astrojs/react": "^3.5.0",
|
||||
"@astrojs/starlight": "0.23.1",
|
||||
"@astrojs/starlight-tailwind": "2.0.3",
|
||||
"@astropub/md": "^0.4.0",
|
||||
"@expressive-code/plugin-line-numbers": "^0.35.3",
|
||||
"@lunariajs/core": "^0.0.32",
|
||||
"@lunariajs/starlight": "^0.0.6",
|
||||
"@radix-ui/react-slot": "^1.0.2",
|
||||
"@types/react": "^18.3.3",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"astro": "4.9.1",
|
||||
"astro-og-canvas": "^0.5.0",
|
||||
"canvaskit-wasm": "^0.39.1",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^2.1.1",
|
||||
"embla-carousel-auto-scroll": "^8.1.4",
|
||||
"embla-carousel-react": "^8.1.4",
|
||||
"lucide-react": "^0.394.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"sharp": "^0.32.5",
|
||||
"starlight-blog": "^0.7.1",
|
||||
"starlight-links-validator": "^0.9.0",
|
||||
"starlight-typedoc": "0.12.2",
|
||||
"tailwind-merge": "^2.3.0",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"typedoc": "^0.25.13",
|
||||
"typedoc-plugin-markdown": "next",
|
||||
"typescript": "~5.4.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "2.0.0-rc.1",
|
||||
"docusaurus-plugin-typedoc": "^0.17.5",
|
||||
"typedoc": "^0.23.8",
|
||||
"typedoc-plugin-markdown": "^3.13.4"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.5%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sern-handler/website.git"
|
||||
},
|
||||
"author": "xxDeveloper",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/sern-handler/website/issues"
|
||||
},
|
||||
"homepage": "https://github.com/sern-handler/website#readme"
|
||||
"@tailwindcss/postcss": "^4.0.0",
|
||||
"@types/bun": "^1.1.1",
|
||||
"prettier": "^3.2.5",
|
||||
"prettier-plugin-astro": "^0.13.0",
|
||||
"prettier-plugin-tailwindcss": "^0.5.14"
|
||||
}
|
||||
}
|
||||
|
||||
7
postcss.config.cjs
Normal file
@@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
"@tailwindcss/postcss": {},
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
13
public/favicon.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1080 1080" width="1080" height="1080">
|
||||
<title>favicon</title>
|
||||
<style>
|
||||
.s0 { fill: #ffffff }
|
||||
.s1 { fill: #ed5087 }
|
||||
.s2 { fill: #20317b }
|
||||
</style>
|
||||
<path id="Shape 1" class="s0" d="m540 1080c-298.6 0-540-241.4-540-540 0-298.6 241.4-540 540-540 298.6 0 540 241.4 540 540 0 298.6-241.4 540-540 540z"/>
|
||||
<g id="Layer">
|
||||
<path id="Layer" class="s1" d="m344.6 406.3v129.4h280 280l-0.1-112.2-0.1-112.2-1.1-4c-4.1-14.4-14.5-24.8-29-28.9l-4-1.2-262.8-0.1-262.9-0.1z"/>
|
||||
<path id="Layer" class="s2" d="m175.3 661.3l0.1 109.2 1.2 3.5c2.3 7.6 5.4 13 10.5 18 5.2 5.2 10.5 8.3 18.7 10.8 2.5 0.8 21.3 0.8 265.1 1l262.3 0.1v-125.9-125.8h-279-279z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 726 B |
BIN
public/sern-logo.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
66
setup.ts
Normal file
@@ -0,0 +1,66 @@
|
||||
import { $ } from "bun";
|
||||
import { GITHUB_URL } from "~/utils/consts";
|
||||
import { existsSync, rm } from "node:fs";
|
||||
import { copyFile } from "node:fs/promises";
|
||||
|
||||
interface GitItem {
|
||||
name: string;
|
||||
repo: string;
|
||||
branch?: string;
|
||||
folder?: string;
|
||||
install?: boolean;
|
||||
degit?: boolean;
|
||||
}
|
||||
|
||||
const gits: GitItem[] = [
|
||||
{
|
||||
name: "sern-handler-v3",
|
||||
repo: "handler",
|
||||
branch: "version/3"
|
||||
},
|
||||
{
|
||||
name: "sern-handler-v4",
|
||||
repo: "handler",
|
||||
},
|
||||
{
|
||||
name: "tools",
|
||||
repo: "tools",
|
||||
folder: "packages",
|
||||
install: false,
|
||||
degit: true,
|
||||
},
|
||||
];
|
||||
|
||||
for (const git of gits) {
|
||||
await $`rm -rf ${git.name}`;
|
||||
await $`git clone -b ${git.branch ?? "main"} ${GITHUB_URL}/${git.repo} ${git.name}`;
|
||||
|
||||
if (git.install ?? true) {
|
||||
await $`cd ${git.name} && bun install`;
|
||||
}
|
||||
|
||||
if (git.folder) {
|
||||
await $`mv ${git.name}/${git.folder}/* ${git.name} && rm -rf ${git.name}/${git.folder}`;
|
||||
}
|
||||
|
||||
if (git.degit) {
|
||||
rm(git.name+"/.git", { recursive: true }, (err) => {
|
||||
if(err) {
|
||||
throw err;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const tools = (await $`ls -d tools/* | grep -v .github`.text())
|
||||
.split("\n")
|
||||
.filter(
|
||||
(t) => existsSync(`${t}/index.mdx`) && existsSync(`${t}/metadata.json`),
|
||||
);
|
||||
|
||||
for (const tool of tools) {
|
||||
await copyFile(
|
||||
`${tool}/index.mdx`,
|
||||
`src/content/docs/v4/tools/${tool.split("/")[1]}.mdx`,
|
||||
);
|
||||
}
|
||||
31
sidebars.js
@@ -1,31 +0,0 @@
|
||||
/**
|
||||
* Creating a sidebar enables you to:
|
||||
- create an ordered group of docs
|
||||
- render a sidebar for each doc of that group
|
||||
- provide next/previous navigation
|
||||
|
||||
The sidebars can be generated from the filesystem, or explicitly defined here.
|
||||
|
||||
Create as many sidebars as you want.
|
||||
*/
|
||||
|
||||
// @ts-check
|
||||
|
||||
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
|
||||
const sidebars = {
|
||||
// By default, Docusaurus generates a sidebar from the docs folder structure
|
||||
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
|
||||
|
||||
// But you can create a sidebar manually
|
||||
/*
|
||||
tutorialSidebar: [
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Tutorial',
|
||||
items: ['hello'],
|
||||
},
|
||||
],
|
||||
*/
|
||||
};
|
||||
|
||||
module.exports = sidebars;
|
||||
BIN
src/assets/blog/paper-logo.png
Normal file
|
After Width: | Height: | Size: 627 KiB |
BIN
src/assets/blog/paper-prototypes.jpg
Normal file
|
After Width: | Height: | Size: 2.4 MiB |
BIN
src/assets/blog/seren-tried.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
src/assets/docs/event-plugins.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
src/assets/docs/sern-publish.gif
Normal file
|
After Width: | Height: | Size: 39 KiB |