Compare commits
468 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2653f2adf | ||
| 202fe46c1e | |||
| 83387aaffc | |||
|
|
ebb4fa55b4 | ||
|
|
05b5961c16 | ||
|
|
26910a3b17 | ||
|
|
505438decf | ||
| 6bd4bd7475 | |||
| eaad749115 | |||
|
|
09ed080160 | ||
|
|
15f624c41f | ||
|
|
e540d6a241 | ||
|
|
fa5fc42fba | ||
|
|
f6ac97695e | ||
|
|
2a7a57236c | ||
|
|
5cc194b008 | ||
|
|
92c97b605f | ||
|
|
a773a1d658 | ||
|
|
b446871ec7 | ||
|
|
b94e34aad5 | ||
|
|
67154cedd5 | ||
|
|
3e032e70d8 | ||
|
|
e714241ecc | ||
|
|
73e1a4f39c | ||
|
|
1f66a7d195 | ||
|
|
c0b74d72ab | ||
|
|
2a01fe44fa | ||
|
|
66c8858533 | ||
|
|
69a4f07e8b | ||
|
|
af0eea3dd1 | ||
| b3096c1072 | |||
| 425d7cc739 | |||
| 49f1ea6b57 | |||
|
|
aeda731f97 | ||
| 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 | ||
|
|
39ff89aa00 | ||
|
|
486b4eced9 | ||
|
|
ccc5466b9c | ||
|
|
ffc3e5419a | ||
|
|
c965f6fca2 | ||
| ba9b7605a6 | |||
|
|
3842e2dc35 | ||
|
|
dd0a61d71a | ||
|
|
b588f64dd5 | ||
|
|
9a686c27f0 | ||
|
|
068ee4c7f3 | ||
|
|
61bef454da | ||
|
|
0c5cc44017 | ||
|
|
62e0d6a61e | ||
|
|
784d50b8a7 | ||
|
|
6857d86848 | ||
| 0936b2db77 | |||
|
|
db4c4adfa8 | ||
| 92a99887eb | |||
| ae3a02b066 | |||
| a745ed65f1 | |||
| f4377c8689 | |||
|
|
d253d3845a | ||
| d6378cf861 | |||
| b36464273e | |||
| 7648247f38 | |||
| 0efe03d88a | |||
|
|
7c8008625d | ||
|
|
98254a7391 | ||
|
|
85b6bbb1cf | ||
|
|
24569595f9 | ||
| 647c89755c | |||
| 0e6caf5c8a | |||
|
|
9a7e98bede | ||
|
|
43f6e227ca | ||
|
|
427fa8cdc9 | ||
|
|
ce68afeeaf | ||
|
|
0f01b5863e | ||
|
|
0fafea8539 | ||
|
|
96283b2d45 | ||
|
|
5f28408e05 | ||
|
|
6214328309 | ||
|
|
5244a9d020 | ||
|
|
95f07e7bfa | ||
|
|
428e975fee | ||
|
|
178a49dcc5 | ||
|
|
57b2a3ec73 | ||
|
|
40e4fe60ad | ||
|
|
2051a692be | ||
|
|
4e66d27350 | ||
|
|
e19b5e345e | ||
|
|
8845e3827d | ||
|
|
d30eb72469 | ||
|
|
73478e6d29 | ||
|
|
b9227a70e2 | ||
|
|
07b83f76fe | ||
|
|
3956759f06 | ||
|
|
88b4ffae11 | ||
|
|
2bce9458bf | ||
|
|
cd601bdefe | ||
|
|
ae9c40ee50 | ||
|
|
d4abf4bc9d | ||
|
|
e4eaf9dda2 | ||
|
|
5178605264 | ||
|
|
62982d91e4 | ||
|
|
e8acece51a | ||
|
|
463f0f61e0 | ||
|
|
d23c54dd2c | ||
|
|
e627b8bb55 | ||
|
|
add28784d2 | ||
|
|
0eccac926f | ||
|
|
f18d4ded88 | ||
|
|
a128e8dee6 | ||
|
|
211aeaefbd | ||
|
|
33301874f9 | ||
|
|
cc7bd61542 | ||
|
|
48912ed979 | ||
|
|
cd964af129 | ||
|
|
4e604a0449 | ||
|
|
6f4ab8ef9c | ||
|
|
e43eec5f20 | ||
|
|
fe27ff5a0c | ||
|
|
eb3b049a19 | ||
|
|
974b909946 | ||
|
|
f607b95346 | ||
|
|
ed91cceabc | ||
|
|
83320e49f6 | ||
|
|
fc3dde72f9 | ||
|
|
e0444a9998 | ||
|
|
8e4f5299df | ||
|
|
70010ffe57 | ||
|
|
97309dba62 | ||
|
|
31651e1963 | ||
|
|
05e188439d | ||
|
|
5bfe0f825c | ||
|
|
da0eefdf3b | ||
|
|
2ee09a6e7a | ||
|
|
fc134c0c9c | ||
|
|
24765af575 | ||
|
|
243c020628 | ||
|
|
cff7bd7e09 | ||
|
|
0eec925422 | ||
|
|
b08f1ff29f | ||
|
|
674184badb | ||
|
|
9cfb202014 | ||
|
|
c2e1028bc8 | ||
|
|
99a3ed27f7 | ||
|
|
0e83cb99ec | ||
|
|
23ab9d36f5 | ||
|
|
3fbfdeff76 | ||
|
|
3d05c4873f | ||
|
|
d34b97dfa8 | ||
|
|
e37640b6b2 | ||
|
|
0e363ad491 | ||
|
|
7ff79a4576 | ||
|
|
7771807657 | ||
|
|
8f33ee8e60 | ||
|
|
ed3a4a53e3 | ||
|
|
f84e2e686a | ||
|
|
93e3aeccd8 | ||
|
|
7140a7aef8 | ||
|
|
3abba07c89 | ||
|
|
28395413ae | ||
|
|
70e20f6030 | ||
|
|
2542851e2e | ||
|
|
c129a4e032 | ||
|
|
d8cab0782e | ||
|
|
bf0611bd79 | ||
|
|
3d0cf23c53 | ||
|
|
9a0f5a5dbc | ||
|
|
384e09541b | ||
|
|
97722573fa | ||
|
|
bc6f9048c2 | ||
|
|
c1d5931ccd | ||
|
|
81c7250f63 | ||
|
|
f1db5ff361 | ||
|
|
6aa53edc22 | ||
|
|
2f46becc47 | ||
|
|
54b58d944f | ||
|
|
f90b05bf92 |
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 }}
|
||||
24
.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# 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/
|
||||
8
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
7
.idea/discord.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="PROJECT_FILES" />
|
||||
<option name="description" value="" />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/website.iml" filepath="$PROJECT_DIR$/.idea/website.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
9
.idea/website.iml
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
411
.idea/workspace.xml
generated
Normal file
@@ -0,0 +1,411 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="53dd69d3-e01a-4656-b414-c727f5aa549a" name="Changes" comment="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" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="ComposerSettings">
|
||||
<execution />
|
||||
</component>
|
||||
<component name="Git.Merge.Settings">
|
||||
<option name="BRANCH" value="master" />
|
||||
</component>
|
||||
<component name="Git.Rebase.Settings">
|
||||
<option name="NEW_BASE" value="jacoobes" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_BRANCH_BY_REPOSITORY">
|
||||
<map>
|
||||
<entry key="$PROJECT_DIR$" value="main" />
|
||||
</map>
|
||||
</option>
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="GithubPullRequestsUISettings">
|
||||
<option name="selectedUrlAndAccountId">
|
||||
<UrlAndAccount>
|
||||
<option name="accountId" value="1fedf39a-45aa-449b-9d1d-6f25985f42b4" />
|
||||
<option name="url" value="https://github.com/sern-handler/website.git" />
|
||||
</UrlAndAccount>
|
||||
</option>
|
||||
</component>
|
||||
<component name="MacroExpansionManager">
|
||||
<option name="directoryName" value="d62oj9rg" />
|
||||
</component>
|
||||
<component name="MarkdownSettingsMigration">
|
||||
<option name="stateVersion" value="1" />
|
||||
</component>
|
||||
<component name="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"><![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 name="RecentsManager">
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="C:\Users\jacob\IdeaProjects\website\static\img" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="RunManager" selected="npm.start">
|
||||
<configuration name="build" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
|
||||
<package-json value="$PROJECT_DIR$/package.json" />
|
||||
<command value="run" />
|
||||
<scripts>
|
||||
<script value="build" />
|
||||
</scripts>
|
||||
<node-interpreter value="project" />
|
||||
<envs />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="start" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
|
||||
<package-json value="$PROJECT_DIR$/package.json" />
|
||||
<command value="run" />
|
||||
<scripts>
|
||||
<script value="start" />
|
||||
</scripts>
|
||||
<node-interpreter value="project" />
|
||||
<envs />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="typedoc-json" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
|
||||
<package-json value="$PROJECT_DIR$/package.json" />
|
||||
<command value="run" />
|
||||
<scripts>
|
||||
<script value="typedoc-json" />
|
||||
</scripts>
|
||||
<node-interpreter value="project" />
|
||||
<envs />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="npm.start" />
|
||||
<item itemvalue="npm.build" />
|
||||
<item itemvalue="npm.typedoc-json" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="53dd69d3-e01a-4656-b414-c727f5aa549a" name="Changes" comment="chore: edit link so no new windows" />
|
||||
<created>1660418057765</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1660418057765</updated>
|
||||
<workItem from="1660418059202" duration="1120000" />
|
||||
<workItem from="1660419190329" duration="211000" />
|
||||
<workItem from="1660703091089" duration="348000" />
|
||||
<workItem from="1661890199928" duration="3164000" />
|
||||
<workItem from="1661963277269" duration="666000" />
|
||||
<workItem from="1661966300011" duration="124000" />
|
||||
<workItem from="1664254948139" duration="391000" />
|
||||
<workItem from="1664301972139" duration="4356000" />
|
||||
<workItem from="1664322335828" duration="5088000" />
|
||||
<workItem from="1664342243187" duration="510000" />
|
||||
<workItem from="1664342844947" duration="41000" />
|
||||
<workItem from="1664345686862" duration="1690000" />
|
||||
<workItem from="1670994246639" duration="17000" />
|
||||
<workItem from="1670994294247" duration="1058000" />
|
||||
<workItem from="1671030002725" duration="5842000" />
|
||||
<workItem from="1671047161316" duration="3576000" />
|
||||
<workItem from="1671119393024" duration="3889000" />
|
||||
<workItem from="1673974979200" duration="2385000" />
|
||||
<workItem from="1674757791435" duration="925000" />
|
||||
<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>
|
||||
<option name="number" value="00001" />
|
||||
<option name="presentableId" value="LOCAL-00001" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1660418841831</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00002" summary="feat: remove old index.html in static/">
|
||||
<created>1660419375631</created>
|
||||
<option name="number" value="00002" />
|
||||
<option name="presentableId" value="LOCAL-00002" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1660419375631</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00003" summary="feat: edit action">
|
||||
<created>1660421982013</created>
|
||||
<option name="number" value="00003" />
|
||||
<option name="presentableId" value="LOCAL-00003" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1660421982013</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00004" summary="feat: delete needless assets/dir">
|
||||
<created>1660425803740</created>
|
||||
<option name="number" value="00004" />
|
||||
<option name="presentableId" value="LOCAL-00004" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1660425803740</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00005" summary="feat: action changes and edit link">
|
||||
<created>1660426493480</created>
|
||||
<option name="number" value="00005" />
|
||||
<option name="presentableId" value="LOCAL-00005" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1660426493480</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00006" summary="feat: add favicon">
|
||||
<created>1660427131558</created>
|
||||
<option name="number" value="00006" />
|
||||
<option name="presentableId" value="LOCAL-00006" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1660427131558</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00007" summary="fix: broken link">
|
||||
<created>1660427309873</created>
|
||||
<option name="number" value="00007" />
|
||||
<option name="presentableId" value="LOCAL-00007" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1660427309873</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00008" summary="chore: edit link so no new windows">
|
||||
<created>1660427590730</created>
|
||||
<option name="number" value="00008" />
|
||||
<option name="presentableId" value="LOCAL-00008" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1660427590730</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00009" summary="chore: fix typo">
|
||||
<created>1661890861168</created>
|
||||
<option name="number" value="00009" />
|
||||
<option name="presentableId" value="LOCAL-00009" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1661890861168</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00010" summary="feat: adding width attr">
|
||||
<created>1661963793586</created>
|
||||
<option name="number" value="00010" />
|
||||
<option name="presentableId" value="LOCAL-00010" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1661963793586</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00011" summary="feat: adding blogs">
|
||||
<created>1664307221790</created>
|
||||
<option name="number" value="00011" />
|
||||
<option name="presentableId" value="LOCAL-00011" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1664307221790</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00012" summary="feat: blogwork">
|
||||
<created>1664342459061</created>
|
||||
<option name="number" value="00012" />
|
||||
<option name="presentableId" value="LOCAL-00012" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1664342459061</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00013" summary="fix: links">
|
||||
<created>1664346272428</created>
|
||||
<option name="number" value="00013" />
|
||||
<option name="presentableId" value="LOCAL-00013" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1664346272428</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00014" summary="fix: try fiux">
|
||||
<created>1664346705175</created>
|
||||
<option name="number" value="00014" />
|
||||
<option name="presentableId" value="LOCAL-00014" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1664346705175</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00015" summary="feat: change date of blog">
|
||||
<created>1664347141696</created>
|
||||
<option name="number" value="00015" />
|
||||
<option name="presentableId" value="LOCAL-00015" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1664347141696</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00016" summary="feat: starting writing 2.0 release blog">
|
||||
<created>1670995351643</created>
|
||||
<option name="number" value="00016" />
|
||||
<option name="presentableId" value="LOCAL-00016" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1670995351643</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00017" summary="feat: adding more to blog">
|
||||
<created>1671035904313</created>
|
||||
<option name="number" value="00017" />
|
||||
<option name="presentableId" value="LOCAL-00017" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1671035904313</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00018" summary="feat: update docs and links">
|
||||
<created>1671049168115</created>
|
||||
<option name="number" value="00018" />
|
||||
<option name="presentableId" value="LOCAL-00018" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1671049168115</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00019" summary="feat: update docs and links">
|
||||
<created>1671049335597</created>
|
||||
<option name="number" value="00019" />
|
||||
<option name="presentableId" value="LOCAL-00019" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1671049335597</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00020" summary="feat: fix blog links">
|
||||
<created>1671050397033</created>
|
||||
<option name="number" value="00020" />
|
||||
<option name="presentableId" value="LOCAL-00020" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1671050397033</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00021" summary="feat: update blog">
|
||||
<created>1671121547701</created>
|
||||
<option name="number" value="00021" />
|
||||
<option name="presentableId" value="LOCAL-00021" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1671121547701</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00022" summary="feat: update typedoc">
|
||||
<created>1671121807771</created>
|
||||
<option name="number" value="00022" />
|
||||
<option name="presentableId" value="LOCAL-00022" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1671121807771</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00023" summary="feat: try again">
|
||||
<created>1671123452807</created>
|
||||
<option name="number" value="00023" />
|
||||
<option name="presentableId" value="LOCAL-00023" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1671123452807</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00024" summary="feat: update docs and some blog progress">
|
||||
<created>1673582791487</created>
|
||||
<option name="number" value="00024" />
|
||||
<option name="presentableId" value="LOCAL-00024" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1673582791487</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00025" summary="feat: update documentation and clarify documentation">
|
||||
<created>1673976226325</created>
|
||||
<option name="number" value="00025" />
|
||||
<option name="presentableId" value="LOCAL-00025" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1673976226325</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00026" summary="fix: links">
|
||||
<created>1673976805332</created>
|
||||
<option name="number" value="00026" />
|
||||
<option name="presentableId" value="LOCAL-00026" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1673976805332</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00027" summary="docs: add new plugins docs">
|
||||
<created>1673976828238</created>
|
||||
<option name="number" value="00027" />
|
||||
<option name="presentableId" value="LOCAL-00027" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1673976828238</updated>
|
||||
</task>
|
||||
<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">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
<option name="TAB_STATES">
|
||||
<map>
|
||||
<entry key="MAIN">
|
||||
<value>
|
||||
<State />
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="feat: add favicon" />
|
||||
<MESSAGE value="fix: broken link" />
|
||||
<MESSAGE value="chore: edit link so no new windows" />
|
||||
<MESSAGE value="chore: fix typo" />
|
||||
<MESSAGE value="feat: adding width attr" />
|
||||
<MESSAGE value="feat: adding blogs" />
|
||||
<MESSAGE value="feat: blogwork" />
|
||||
<MESSAGE value="fix: try fiux" />
|
||||
<MESSAGE value="feat: change date of blog" />
|
||||
<MESSAGE value="feat: starting writing 2.0 release blog" />
|
||||
<MESSAGE value="feat: adding more to blog" />
|
||||
<MESSAGE value="feat: update docs and links" />
|
||||
<MESSAGE value="feat: fix blog links" />
|
||||
<MESSAGE value="feat: update blog" />
|
||||
<MESSAGE value="feat: update typedoc" />
|
||||
<MESSAGE value="feat: try again" />
|
||||
<MESSAGE value="feat: add image" />
|
||||
<MESSAGE value="feat: update docs and some blog progress" />
|
||||
<MESSAGE value="feat: update documentation and clarify documentation" />
|
||||
<MESSAGE value="fix: links" />
|
||||
<MESSAGE value="docs: add new plugins docs" />
|
||||
<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",
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
12
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"files.exclude": {
|
||||
"**/.git": true,
|
||||
"**/.svn": true,
|
||||
"**/.hg": true,
|
||||
"**/CVS": true,
|
||||
"**/.DS_Store": true,
|
||||
"**/Thumbs.db": true,
|
||||
".idea": true,
|
||||
".vscode": true
|
||||
}
|
||||
}
|
||||
@@ -1 +1,3 @@
|
||||
# docs
|
||||
# Website (v2)
|
||||
|
||||
sern's clean, modern, and user-friendly web interface. (now built with [Starlight](https://starlight.astro.build/))
|
||||
|
||||
11625
assets/css/style.css
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 122 KiB |
@@ -1,2 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
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()]
|
||||
});
|
||||
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"
|
||||
}
|
||||
}
|
||||
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,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
71
index.html
@@ -1,71 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Sern - A batteries-included & powerful discord.js framework</title>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/>
|
||||
<link rel="stylesheet" href="assets/css/style.css">
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
||||
<link rel="shortcut icon" href="assets/images/icon.png" type="image/x-icon"/>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.3/font/bootstrap-icons.css">
|
||||
|
||||
<meta name="og:title" content="Sern - A batteries-included & powerful discord.js framework">
|
||||
<meta name="og:description" content="A customizable, batteries-included, powerful discord.js framework to automate and streamline bot development">
|
||||
<meta name="og:image" content="assets/images/icon.png">
|
||||
<meta name="og:url" content="https://github.com/sern-handler/handler">
|
||||
<meta name="og:type" content="website">
|
||||
|
||||
<script src="assets/js/main.js"></script>
|
||||
</head>
|
||||
<body class="user-select-none">
|
||||
<nav class="navbar navbar-expand-lg py-1.25 navbar-light bg-light shadow-rm">
|
||||
<div class="container">
|
||||
<a href="#" class="navbar-brand">
|
||||
<img src="assets/images/logo.png" width="42" height="40" alt="" class="d-inline-block align-middle mr-2">
|
||||
<span class="text font-weight-bold font-family-ubuntu hover-zoom">SernHandlerㅤ</span>
|
||||
<span>7 <i class="bi bi-star-fill padding-7px"></i>・270 <i class="bi bi-cloud-arrow-down-fill"></i></span>
|
||||
</a>
|
||||
|
||||
<button type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation" class="navbar-toggler"><span class="navbar-toggler-icon"></span></button>
|
||||
|
||||
<div id="navbarSupportedContent" class="collapse navbar-collapse">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-puzzle-fill mr-2"></i>Plugins (UD)</a></li>
|
||||
<li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-github mr-2"></i>Github Profile</a></li>
|
||||
<li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-compass-fill mr-2"></i>Guide</a></li>
|
||||
<li class="nav-item"><a href="#" class="nav-link"><i class="bi bi-bookmarks-fill mr-2"></i>Documentation</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<header class="masthead">
|
||||
<div class="container px-5">
|
||||
<div class="row gx-5 align-items-center">
|
||||
<div class="col-lg-6">
|
||||
<div class="mb-5 mb-lg-0 text-center text-lg-start">
|
||||
<h1 class="display-1 lh-1 mb-3 fw-bold text-bold">Handlers. Redefined.</h1>
|
||||
<p class="lead fw-normal text-muted mb-5 text-align-left">With the support of the community made plugins and powerful CLI, it's more than just a handler.</p>
|
||||
<div class="d-flex flex-column flex-lg-row align-items-center">
|
||||
<img class="app-badge" src="assets/images/R.png" alt="..." /><p class="fw-bold font-family-ubuntu text ml-2 mt-3 qi">• npm install @sern/handler</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="masthead-device-mockup">
|
||||
<div class="device-wrapper">
|
||||
<div class="device" data-device="iPhoneX" data-orientation="portrait" data-color="black">
|
||||
<div class="screen">
|
||||
<img src="assets/images/logo.png" class="hero-img" height="120%">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</body>
|
||||
</html>
|
||||
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"
|
||||
}
|
||||
]
|
||||
}
|
||||
3
netlify.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
[build]
|
||||
publish = "dist"
|
||||
command = "bun run build"
|
||||
63
package.json
@@ -1,19 +1,54 @@
|
||||
{
|
||||
"name": "@sern/website",
|
||||
"version": "1.0.0",
|
||||
"description": "Sern's modern, clean and beginner friendly web interface",
|
||||
"main": "index.js",
|
||||
"name": "sern-docs",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"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"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sern-handler/website.git"
|
||||
"dependencies": {
|
||||
"@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"
|
||||
},
|
||||
"author": "xxDeveloper",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/sern-handler/website/issues"
|
||||
},
|
||||
"homepage": "https://github.com/sern-handler/website#readme"
|
||||
"devDependencies": {
|
||||
"@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": {},
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
1
public/CNAME
Normal file
@@ -0,0 +1 @@
|
||||
sern.dev
|
||||
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`,
|
||||
);
|
||||
}
|
||||
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 |
BIN
src/assets/docs/watch-example2.mp4
Normal file
BIN
src/assets/logo/navbar-icon.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
src/assets/logo/sern-logo.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
11
src/assets/logo/sern-logo.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2160 2160" width="2160" height="2160">
|
||||
<title>sern-logo</title>
|
||||
<style>
|
||||
.s0 { fill: #ed5087 }
|
||||
.s1 { fill: #20317b }
|
||||
</style>
|
||||
<g id="Layer">
|
||||
<path id="Layer" class="s0" d="m690 812v258h558.5 558.5l-0.2-223.8-0.3-223.7-2.2-8c-8.1-28.7-28.9-49.5-57.8-57.7l-8-2.3-524.2-0.3-524.3-0.2z"/>
|
||||
<path id="Layer" class="s1" d="m352.2 1320.7l0.3 217.8 2.2 7c4.7 15.2 10.9 25.8 21 35.8 10.4 10.5 21 16.6 37.3 21.5 5.1 1.6 42.5 1.7 528.8 2l523.2 0.2v-251-251h-556.5-556.5z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 554 B |
43
src/components/BotCard.tsx
Normal file
@@ -0,0 +1,43 @@
|
||||
import { Link } from "lucide-react";
|
||||
import type { Bot } from "~/utils/types";
|
||||
|
||||
export default ({ bot }: { bot: Bot }) => (
|
||||
<div className="not-content relative h-full border border-gray-300 p-4 dark:border-gray-700">
|
||||
<div className="mb-4 flex items-center justify-between">
|
||||
<img src={bot.pfpLink} alt={bot.name} className="h-8 w-8 rounded-full" />
|
||||
<h3>{bot.name}</h3>
|
||||
<div className="flex items-center space-x-2">
|
||||
{bot.srcLink && (
|
||||
<a
|
||||
href={bot.srcLink}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="h-6 w-6 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"
|
||||
>
|
||||
<svg
|
||||
role="img"
|
||||
viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="fill-current"
|
||||
>
|
||||
<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" />
|
||||
</svg>
|
||||
</a>
|
||||
)}
|
||||
{bot.inviteLink && (
|
||||
<a
|
||||
href={bot.inviteLink}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="h-6 w-6 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"
|
||||
>
|
||||
<Link size={"1.5rem"} />
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<p>{bot.description}</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
36
src/components/BotCarousel.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
import AutoScroll from "embla-carousel-auto-scroll";
|
||||
import {
|
||||
Carousel,
|
||||
CarouselContent,
|
||||
CarouselItem,
|
||||
} from "~/components/ui/carousel";
|
||||
import type { Bot } from "~/utils/types";
|
||||
import BotCard from "./BotCard";
|
||||
|
||||
export default ({ bots }: { bots: Bot[] }) => (
|
||||
<div className="not-content flex justify-center">
|
||||
<Carousel
|
||||
opts={{
|
||||
align: "start",
|
||||
loop: true,
|
||||
}}
|
||||
plugins={[
|
||||
AutoScroll({
|
||||
speed: 0.75,
|
||||
stopOnMouseEnter: true,
|
||||
stopOnInteraction: false,
|
||||
startDelay: 0,
|
||||
}),
|
||||
]}
|
||||
className="w-11/12 md:w-full"
|
||||
>
|
||||
<CarouselContent>
|
||||
{bots.map((bot) => (
|
||||
<CarouselItem key={bot.id} className="pl-6 md:basis-1/2">
|
||||
<BotCard bot={bot} />
|
||||
</CarouselItem>
|
||||
))}
|
||||
</CarouselContent>
|
||||
</Carousel>
|
||||
</div>
|
||||
);
|
||||
21
src/components/CommunityShowcase.astro
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
import { z } from "astro/zod";
|
||||
import BotCarousel from "~/components/BotCarousel";
|
||||
import { BotSchema } from "~/utils/types";
|
||||
import { zodFetch } from "~/utils/fetch";
|
||||
import { shuffle } from "~/utils/shuffle";
|
||||
|
||||
const botResponse = await zodFetch(
|
||||
z.array(BotSchema),
|
||||
"Failed to fetch community bot data",
|
||||
"https://frontpage.sern.dev/getBots",
|
||||
);
|
||||
|
||||
if (!botResponse.ok) {
|
||||
return console.error(botResponse.error);
|
||||
}
|
||||
---
|
||||
|
||||
<div>
|
||||
<BotCarousel bots={shuffle(botResponse.value)} client:load />
|
||||
</div>
|
||||
16
src/components/DeprecatedIcon.astro
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
import { Icon } from "@astrojs/starlight/components";
|
||||
---
|
||||
|
||||
<span class="group">
|
||||
<span class="group-hover:hidden">
|
||||
<div
|
||||
class="flex h-8 w-8 items-center justify-center rounded border border-[var(--sl-color-orange)] bg-[var(--sl-color-orange-low)] p-1 text-gray-900 dark:text-white"
|
||||
>
|
||||
<Icon name="warning" />
|
||||
</div>
|
||||
</span>
|
||||
<span class="hidden group-hover:block">
|
||||
<b>[DEPRECATED]</b>
|
||||
</span>
|
||||
</span>
|
||||
42
src/components/Modal.astro
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
import { Icon } from "@astrojs/starlight/components";
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
button: string;
|
||||
icon: Parameters<typeof Icon>[0]["name"];
|
||||
}
|
||||
|
||||
const { title, icon, button } = Astro.props;
|
||||
const modalId = `modal-${Math.random().toString(36).slice(2)}`;
|
||||
---
|
||||
|
||||
<div>
|
||||
<label
|
||||
for={modalId}
|
||||
class="flex cursor-pointer items-center justify-center rounded-lg bg-accent-600 px-4 py-2 text-white dark:bg-accent-200 dark:text-gray-900"
|
||||
>
|
||||
<b>{button}</b>
|
||||
<Icon name={icon} class="h-6 w-6" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<input
|
||||
type="checkbox"
|
||||
id={modalId}
|
||||
class="peer fixed appearance-none opacity-0"
|
||||
/>
|
||||
|
||||
<label
|
||||
for={modalId}
|
||||
class="pointer-events-none invisible fixed inset-0 z-50 flex cursor-pointer items-center justify-center overflow-hidden overscroll-contain bg-white/70 opacity-0 backdrop-blur-md transition-all duration-200 ease-in-out peer-checked:pointer-events-auto peer-checked:visible peer-checked:opacity-100 dark:bg-gray-800/70 peer-checked:[&>*]:translate-y-0 peer-checked:[&>*]:scale-100"
|
||||
>
|
||||
<div
|
||||
class="w-5/6 -translate-y-4 scale-95 transform border border-gray-300 bg-white p-4 shadow-lg transition-all duration-200 ease-in-out dark:border-gray-700 dark:bg-gray-900"
|
||||
>
|
||||
<h2 class="mb-4 text-xl font-bold">{title}</h2>
|
||||
<slot />
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
77
src/components/PackageManagers.astro
Normal file
@@ -0,0 +1,77 @@
|
||||
---
|
||||
import { Tabs, TabItem, Code } from "@astrojs/starlight/components";
|
||||
|
||||
type Command = "add" | "update" | "remove" | "create" | "dev";
|
||||
type PackageManager = (typeof packageManagers)[number];
|
||||
|
||||
const packageManagers = ["NPM", "PNPM", "Yarn", "Bun"] as const;
|
||||
|
||||
interface Props {
|
||||
command: Command;
|
||||
text: string;
|
||||
}
|
||||
|
||||
const packageManagerCode = (
|
||||
command: Command,
|
||||
text: string,
|
||||
manager: PackageManager,
|
||||
) => {
|
||||
const commands: Record<Command, Record<PackageManager, string>> = {
|
||||
add: {
|
||||
NPM: `npm install ${text}`,
|
||||
Yarn: `yarn add ${text}`,
|
||||
PNPM: `pnpm add ${text}`,
|
||||
Bun: `bun add ${text}`,
|
||||
},
|
||||
update: {
|
||||
NPM: `npm update ${text}`,
|
||||
Yarn: `yarn upgrade ${text}`,
|
||||
PNPM: `pnpm update ${text}`,
|
||||
Bun: `bun update ${text}`,
|
||||
},
|
||||
remove: {
|
||||
NPM: `npm uninstall ${text}`,
|
||||
Yarn: `yarn remove ${text}`,
|
||||
PNPM: `pnpm remove ${text}`,
|
||||
Bun: `bun remove ${text}`,
|
||||
},
|
||||
create: {
|
||||
NPM: `npm create ${text}`,
|
||||
Yarn: `yarn create ${text}`,
|
||||
PNPM: `pnpm create ${text}`,
|
||||
Bun: `bun create ${text}`,
|
||||
},
|
||||
dev: {
|
||||
NPM: `npm run build && npm start`,
|
||||
Yarn: `yarn build && yarn start`,
|
||||
PNPM: `pnpm build && pnpm start`,
|
||||
Bun: `bun build && bun start`,
|
||||
}
|
||||
};
|
||||
|
||||
return commands[command][manager];
|
||||
};
|
||||
|
||||
const packageManagerIcon = (manager: PackageManager) => {
|
||||
const icons = {
|
||||
NPM: "seti:npm",
|
||||
Yarn: "seti:yarn",
|
||||
PNPM: "pnpm",
|
||||
Bun: "bun",
|
||||
} as const;
|
||||
|
||||
return icons[manager];
|
||||
};
|
||||
|
||||
const { command, text } = Astro.props;
|
||||
---
|
||||
|
||||
<Tabs syncKey="package-manager">
|
||||
{
|
||||
packageManagers.map((manager) => (
|
||||
<TabItem label={manager} icon={packageManagerIcon(manager)}>
|
||||
<Code lang="sh" code={packageManagerCode(command, text, manager)} />
|
||||
</TabItem>
|
||||
))
|
||||
}
|
||||
</Tabs>
|
||||
32
src/components/PluginCard.astro
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
import { Markdown } from "@astropub/md";
|
||||
import PluginModal from "./PluginModal.astro";
|
||||
import DeprecatedIcon from "./DeprecatedIcon.astro";
|
||||
import type { Plugin } from "~/utils/types";
|
||||
|
||||
type Props = Plugin;
|
||||
|
||||
const plugin = Astro.props;
|
||||
const description = (
|
||||
plugin.description.length > 200
|
||||
? plugin.description.slice(0, 200) + "..."
|
||||
: plugin.description
|
||||
).replace("[DEPRECATED]", "");
|
||||
|
||||
const deprecated = plugin.description.includes("[DEPRECATED]");
|
||||
---
|
||||
|
||||
<div
|
||||
class="not-content relative border border-gray-300 p-4 dark:border-gray-700"
|
||||
>
|
||||
<div class="mb-4 flex items-center justify-between">
|
||||
<h3>{plugin.name}</h3>
|
||||
{deprecated && <DeprecatedIcon />}
|
||||
</div>
|
||||
<div class="mb-14">
|
||||
<Markdown of={description} />
|
||||
</div>
|
||||
<div class="absolute bottom-4 right-4">
|
||||
<PluginModal {...plugin} />
|
||||
</div>
|
||||
</div>
|
||||
49
src/components/PluginModal.astro
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
import { Code } from "@astrojs/starlight/components";
|
||||
import { Markdown } from "@astropub/md";
|
||||
import type { Plugin } from "~/utils/types";
|
||||
import Modal from "./Modal.astro";
|
||||
|
||||
type Props = Plugin;
|
||||
|
||||
const { name, description, example, author } = Astro.props;
|
||||
|
||||
const trimmedCode = example
|
||||
.replace("```ts", "")
|
||||
.replace("```", "")
|
||||
.split("\n")
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
|
||||
const trimmedDescription = description.replace("[DEPRECATED]", "");
|
||||
const deprecated = description.includes("[DEPRECATED]");
|
||||
|
||||
const authors = new Intl.ListFormat("en", {
|
||||
style: "long",
|
||||
type: "conjunction",
|
||||
}).format(
|
||||
author.map((s) =>
|
||||
s
|
||||
.replace(/[\]<>@]/g, "")
|
||||
.split("[")[0]
|
||||
.trim(),
|
||||
),
|
||||
);
|
||||
---
|
||||
|
||||
<Modal button="View" icon="right-arrow" title={`${name} by ${authors}`}>
|
||||
{
|
||||
deprecated && (
|
||||
<div class="mb-4 rounded-md border border-[var(--sl-color-orange)] bg-[var(--sl-color-orange-low)] p-2 text-gray-900 dark:text-white">
|
||||
This plugin is deprecated and should not be used in new projects.
|
||||
</div>
|
||||
)
|
||||
}
|
||||
<div class="mb-4">
|
||||
<Code lang="bash" code={`sern plugin ${name}`} />
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<Markdown of={trimmedDescription} />
|
||||
</div>
|
||||
<Code lang="ts" title="src/commands/ping.ts" code={trimmedCode} />
|
||||
</Modal>
|
||||
35
src/components/SponsorCard.astro
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
import type { Contributor } from "~/utils/types";
|
||||
|
||||
type Props = Contributor;
|
||||
|
||||
const {
|
||||
name,
|
||||
image,
|
||||
totalAmountDonated,
|
||||
isAdmin,
|
||||
publicMessage,
|
||||
collectiveSlug,
|
||||
} = Astro.props;
|
||||
---
|
||||
|
||||
<a
|
||||
class="not-content relative flex flex-col items-center border border-gray-300 p-4 text-inherit no-underline hover:bg-gray-200 dark:border-gray-700 dark:hover:bg-gray-800"
|
||||
href={`https://opencollective.com/${collectiveSlug}`}
|
||||
>
|
||||
<div class="flex flex-col items-center text-center">
|
||||
<img class="h-16 w-16 rounded-full" src={image} alt={name} />
|
||||
{
|
||||
isAdmin && (
|
||||
<div class="mt-2 rounded-full bg-accent-600 px-2 py-1 text-xs font-semibold text-white dark:bg-accent-200 dark:text-gray-900">
|
||||
Admin
|
||||
</div>
|
||||
)
|
||||
}
|
||||
<p class="font-semibold">{name}</p>
|
||||
</div>
|
||||
<p class="mb-8 text-center text-sm">{publicMessage}</p>
|
||||
<p class="absolute bottom-2 text-center font-semibold">
|
||||
${totalAmountDonated / 100}
|
||||
</p>
|
||||
</a>
|
||||
56
src/components/ui/button.tsx
Normal file
@@ -0,0 +1,56 @@
|
||||
import * as React from "react"
|
||||
import { Slot } from "@radix-ui/react-slot"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "~/utils"
|
||||
|
||||
const buttonVariants = cva(
|
||||
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300",
|
||||
{
|
||||
variants: {
|
||||
variant: {
|
||||
default: "bg-neutral-900 text-neutral-50 hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90",
|
||||
destructive:
|
||||
"bg-red-500 text-neutral-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/90",
|
||||
outline:
|
||||
"border border-neutral-200 bg-white hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",
|
||||
secondary:
|
||||
"bg-neutral-100 text-neutral-900 hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80",
|
||||
ghost: "hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",
|
||||
link: "text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50",
|
||||
},
|
||||
size: {
|
||||
default: "h-10 px-4 py-2",
|
||||
sm: "h-9 rounded-md px-3",
|
||||
lg: "h-11 rounded-md px-8",
|
||||
icon: "h-10 w-10",
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
variant: "default",
|
||||
size: "default",
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
export interface ButtonProps
|
||||
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
||||
VariantProps<typeof buttonVariants> {
|
||||
asChild?: boolean
|
||||
}
|
||||
|
||||
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
||||
({ className, variant, size, asChild = false, ...props }, ref) => {
|
||||
const Comp = asChild ? Slot : "button"
|
||||
return (
|
||||
<Comp
|
||||
className={cn(buttonVariants({ variant, size, className }))}
|
||||
ref={ref}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
)
|
||||
Button.displayName = "Button"
|
||||
|
||||
export { Button, buttonVariants }
|
||||
260
src/components/ui/carousel.tsx
Normal file
@@ -0,0 +1,260 @@
|
||||
import * as React from "react"
|
||||
import useEmblaCarousel, {
|
||||
type UseEmblaCarouselType,
|
||||
} from "embla-carousel-react"
|
||||
import { ArrowLeft, ArrowRight } from "lucide-react"
|
||||
|
||||
import { cn } from "~/utils"
|
||||
import { Button } from "~/components/ui/button"
|
||||
|
||||
type CarouselApi = UseEmblaCarouselType[1]
|
||||
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>
|
||||
type CarouselOptions = UseCarouselParameters[0]
|
||||
type CarouselPlugin = UseCarouselParameters[1]
|
||||
|
||||
type CarouselProps = {
|
||||
opts?: CarouselOptions
|
||||
plugins?: CarouselPlugin
|
||||
orientation?: "horizontal" | "vertical"
|
||||
setApi?: (api: CarouselApi) => void
|
||||
}
|
||||
|
||||
type CarouselContextProps = {
|
||||
carouselRef: ReturnType<typeof useEmblaCarousel>[0]
|
||||
api: ReturnType<typeof useEmblaCarousel>[1]
|
||||
scrollPrev: () => void
|
||||
scrollNext: () => void
|
||||
canScrollPrev: boolean
|
||||
canScrollNext: boolean
|
||||
} & CarouselProps
|
||||
|
||||
const CarouselContext = React.createContext<CarouselContextProps | null>(null)
|
||||
|
||||
function useCarousel() {
|
||||
const context = React.useContext(CarouselContext)
|
||||
|
||||
if (!context) {
|
||||
throw new Error("useCarousel must be used within a <Carousel />")
|
||||
}
|
||||
|
||||
return context
|
||||
}
|
||||
|
||||
const Carousel = React.forwardRef<
|
||||
HTMLDivElement,
|
||||
React.HTMLAttributes<HTMLDivElement> & CarouselProps
|
||||
>(
|
||||
(
|
||||
{
|
||||
orientation = "horizontal",
|
||||
opts,
|
||||
setApi,
|
||||
plugins,
|
||||
className,
|
||||
children,
|
||||
...props
|
||||
},
|
||||
ref
|
||||
) => {
|
||||
const [carouselRef, api] = useEmblaCarousel(
|
||||
{
|
||||
...opts,
|
||||
axis: orientation === "horizontal" ? "x" : "y",
|
||||
},
|
||||
plugins
|
||||
)
|
||||
const [canScrollPrev, setCanScrollPrev] = React.useState(false)
|
||||
const [canScrollNext, setCanScrollNext] = React.useState(false)
|
||||
|
||||
const onSelect = React.useCallback((api: CarouselApi) => {
|
||||
if (!api) {
|
||||
return
|
||||
}
|
||||
|
||||
setCanScrollPrev(api.canScrollPrev())
|
||||
setCanScrollNext(api.canScrollNext())
|
||||
}, [])
|
||||
|
||||
const scrollPrev = React.useCallback(() => {
|
||||
api?.scrollPrev()
|
||||
}, [api])
|
||||
|
||||
const scrollNext = React.useCallback(() => {
|
||||
api?.scrollNext()
|
||||
}, [api])
|
||||
|
||||
const handleKeyDown = React.useCallback(
|
||||
(event: React.KeyboardEvent<HTMLDivElement>) => {
|
||||
if (event.key === "ArrowLeft") {
|
||||
event.preventDefault()
|
||||
scrollPrev()
|
||||
} else if (event.key === "ArrowRight") {
|
||||
event.preventDefault()
|
||||
scrollNext()
|
||||
}
|
||||
},
|
||||
[scrollPrev, scrollNext]
|
||||
)
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!api || !setApi) {
|
||||
return
|
||||
}
|
||||
|
||||
setApi(api)
|
||||
}, [api, setApi])
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!api) {
|
||||
return
|
||||
}
|
||||
|
||||
onSelect(api)
|
||||
api.on("reInit", onSelect)
|
||||
api.on("select", onSelect)
|
||||
|
||||
return () => {
|
||||
api?.off("select", onSelect)
|
||||
}
|
||||
}, [api, onSelect])
|
||||
|
||||
return (
|
||||
<CarouselContext.Provider
|
||||
value={{
|
||||
carouselRef,
|
||||
api: api,
|
||||
opts,
|
||||
orientation:
|
||||
orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
||||
scrollPrev,
|
||||
scrollNext,
|
||||
canScrollPrev,
|
||||
canScrollNext,
|
||||
}}
|
||||
>
|
||||
<div
|
||||
ref={ref}
|
||||
onKeyDownCapture={handleKeyDown}
|
||||
className={cn("relative", className)}
|
||||
role="region"
|
||||
aria-roledescription="carousel"
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
</CarouselContext.Provider>
|
||||
)
|
||||
}
|
||||
)
|
||||
Carousel.displayName = "Carousel"
|
||||
|
||||
const CarouselContent = React.forwardRef<
|
||||
HTMLDivElement,
|
||||
React.HTMLAttributes<HTMLDivElement>
|
||||
>(({ className, ...props }, ref) => {
|
||||
const { carouselRef, orientation } = useCarousel()
|
||||
|
||||
return (
|
||||
<div ref={carouselRef} className="overflow-hidden">
|
||||
<div
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"flex",
|
||||
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
CarouselContent.displayName = "CarouselContent"
|
||||
|
||||
const CarouselItem = React.forwardRef<
|
||||
HTMLDivElement,
|
||||
React.HTMLAttributes<HTMLDivElement>
|
||||
>(({ className, ...props }, ref) => {
|
||||
const { orientation } = useCarousel()
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={ref}
|
||||
role="group"
|
||||
aria-roledescription="slide"
|
||||
className={cn(
|
||||
"min-w-0 shrink-0 grow-0 basis-full",
|
||||
orientation === "horizontal" ? "pl-4" : "pt-4",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
})
|
||||
CarouselItem.displayName = "CarouselItem"
|
||||
|
||||
const CarouselPrevious = React.forwardRef<
|
||||
HTMLButtonElement,
|
||||
React.ComponentProps<typeof Button>
|
||||
>(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
||||
const { orientation, scrollPrev, canScrollPrev } = useCarousel()
|
||||
|
||||
return (
|
||||
<Button
|
||||
ref={ref}
|
||||
variant={variant}
|
||||
size={size}
|
||||
className={cn(
|
||||
"absolute h-8 w-8 rounded-full",
|
||||
orientation === "horizontal"
|
||||
? "-left-12 top-1/2 -translate-y-1/2"
|
||||
: "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
||||
className
|
||||
)}
|
||||
disabled={!canScrollPrev}
|
||||
onClick={scrollPrev}
|
||||
{...props}
|
||||
>
|
||||
<ArrowLeft className="h-4 w-4" />
|
||||
<span className="sr-only">Previous slide</span>
|
||||
</Button>
|
||||
)
|
||||
})
|
||||
CarouselPrevious.displayName = "CarouselPrevious"
|
||||
|
||||
const CarouselNext = React.forwardRef<
|
||||
HTMLButtonElement,
|
||||
React.ComponentProps<typeof Button>
|
||||
>(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
||||
const { orientation, scrollNext, canScrollNext } = useCarousel()
|
||||
|
||||
return (
|
||||
<Button
|
||||
ref={ref}
|
||||
variant={variant}
|
||||
size={size}
|
||||
className={cn(
|
||||
"absolute h-8 w-8 rounded-full",
|
||||
orientation === "horizontal"
|
||||
? "-right-12 top-1/2 -translate-y-1/2"
|
||||
: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
||||
className
|
||||
)}
|
||||
disabled={!canScrollNext}
|
||||
onClick={scrollNext}
|
||||
{...props}
|
||||
>
|
||||
<ArrowRight className="h-4 w-4" />
|
||||
<span className="sr-only">Next slide</span>
|
||||
</Button>
|
||||
)
|
||||
})
|
||||
CarouselNext.displayName = "CarouselNext"
|
||||
|
||||
export {
|
||||
type CarouselApi,
|
||||
Carousel,
|
||||
CarouselContent,
|
||||
CarouselItem,
|
||||
CarouselPrevious,
|
||||
CarouselNext,
|
||||
}
|
||||
3
src/content.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { getCollection } from "astro:content";
|
||||
|
||||
export const allPages = await getCollection("docs");
|
||||
7
src/content/config.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { defineCollection } from "astro:content";
|
||||
import { docsSchema } from "@astrojs/starlight/schema";
|
||||
import { blogSchema } from "starlight-blog/schema";
|
||||
|
||||
export const collections = {
|
||||
docs: defineCollection({ schema: docsSchema({ extend: blogSchema() }) }),
|
||||
};
|
||||
86
src/content/docs/blog/1.2.0.mdx
Normal file
@@ -0,0 +1,86 @@
|
||||
---
|
||||
slug: blog/1.2.0
|
||||
title: Release 1.2.0
|
||||
authors: [jacoobes]
|
||||
tags: [release]
|
||||
date: 2022-09-28
|
||||
---
|
||||
|
||||
## Class-based modules
|
||||
|
||||
Today we're announcing the ability to create class based modules!
|
||||
To get started, install
|
||||
|
||||
import PackageManagers from '~/components/PackageManagers.astro';
|
||||
|
||||
<PackageManagers command="add" text="@sern/handler@latest" />
|
||||
|
||||
Quick List of changes!
|
||||
|
||||
- [Class-based modules](#class-based-modules-1)
|
||||
- [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` or `EventExecutable`
|
||||
|
||||
```ts title="commands/meaning-of-life.ts" {15}
|
||||
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()];
|
||||
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" {6}
|
||||
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;
|
||||
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](/v3/api/interfaces/wrapper) will be deprecated
|
||||
- [Wrapper#sernEmitter](/v3/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](/v3/api/interfaces/wrapper) will be deprecated. Only strings are accepted.
|
||||
- `Sern#addExternal` 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
|
||||
217
src/content/docs/blog/2.0.0.md
Normal file
@@ -0,0 +1,217 @@
|
||||
---
|
||||
slug: blog/2.0.0
|
||||
title: Release 2.0.0
|
||||
authors: [jacoobes]
|
||||
tags: [release]
|
||||
date: 2022-12-13
|
||||
---
|
||||
|
||||
## 2.0 Release
|
||||
|
||||
Join our [discord](https://sern.dev/discord)! <br />
|
||||
Wow! We're finally increasing our semantic versioning by +`1.7.9.` <br />
|
||||
What does this mean?
|
||||
|
||||
### Plugin Support for Event Modules
|
||||
|
||||
You can now use plugins for event modules. Previous version would throw an error if the
|
||||
`plugins` field was populated.
|
||||
|
||||
```typescript
|
||||
export function commandPlTest(): SernEmitterPlugin {
|
||||
return {
|
||||
type: PluginType.Command,
|
||||
execute: ({ mod }, controller) => {
|
||||
if (mod.name === "module.register") {
|
||||
console.log("Event Module created correctly");
|
||||
return controller.next();
|
||||
}
|
||||
console.log("event name is wrong");
|
||||
return controller.stop();
|
||||
},
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
Applying this plugin to some `eventModule`:
|
||||
|
||||
```typescript
|
||||
export default eventModule({
|
||||
name: "error",
|
||||
type: EventType.Sern,
|
||||
plugins: [commandPlTest()],
|
||||
execute(m) {
|
||||
console.log(m);
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
## Dependency Injection and Decoupling
|
||||
|
||||
The powerful npm package `iti` decouples sern even more.
|
||||
Decoupling data structures with the Inversion of Control pattern separates data from logic, which will help speed production
|
||||
and make sern even more customizable than before.
|
||||
|
||||
### How do I start?
|
||||
|
||||
```typescript title="src/index.ts"
|
||||
//With typescript, you can customize / augment your typings.
|
||||
interface MyDependencies extends Dependencies {
|
||||
"@sern/client": Singleton<Client>;
|
||||
"@sern/logger": Singleton<DefaultLogging>;
|
||||
}
|
||||
|
||||
export const useContainer = Sern.makeDependencies<MyDependencies>({
|
||||
// exclude: new Set(['@sern/logger']), don't autofill optional dependencies
|
||||
build: (root) =>
|
||||
root
|
||||
.add({ "@sern/client": single(client) })
|
||||
.add({ "@sern/logger": single(new DefaultLogging()) }),
|
||||
});
|
||||
|
||||
Sern.init({
|
||||
defaultPrefix: "!", // removing defaultPrefix will shut down text commands
|
||||
commands: "src/commands",
|
||||
// events: 'src/events' (optional),
|
||||
containerConfig: {
|
||||
get: useContainer, //pass in your dependency getter here
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
Using the `Sern#makeDependencies` function, inject your dependencies.
|
||||
We'll use specific dependencies that are created with the `@sern/keyword`
|
||||
key.
|
||||
Using typescript to display all `keywords` and what they represent:
|
||||
|
||||
```typescript
|
||||
export interface Dependencies {
|
||||
"@sern/client": Singleton<EventEmitter>; //Discord Client
|
||||
"@sern/logger"?: Singleton<Logging>; //Logger
|
||||
"@sern/emitter": Singleton<SernEmitter>; //SernEmitter
|
||||
"@sern/store": Singleton<ModuleStore>; //Stores all Command Modules
|
||||
"@sern/modules": Singleton<ModuleManager>; //Manages Modules
|
||||
"@sern/errors": Singleton<ErrorHandling>; //A Lifetime / Crash Handler
|
||||
}
|
||||
```
|
||||
|
||||
:::danger
|
||||
Sern#addExternal has been deprecated and removed in favor of Sern#makeDependencies
|
||||
:::
|
||||
|
||||
At the moment, one optional dependency, `@sern/logger`, exists. If not added explicitly,
|
||||
we'll **autofill** with a [DefaultLogger](https://sern.dev/docs/api/classes/defaultlogging).
|
||||
|
||||
:::tip
|
||||
If you don't want a logger, add it to the
|
||||
`exclude` field while composing dependencies.
|
||||
:::
|
||||
|
||||
Use your generated dependency getter `useContainer` (use whatever name you want), access them
|
||||
from anywhere.
|
||||
|
||||
:::note
|
||||
the function [useContainerRaw](https://sern.dev/docs/api/modules#usecontainerraw) is provided for direct access to dependencies and the internal
|
||||
data structure. Use this wisely as no guarantees are made and crashes can happen.
|
||||
:::
|
||||
|
||||
The `build` field follows [createContainer](https://itijs.org/docs/quick-start#usage) function call.
|
||||
|
||||
## New CommandTypes
|
||||
|
||||
2.0 includes all the new role select menus. `CommandType.MenuSelect` has been renamed into
|
||||
`CommandType.StringSelect`. The remaining SelectMenus are
|
||||
`CommandType.RoleSelect`, `CommandType.ChannelSelect`, `CommandType.UserSelect`, `CommandType.MentionableSelect`
|
||||
|
||||
```typescript title="commands/roleselect.ts"
|
||||
export default commandModule({
|
||||
type: CommandType.RoleSelect,
|
||||
execute(ctx) {
|
||||
ctx.reply("role select");
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
In addition, commandModules with ContextMenus have been renamed.
|
||||
|
||||
```diff
|
||||
- CommandType.MenuUser, CommandType.MenuMsg
|
||||
+ CommandType.CtxUser, CommandType.CtxMsg
|
||||
```
|
||||
|
||||
## Typings Simplification
|
||||
|
||||
Pre 2.0:
|
||||
<img src="https://cdn.discordapp.com/attachments/820348341358952550/1038577974829666386/image.png" />
|
||||
<br/> <br/> <br/>
|
||||
Post 2.0:
|
||||
<br/>
|
||||
<img src="https://cdn.discordapp.com/attachments/820348341358952550/1052623728489550015/image.png" />
|
||||
|
||||
CommandPlugin<T\> and EventPlugin<T\> typings have also been static'ified, transformed from types to interfaces
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
<img src="https://img.srizan.dev/Discord_z8Sn1UBfEe.png" />
|
||||
<br />
|
||||
All deprecation warnings from previous versions have taken effect, and are removed in 2.0.
|
||||
|
||||
```diff lang="ts" showLineNumbers=false
|
||||
- type Module = EventModule | CommandModule
|
||||
+ type AnyModule = EventModule | CommandModule
|
||||
|
||||
-export type SpreadParams<T extends (...args: never) => unknown> = (
|
||||
- args: Parameters<T>[number],
|
||||
- ) => unknown;
|
||||
```
|
||||
|
||||
Override type has been removed due to redundancy
|
||||
|
||||
```diff
|
||||
- discord.js : 14.5
|
||||
+ discord.js : 14.7
|
||||
|
||||
-typescript: 4.7
|
||||
+ typescript: 4.9
|
||||
```
|
||||
|
||||
```diff lang="ts" showLineNumbers=false
|
||||
+ interface Wrapper {
|
||||
+ readonly defaultPrefix?: string;
|
||||
+ readonly commands: string;
|
||||
+ readonly events?: string;
|
||||
+ readonly containerConfig : {
|
||||
+ get: (...keys: (keyof Dependencies)[]) => unknown[];
|
||||
+ }
|
||||
+}
|
||||
|
||||
- interface Wrapper {
|
||||
- readonly client: Client;
|
||||
- readonly sernEmitter?: SernEmitter;
|
||||
- readonly defaultPrefix?: string;
|
||||
- readonly commands: string;
|
||||
- readonly events?:
|
||||
- | string
|
||||
- | { mod: EventModule; absPath: string }[]
|
||||
- | (() => { mod: EventModule; absPath: string }[]);
|
||||
-}
|
||||
```
|
||||
|
||||
```diff lang="ts" showLineNumbers=false
|
||||
+ DefaultLogger
|
||||
+ DefaultModuleManager
|
||||
+ SernEmitter
|
||||
+ DefaultErrorHandling
|
||||
+ type Singleton<T> = () => T
|
||||
+ type Transient<T> = () => () => T;
|
||||
+ type LogPayload<T = unknown> = { message: T }
|
||||
+ export const single = <T>() => T
|
||||
+ export const many = <T>() => () => T
|
||||
```
|
||||
|
||||
Including the previous section, some names to symbols and data structures were altered to
|
||||
be better represented. view [changelog](/404.html)
|
||||
|
||||
## Context refactoring
|
||||
|
||||
The context data structure has been internally altered to represent its dynamics better.
|
||||
39
src/content/docs/blog/2.5.0.md
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
slug: blog/2.5.0
|
||||
title: Release 2.5.0
|
||||
authors: [jacoobes]
|
||||
tags: [release]
|
||||
date: 2023-01-12
|
||||
---
|
||||
|
||||
## 2.5 Release
|
||||
|
||||
### Join our [discord](https://sern.dev/discord) <br />
|
||||
|
||||
- Thank you for using sern in your projects. It's only going to get better!
|
||||
- I apologize for the sudden small breaking change. After this update, there won't be any for a while.
|
||||
Wow! We're increasing our semantic versioning by `+0.3.9` <br />
|
||||
What does this mean?
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- `controller` parameter for plugins has been removed
|
||||
- You'll need to import it instead
|
||||
- This **breaks** old `CommandPlugin`, but **not** old `EventPlugin`
|
||||
|
||||
### Deprecations
|
||||
|
||||
- `CommandPlugin` and `EventPlugin` have been renamed to [InitPlugin](/v3/api/interfaces/initplugin) and [ControlPlugin](/v3/api/interfaces/controlplugin), respectively
|
||||
|
||||
### Reason
|
||||
|
||||
- The naming of plugins was getting too complex. For example, plugin naming evolved into CommandModuleCommandPlugin, CommandModuleEventPlugin and more.
|
||||
- I realize that this affects all plugins. I have updated all [plugins](https://github.com/sern-handler/awesome-plugins/pull/68) to match these changes
|
||||
- The old way of declaring plugins has been deprecated in favor of newer functions that facilitate and ease typings
|
||||
- [CommandControlPlugin](/v3/api/functions/commandcontrolplugin)
|
||||
- [CommandInitPlugin](/v3/api/functions/commandinitplugin)
|
||||
- [EventControlPlugin](/v3/api/functions/eventcontrolplugin)
|
||||
- [EventInitPlugin](/v3/api/functions/eventinitplugin)
|
||||
- [DiscordEventControlPlugin](/v3/api/functions/discordeventcontrolplugin)
|
||||
|
||||
This will probably be the last breaking change in a while. Thanks for using sern!
|
||||
109
src/content/docs/blog/3.0.0.md
Normal file
@@ -0,0 +1,109 @@
|
||||
---
|
||||
slug: blog/3.0.0
|
||||
title: Release 3.0.0
|
||||
authors: [jacoobes]
|
||||
tags: [release]
|
||||
date: 2023-06-18
|
||||
---
|
||||
|
||||
## 3.0 Release
|
||||
|
||||
### Join our [discord](https://sern.dev/discord) <br />
|
||||
|
||||
### Features
|
||||
|
||||
#### Dependency Management
|
||||
|
||||
- `Service` API (recommended to use this over useContainer hooks)
|
||||
- Dependencies type must be globally augmented in order for Services api to function properly
|
||||
- new methods on ModuleManager
|
||||
- getPublishableCommands()
|
||||
- Init Hooks
|
||||
- implement starting behavior for dependencies
|
||||
- To enforce and type check this, use the `Initializable` type when making your Dependencies type!
|
||||
- Emitter interface
|
||||
- More generic interface to define any event emitter
|
||||
- You can now swap out the SernEmitter with whatever emitter now.
|
||||
|
||||
```ts
|
||||
class DatabaseService implements Init {
|
||||
//some hypothetical database
|
||||
_pgsql : database()
|
||||
|
||||
async init() {
|
||||
await _pgsql.load()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
await makeDependencies({
|
||||
build: root => root.add({
|
||||
db: new DatabaseService() //will be init'ed automatically
|
||||
})
|
||||
})
|
||||
|
||||
```
|
||||
|
||||
- new SernEmitter event `modulesLoaded` , which allows users to customize behavior after all modules are loaded!
|
||||
|
||||
```ts
|
||||
export default eventModule({
|
||||
name: "modulesLoaded",
|
||||
type: EventType.Sern,
|
||||
execute: () => {
|
||||
console.log("All modules loaded");
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
#### Quality of Life
|
||||
|
||||
- faster module loading
|
||||
- I utilize async generators for reading files now. A lot faster than the first iteration.
|
||||
- better error handling
|
||||
- Less boilerplate
|
||||
- Services api cleans up v2 boilerplate
|
||||
- class modules devex got upgraded and work better than before
|
||||
- automatically ignore any files not ending in (mts, cts, mjs, cjs, ts, js)
|
||||
|
||||
- ignore commands and events with `!` prefix on filename or directory (ie: `!filename.ts` or `!directory` will be ignored by sern)
|
||||
|
||||
- `Service` API (recommended to use this over useContainer hooks)
|
||||
- Dependencies type must be globally augmented in order for Services api to function properly
|
||||
- Less boilerplate
|
||||
- new methods on ModuleManager
|
||||
- automatically ignore any files not ending in (mts, cts, mjs, cjs, ts, js)
|
||||
- ignore commands / events with `!` prefix on filename or directory (ie: `!filename.ts` or `!directory`)
|
||||
- new SernEmitter event `modulesLoaded` , which allows users to customize behavior after all modules are loaded!
|
||||
- Init Hooks
|
||||
- implement starting behavior for dependencies
|
||||
|
||||
### Experimental
|
||||
|
||||
- Experimental things may be subject to removal, need feedback and are not guaranteed stable
|
||||
- dev / prod mode
|
||||
- sern will behave differently depending on mode set
|
||||
- init sern from `file` option
|
||||
- reads from local sern.config.json
|
||||
|
||||
```js
|
||||
Sern.init("file");
|
||||
```
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- Sern.makeDependencies -> makeDependencies
|
||||
- it is asynchronous and top level function now. Make sure to await it before initing for proper synchronization.
|
||||
- module store and manager internally changed, so those using them may recieve breaking changes
|
||||
- BaseOptions type removed
|
||||
|
||||
```diff lang="ts" showLineNumbers=false
|
||||
- Sern.makeDependencies({ build: () => {} })
|
||||
+ await makeDependencies({ build: () => {} })
|
||||
```
|
||||
|
||||
### Deprecations
|
||||
|
||||
- Removed all previous marked deprecations in v3
|
||||
- ModuleStore will be removed as a dependency in v4. The only way to access modules should be through ModuleManager
|
||||
- Default Dependencies will be made internal in the v4. Users should only have access to its interface / contract
|
||||
38
src/content/docs/blog/new-logo.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
slug: blog/new-logo
|
||||
title: New logo!
|
||||
authors: [sern]
|
||||
tags: [branding]
|
||||
date: 2023-07-04
|
||||
---
|
||||
|
||||
Hey everyone! Today we have very special news for you all: We're changing our logo!
|
||||
|
||||
# Why?
|
||||
|
||||
You see, on today's standards, having a simple logo is essential. Our logo aligns perfectly with these design principles but it can always be improved.
|
||||
We were chilling, you know, cooking sern handler v3, sern gui, `npm create @sern/bot` and serncord when we thought about changing the logo to a sleek design with less colors.
|
||||
And here we are!
|
||||
|
||||
# Who did our new branding?
|
||||
|
||||
[Ropox](https://github.com/Murtatrxx)!
|
||||
|
||||
Bro's the GOAT. This website is maintained by him, the domain costs are funded by him and also he started brainstorming how the logo would be on paper:
|
||||

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

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

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

|
||||
|
||||
Pretty nice!
|
||||
|
||||
By the way, we have animations and variations on the way, so make sure to stay updated in the [discord server](https://sern.dev/discord)!
|
||||
|
||||
# Finally, from the entire sern team, thank you for sticking around ❤️
|
||||
37
src/content/docs/blog/railway-deploy.md
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
slug: blog/railway-deploy
|
||||
title: Deploying sern with Railway
|
||||
authors: [duro]
|
||||
tags: [guides]
|
||||
date: 2024-02-23
|
||||
---
|
||||
|
||||
In this guide, I'll be showing you how to deploy your sern bot with [Railway](https://railway.app/).
|
||||
|
||||
This guide assumes you have a sern bot already set up and ready to deploy. If you don't, you can follow the [walkthrough](/v3/guide/walkthrough/new-project) to set up your bot.
|
||||
|
||||
## GitHub Repository
|
||||
|
||||
The first thing you'll need to deploy your bot is a GitHub repository for your bot. If you don't have one, you can create one by following the [GitHub guide](https://docs.github.com/en/get-started/quickstart/create-a-repo).
|
||||
|
||||
Once you have your repository set up, you can push your bot's code to the repository, and you're ready to deploy using Railway.
|
||||
|
||||
## Railway Setup
|
||||
|
||||
After you have your bot's code in a GitHub repository, you'll need to create an account on Railway. You can sign up using your GitHub account at [railway.app](https://railway.app/).
|
||||
|
||||
Once you've created your account, navigate to the [dashboard](https://railway.app/dashboard) and click the "New Project" button. Click the "Deploy from GitHub repo" button, and select your bot's repository.
|
||||
|
||||
Once you've selected your repository, click the "Add Variables" button to add your bot's environment variables. You'll need your environment variables from your `.env` file to add to Railway. (You can also add these later if you want.)
|
||||
|
||||
## Deploy
|
||||
|
||||
Once you've added your environment variables, click the "Deploy" button, and Railway will start deploying your bot. Once the deployment is complete, you'll be able to see your bot's URL and logs.
|
||||
|
||||
:::note
|
||||
Make sure you add your environment variables, and your node start script is correct in your `package.json` file.
|
||||
|
||||
If you have any issues deploying your bot, you can check the logs for any errors.
|
||||
:::
|
||||
|
||||
That's it! Your bot is now deployed and running on Railway. If you have any issues or questions, feel free to ask in the [sern Discord server](https://sern.dev/discord).
|
||||
35
src/content/docs/index.mdx
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
title: Create your dream Discord bot.
|
||||
template: splash
|
||||
description: sern is a framework for building Discord bots; Better DX and an ecosystem of packages & plugins.
|
||||
hero:
|
||||
tagline: sern is a framework for building Discord bots; Better DX and an ecosystem of packages & plugins.
|
||||
image:
|
||||
file: ~/assets/logo/sern-logo.svg
|
||||
actions:
|
||||
- text: <b>npm create @sern/bot</b>
|
||||
link: /v4/reference/getting-started
|
||||
icon: right-arrow
|
||||
variant: primary
|
||||
---
|
||||
|
||||
import { Card, CardGrid } from "@astrojs/starlight/components";
|
||||
import CommunityShowcase from "~/components/CommunityShowcase.astro";
|
||||
|
||||
<h1 class="text-center">Showcase</h1>
|
||||
|
||||
<CommunityShowcase />
|
||||
|
||||
<h1 class="text-center">Features</h1>
|
||||
|
||||
<CardGrid stagger>
|
||||
<Card title="Modular" icon="puzzle">
|
||||
Take apart, build, or customize code with ease to create robust bots.
|
||||
</Card>
|
||||
<Card title="Concise" icon="pencil">
|
||||
Commands are significantly smaller than other competitors. Write impactful, concise code.
|
||||
</Card>
|
||||
<Card title="Familiar" icon="star">
|
||||
Code like a traditional command framework. The API is simple and resembles classic v12 command handlers.
|
||||
</Card>
|
||||
</CardGrid>
|
||||
96
src/content/docs/v3/api/README.md
Normal file
@@ -0,0 +1,96 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "@sern/handler"
|
||||
---
|
||||
|
||||
## Namespaces
|
||||
|
||||
- [Presence](/v3/api/namespaces/presence/readme/)
|
||||
- [Sern](/v3/api/namespaces/sern/readme/)
|
||||
|
||||
## Enumerations
|
||||
|
||||
- [CommandType](/v3/api/enumerations/commandtype/)
|
||||
- [EventType](/v3/api/enumerations/eventtype/)
|
||||
- [PayloadType](/v3/api/enumerations/payloadtype/)
|
||||
- [PluginType](/v3/api/enumerations/plugintype/)
|
||||
|
||||
## Classes
|
||||
|
||||
- [Context](/v3/api/classes/context/)
|
||||
- [ModuleStore](/v3/api/classes/modulestore/)
|
||||
|
||||
## Interfaces
|
||||
|
||||
- [BothCommand](/v3/api/interfaces/bothcommand/)
|
||||
- [ButtonCommand](/v3/api/interfaces/buttoncommand/)
|
||||
- [ChannelSelectCommand](/v3/api/interfaces/channelselectcommand/)
|
||||
- [CommandModuleDefs](/v3/api/interfaces/commandmoduledefs/)
|
||||
- [ContextMenuMsg](/v3/api/interfaces/contextmenumsg/)
|
||||
- [ContextMenuUser](/v3/api/interfaces/contextmenuuser/)
|
||||
- [ControlPlugin](/v3/api/interfaces/controlplugin/)
|
||||
- [Controller](/v3/api/interfaces/controller/)
|
||||
- [CoreDependencies](/v3/api/interfaces/coredependencies/)
|
||||
- [CoreModuleStore](/v3/api/interfaces/coremodulestore/)
|
||||
- [DiscordEventCommand](/v3/api/interfaces/discordeventcommand/)
|
||||
- [Disposable](/v3/api/interfaces/disposable/)
|
||||
- [Emitter](/v3/api/interfaces/emitter/)
|
||||
- [ErrorHandling](/v3/api/interfaces/errorhandling/)
|
||||
- [EventModuleDefs](/v3/api/interfaces/eventmoduledefs/)
|
||||
- [ExternalEventCommand](/v3/api/interfaces/externaleventcommand/)
|
||||
- [Init](/v3/api/interfaces/init/)
|
||||
- [InitPlugin](/v3/api/interfaces/initplugin/)
|
||||
- [Logging](/v3/api/interfaces/logging/)
|
||||
- [MentionableSelectCommand](/v3/api/interfaces/mentionableselectcommand/)
|
||||
- [ModalSubmitCommand](/v3/api/interfaces/modalsubmitcommand/)
|
||||
- [Plugin](/v3/api/interfaces/plugin/)
|
||||
- [RoleSelectCommand](/v3/api/interfaces/roleselectcommand/)
|
||||
- [SernAutocompleteData](/v3/api/interfaces/sernautocompletedata/)
|
||||
- [SernEventCommand](/v3/api/interfaces/serneventcommand/)
|
||||
- [SernEventsMapping](/v3/api/interfaces/serneventsmapping/)
|
||||
- [SernSubCommandData](/v3/api/interfaces/sernsubcommanddata/)
|
||||
- [SernSubCommandGroupData](/v3/api/interfaces/sernsubcommandgroupdata/)
|
||||
- [SlashCommand](/v3/api/interfaces/slashcommand/)
|
||||
- [StringSelectCommand](/v3/api/interfaces/stringselectcommand/)
|
||||
- [TextCommand](/v3/api/interfaces/textcommand/)
|
||||
- [UserSelectCommand](/v3/api/interfaces/userselectcommand/)
|
||||
- [Wrapper](/v3/api/interfaces/wrapper/)
|
||||
|
||||
## Type Aliases
|
||||
|
||||
- [AnyCommandPlugin](/v3/api/type-aliases/anycommandplugin/)
|
||||
- [AnyEventPlugin](/v3/api/type-aliases/anyeventplugin/)
|
||||
- [Args](/v3/api/type-aliases/args/)
|
||||
- [CommandModule](/v3/api/type-aliases/commandmodule/)
|
||||
- [EventModule](/v3/api/type-aliases/eventmodule/)
|
||||
- [Initializable](/v3/api/type-aliases/initializable/)
|
||||
- [LogPayload](/v3/api/type-aliases/logpayload/)
|
||||
- [Payload](/v3/api/type-aliases/payload/)
|
||||
- [PluginResult](/v3/api/type-aliases/pluginresult/)
|
||||
- [SernOptionsData](/v3/api/type-aliases/sernoptionsdata/)
|
||||
- [Singleton](/v3/api/type-aliases/singleton/)
|
||||
- [SlashOptions](/v3/api/type-aliases/slashoptions/)
|
||||
- [Transient](/v3/api/type-aliases/transient/)
|
||||
|
||||
## Variables
|
||||
|
||||
- [controller](/v3/api/variables/controller/)
|
||||
|
||||
## Functions
|
||||
|
||||
- [CommandControlPlugin](/v3/api/functions/commandcontrolplugin/)
|
||||
- [CommandInitPlugin](/v3/api/functions/commandinitplugin/)
|
||||
- [DiscordEventControlPlugin](/v3/api/functions/discordeventcontrolplugin/)
|
||||
- [EventControlPlugin](/v3/api/functions/eventcontrolplugin/)
|
||||
- [EventInitPlugin](/v3/api/functions/eventinitplugin/)
|
||||
- [Service](/v3/api/functions/service/)
|
||||
- [Services](/v3/api/functions/services/)
|
||||
- [commandModule](/v3/api/functions/commandmodule/)
|
||||
- [discordEvent](/v3/api/functions/discordevent/)
|
||||
- [eventModule](/v3/api/functions/eventmodule/)
|
||||
- [makeDependencies](/v3/api/functions/makedependencies/)
|
||||
- [makePlugin](/v3/api/functions/makeplugin/)
|
||||
- [single](/v3/api/functions/single/)
|
||||
- [transient](/v3/api/functions/transient/)
|
||||
291
src/content/docs/v3/api/classes/Context.md
Normal file
@@ -0,0 +1,291 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Context"
|
||||
---
|
||||
|
||||
## Since
|
||||
|
||||
1.0.0
|
||||
Provides values shared between
|
||||
Message and ChatInputCommandInteraction
|
||||
|
||||
## Extends
|
||||
|
||||
- `CoreContext`\<`Message`, `ChatInputCommandInteraction`\>
|
||||
|
||||
## Accessors
|
||||
|
||||
### channel
|
||||
|
||||
> `get` **channel**(): `null` \| `TextBasedChannel`
|
||||
|
||||
#### Returns
|
||||
|
||||
`null` \| `TextBasedChannel`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:39](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/context.ts#L39)
|
||||
|
||||
***
|
||||
|
||||
### channelId
|
||||
|
||||
> `get` **channelId**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:45](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/context.ts#L45)
|
||||
|
||||
***
|
||||
|
||||
### client
|
||||
|
||||
> `get` **client**(): `Client`\<`boolean`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Client`\<`boolean`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:91](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/context.ts#L91)
|
||||
|
||||
***
|
||||
|
||||
### createdTimestamp
|
||||
|
||||
> `get` **createdTimestamp**(): `number`
|
||||
|
||||
#### Returns
|
||||
|
||||
`number`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:65](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/context.ts#L65)
|
||||
|
||||
***
|
||||
|
||||
### guild
|
||||
|
||||
> `get` **guild**(): `null` \| `Guild`
|
||||
|
||||
#### Returns
|
||||
|
||||
`null` \| `Guild`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:71](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/context.ts#L71)
|
||||
|
||||
***
|
||||
|
||||
### guildId
|
||||
|
||||
> `get` **guildId**(): `null` \| `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`null` \| `string`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:77](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/context.ts#L77)
|
||||
|
||||
***
|
||||
|
||||
### id
|
||||
|
||||
> `get` **id**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:33](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/context.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### inGuild
|
||||
|
||||
> `get` **inGuild**(): `boolean`
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:97](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/context.ts#L97)
|
||||
|
||||
***
|
||||
|
||||
### interaction
|
||||
|
||||
> `get` **interaction**(): `I`
|
||||
|
||||
#### Returns
|
||||
|
||||
`I`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/core-context.ts:15](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/core-context.ts#L15)
|
||||
|
||||
***
|
||||
|
||||
### member
|
||||
|
||||
> `get` **member**(): `null` \| `GuildMember` \| `APIInteractionGuildMember`
|
||||
|
||||
#### Returns
|
||||
|
||||
`null` \| `GuildMember` \| `APIInteractionGuildMember`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:85](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/context.ts#L85)
|
||||
|
||||
***
|
||||
|
||||
### message
|
||||
|
||||
> `get` **message**(): `M`
|
||||
|
||||
#### Returns
|
||||
|
||||
`M`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/core-context.ts:12](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/core-context.ts#L12)
|
||||
|
||||
***
|
||||
|
||||
### options
|
||||
|
||||
> `get` **options**(): `Omit`\<`CommandInteractionOptionResolver`\<`CacheType`\>, `"getMessage"` \| `"getFocused"`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Omit`\<`CommandInteractionOptionResolver`\<`CacheType`\>, `"getMessage"` \| `"getFocused"`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:26](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/context.ts#L26)
|
||||
|
||||
***
|
||||
|
||||
### user
|
||||
|
||||
> `get` **user**(): `User`
|
||||
|
||||
If context is holding a message, message.author
|
||||
else, interaction.user
|
||||
|
||||
#### Returns
|
||||
|
||||
`User`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:55](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/context.ts#L55)
|
||||
|
||||
***
|
||||
|
||||
### userId
|
||||
|
||||
> `get` **userId**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:61](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/context.ts#L61)
|
||||
|
||||
## Methods
|
||||
|
||||
### isMessage()
|
||||
|
||||
> **isMessage**(): `this is CoreContext<Message<boolean>, never>`
|
||||
|
||||
#### Returns
|
||||
|
||||
`this is CoreContext<Message<boolean>, never>`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`CoreContext.isMessage`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/core-context.ts:19](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/core-context.ts#L19)
|
||||
|
||||
***
|
||||
|
||||
### isSlash()
|
||||
|
||||
> **isSlash**(): `this is CoreContext<never, ChatInputCommandInteraction<CacheType>>`
|
||||
|
||||
#### Returns
|
||||
|
||||
`this is CoreContext<never, ChatInputCommandInteraction<CacheType>>`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`CoreContext.isSlash`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/core-context.ts:23](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/core-context.ts#L23)
|
||||
|
||||
***
|
||||
|
||||
### reply()
|
||||
|
||||
> **reply**(`content`): `Promise`\<`Message`\<`boolean`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **content**: `ReplyOptions`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`Message`\<`boolean`\>\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:103](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/context.ts#L103)
|
||||
|
||||
***
|
||||
|
||||
### wrap()
|
||||
|
||||
> `static` **wrap**(`wrappable`): [`Context`](/v3/api/classes/context/)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **wrappable**: `Message`\<`boolean`\> \| `BaseInteraction`\<`CacheType`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Context`](/v3/api/classes/context/)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`CoreContext.wrap`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:113](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/context.ts#L113)
|
||||
36
src/content/docs/v3/api/classes/ModuleStore.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "ModuleStore"
|
||||
---
|
||||
|
||||
## Constructors
|
||||
|
||||
### new ModuleStore()
|
||||
|
||||
> **new ModuleStore**(): [`ModuleStore`](/v3/api/classes/modulestore/)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ModuleStore`](/v3/api/classes/modulestore/)
|
||||
|
||||
## Properties
|
||||
|
||||
### commands
|
||||
|
||||
> **commands**: `Map`\<`string`, `Module`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/module-store.ts:10](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/module-store.ts#L10)
|
||||
|
||||
***
|
||||
|
||||
### metadata
|
||||
|
||||
> **metadata**: `WeakMap`\<`Module`, `CommandMeta`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/module-store.ts:9](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/module-store.ts#L9)
|
||||
144
src/content/docs/v3/api/enumerations/CommandType.md
Normal file
@@ -0,0 +1,144 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "CommandType"
|
||||
---
|
||||
|
||||
## Since
|
||||
|
||||
1.0.0
|
||||
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`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:20](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L20)
|
||||
|
||||
***
|
||||
|
||||
### Button
|
||||
|
||||
> **Button**: `16`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:23](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L23)
|
||||
|
||||
***
|
||||
|
||||
### ChannelSelect
|
||||
|
||||
> **ChannelSelect**: `1024`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:29](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L29)
|
||||
|
||||
***
|
||||
|
||||
### CtxMsg
|
||||
|
||||
> **CtxMsg**: `8`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:22](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L22)
|
||||
|
||||
***
|
||||
|
||||
### CtxUser
|
||||
|
||||
> **CtxUser**: `4`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:21](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L21)
|
||||
|
||||
***
|
||||
|
||||
### MentionableSelect
|
||||
|
||||
> **MentionableSelect**: `512`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:28](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L28)
|
||||
|
||||
***
|
||||
|
||||
### Modal
|
||||
|
||||
> **Modal**: `64`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:25](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L25)
|
||||
|
||||
***
|
||||
|
||||
### RoleSelect
|
||||
|
||||
> **RoleSelect**: `256`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:27](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L27)
|
||||
|
||||
***
|
||||
|
||||
### Slash
|
||||
|
||||
> **Slash**: `2`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:19](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L19)
|
||||
|
||||
***
|
||||
|
||||
### StringSelect
|
||||
|
||||
> **StringSelect**: `32`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:24](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L24)
|
||||
|
||||
***
|
||||
|
||||
### Text
|
||||
|
||||
> **Text**: `1`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:18](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L18)
|
||||
|
||||
***
|
||||
|
||||
### UserSelect
|
||||
|
||||
> **UserSelect**: `128`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:26](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L26)
|
||||
58
src/content/docs/v3/api/enumerations/EventType.md
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "EventType"
|
||||
---
|
||||
|
||||
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
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:51](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L51)
|
||||
|
||||
***
|
||||
|
||||
### External
|
||||
|
||||
> **External**: `3`
|
||||
|
||||
The EventType for handling external events.
|
||||
Could be for example, `process` events, database events
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:60](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L60)
|
||||
|
||||
***
|
||||
|
||||
### Sern
|
||||
|
||||
> **Sern**: `2`
|
||||
|
||||
The EventType for handling sern events
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:55](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L55)
|
||||
42
src/content/docs/v3/api/enumerations/PayloadType.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "PayloadType"
|
||||
---
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### Failure
|
||||
|
||||
> **Failure**: `"failure"`
|
||||
|
||||
The PayloadType for a SernEmitter failure event
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:98](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L98)
|
||||
|
||||
***
|
||||
|
||||
### Success
|
||||
|
||||
> **Success**: `"success"`
|
||||
|
||||
The PayloadType for a SernEmitter success event
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:94](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L94)
|
||||
|
||||
***
|
||||
|
||||
### Warning
|
||||
|
||||
> **Warning**: `"warning"`
|
||||
|
||||
The PayloadType for a SernEmitter warning event
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:102](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L102)
|
||||
44
src/content/docs/v3/api/enumerations/PluginType.md
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "PluginType"
|
||||
---
|
||||
|
||||
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
|
||||
|
||||
### Control
|
||||
|
||||
> **Control**: `2`
|
||||
|
||||
The PluginType for EventPlugins
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:85](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L85)
|
||||
|
||||
***
|
||||
|
||||
### Init
|
||||
|
||||
> **Init**: `1`
|
||||
|
||||
The PluginType for InitPlugins
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:81](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/structures/enums.ts#L81)
|
||||
29
src/content/docs/v3/api/functions/CommandControlPlugin.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "CommandControlPlugin"
|
||||
---
|
||||
|
||||
> **CommandControlPlugin**\<`I`\>(`execute`): [`Plugin`](/v3/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **I** *extends* [`CommandType`](/v3/api/enumerations/commandtype/)
|
||||
|
||||
## Parameters
|
||||
|
||||
• **execute**
|
||||
|
||||
## Returns
|
||||
|
||||
[`Plugin`](/v3/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Since
|
||||
|
||||
2.5.0
|
||||
@__PURE__
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/create-plugins.ts:37](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/create-plugins.ts#L37)
|
||||
29
src/content/docs/v3/api/functions/CommandInitPlugin.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "CommandInitPlugin"
|
||||
---
|
||||
|
||||
> **CommandInitPlugin**\<`I`\>(`execute`): [`Plugin`](/v3/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **I** *extends* [`CommandType`](/v3/api/enumerations/commandtype/)
|
||||
|
||||
## Parameters
|
||||
|
||||
• **execute**
|
||||
|
||||
## Returns
|
||||
|
||||
[`Plugin`](/v3/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Since
|
||||
|
||||
2.5.0
|
||||
@__PURE__
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/create-plugins.ts:28](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/create-plugins.ts#L28)
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "DiscordEventControlPlugin"
|
||||
---
|
||||
|
||||
> **DiscordEventControlPlugin**\<`T`\>(`name`, `execute`): [`Plugin`](/v3/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** *extends* keyof `ClientEvents`
|
||||
|
||||
## Parameters
|
||||
|
||||
• **name**: `T`
|
||||
|
||||
• **execute**
|
||||
|
||||
## Returns
|
||||
|
||||
[`Plugin`](/v3/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Since
|
||||
|
||||
2.5.0
|
||||
|
||||
## Experimental
|
||||
|
||||
A specialized function for creating control plugins with discord.js ClientEvents.
|
||||
Will probably be moved one day!
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/create-plugins.ts:58](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/create-plugins.ts#L58)
|
||||
29
src/content/docs/v3/api/functions/EventControlPlugin.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "EventControlPlugin"
|
||||
---
|
||||
|
||||
> **EventControlPlugin**\<`I`\>(`execute`): [`Plugin`](/v3/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **I** *extends* [`EventType`](/v3/api/enumerations/eventtype/)
|
||||
|
||||
## Parameters
|
||||
|
||||
• **execute**
|
||||
|
||||
## Returns
|
||||
|
||||
[`Plugin`](/v3/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Since
|
||||
|
||||
2.5.0
|
||||
@__PURE__
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/create-plugins.ts:46](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/create-plugins.ts#L46)
|
||||
29
src/content/docs/v3/api/functions/EventInitPlugin.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "EventInitPlugin"
|
||||
---
|
||||
|
||||
> **EventInitPlugin**\<`I`\>(`execute`): [`Plugin`](/v3/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **I** *extends* [`EventType`](/v3/api/enumerations/eventtype/)
|
||||
|
||||
## Parameters
|
||||
|
||||
• **execute**
|
||||
|
||||
## Returns
|
||||
|
||||
[`Plugin`](/v3/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Since
|
||||
|
||||
2.5.0
|
||||
@__PURE__
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/create-plugins.ts:19](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/create-plugins.ts#L19)
|
||||
41
src/content/docs/v3/api/functions/Service.md
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Service"
|
||||
---
|
||||
|
||||
> **Service**\<`T`\>(`key`): `NonNullable`\<`UnpackFunction`\<`Partial`\<`Dependencies`\>\[`T`\]\>\>
|
||||
|
||||
The new Service api, a cleaner alternative to useContainer
|
||||
To obtain intellisense, ensure a .d.ts file exists in the root of compilation.
|
||||
Usually our scaffolding tool takes care of this.
|
||||
Note: this method only works AFTER your container has been initiated
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** *extends* keyof `Dependencies`
|
||||
|
||||
## Parameters
|
||||
|
||||
• **key**: `T`
|
||||
|
||||
a key that corresponds to a dependency registered.
|
||||
|
||||
## Returns
|
||||
|
||||
`NonNullable`\<`UnpackFunction`\<`Partial`\<`Dependencies`\>\[`T`\]\>\>
|
||||
|
||||
## Since
|
||||
|
||||
3.0.0
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
const client = Service('@sern/client');
|
||||
```
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/ioc/dependency-injection.ts:37](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/ioc/dependency-injection.ts#L37)
|
||||
31
src/content/docs/v3/api/functions/Services.md
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Services"
|
||||
---
|
||||
|
||||
> **Services**\<`T`\>(...`keys`): `IntoDependencies`\<`T`\>
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** *extends* keyof `Dependencies`[]
|
||||
|
||||
## Parameters
|
||||
|
||||
• ...**keys**: [`...T[]`]
|
||||
|
||||
## Returns
|
||||
|
||||
`IntoDependencies`\<`T`\>
|
||||
|
||||
array of dependencies, in the same order of keys provided
|
||||
|
||||
## Since
|
||||
|
||||
3.0.0
|
||||
The plural version of [Service](../../../../../../v3/api/functions/service)
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/ioc/dependency-injection.ts:47](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/ioc/dependency-injection.ts#L47)
|
||||
24
src/content/docs/v3/api/functions/commandModule.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "commandModule"
|
||||
---
|
||||
|
||||
> **commandModule**(`mod`): [`CommandModule`](/v3/api/type-aliases/commandmodule/)
|
||||
|
||||
## Parameters
|
||||
|
||||
• **mod**: `InputCommand`
|
||||
|
||||
## Returns
|
||||
|
||||
[`CommandModule`](/v3/api/type-aliases/commandmodule/)
|
||||
|
||||
## Since
|
||||
|
||||
1.0.0 The wrapper function to define command modules for sern
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/modules.ts:19](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/modules.ts#L19)
|
||||
36
src/content/docs/v3/api/functions/discordEvent.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "discordEvent"
|
||||
---
|
||||
|
||||
> **discordEvent**\<`T`\>(`mod`): [`EventModule`](/v3/api/type-aliases/eventmodule/)
|
||||
|
||||
Create event modules from discord.js client events,
|
||||
This is an [eventModule](../../../../../../v3/api/functions/eventmodule) for discord events,
|
||||
where typings can be very bad.
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** *extends* keyof `ClientEvents`
|
||||
|
||||
## Parameters
|
||||
|
||||
• **mod**
|
||||
|
||||
• **mod.execute**
|
||||
|
||||
• **mod.name**: `T`
|
||||
|
||||
• **mod.plugins?**: [`AnyEventPlugin`](/v3/api/type-aliases/anyeventplugin/)[]
|
||||
|
||||
## Returns
|
||||
|
||||
[`EventModule`](/v3/api/type-aliases/eventmodule/)
|
||||
|
||||
## Experimental
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/modules.ts:47](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/modules.ts#L47)
|
||||
25
src/content/docs/v3/api/functions/eventModule.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "eventModule"
|
||||
---
|
||||
|
||||
> **eventModule**(`mod`): [`EventModule`](/v3/api/type-aliases/eventmodule/)
|
||||
|
||||
## Parameters
|
||||
|
||||
• **mod**: `InputEvent`
|
||||
|
||||
## Returns
|
||||
|
||||
[`EventModule`](/v3/api/type-aliases/eventmodule/)
|
||||
|
||||
## Since
|
||||
|
||||
1.0.0
|
||||
The wrapper function to define event modules for sern
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/modules.ts:32](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/modules.ts#L32)
|
||||
24
src/content/docs/v3/api/functions/makeDependencies.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "makeDependencies"
|
||||
---
|
||||
|
||||
> **makeDependencies**\<`T`\>(`conf`): `Promise`\<\<`V`\>(...`keys`) => `IntoDependencies`\<`V`\>\>
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** *extends* `Dependencies`
|
||||
|
||||
## Parameters
|
||||
|
||||
• **conf**: `ValidDependencyConfig`
|
||||
|
||||
## Returns
|
||||
|
||||
`Promise`\<\<`V`\>(...`keys`) => `IntoDependencies`\<`V`\>\>
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/ioc/base.ts:144](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/ioc/base.ts#L144)
|
||||
26
src/content/docs/v3/api/functions/makePlugin.md
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "makePlugin"
|
||||
---
|
||||
|
||||
> **makePlugin**\<`V`\>(`type`, `execute`): [`Plugin`](/v3/api/interfaces/plugin/)\<`V`\>
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **V** *extends* `unknown`[]
|
||||
|
||||
## Parameters
|
||||
|
||||
• **type**: [`PluginType`](/v3/api/enumerations/plugintype/)
|
||||
|
||||
• **execute**
|
||||
|
||||
## Returns
|
||||
|
||||
[`Plugin`](/v3/api/interfaces/plugin/)\<`V`\>
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/create-plugins.ts:6](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/create-plugins.ts#L6)
|
||||
35
src/content/docs/v3/api/functions/single.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "single"
|
||||
---
|
||||
|
||||
> **single**\<`T`\>(`cb`): () => `T`
|
||||
|
||||
@__PURE__
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T**
|
||||
|
||||
## Parameters
|
||||
|
||||
• **cb**
|
||||
|
||||
## Returns
|
||||
|
||||
`Function`
|
||||
|
||||
### Returns
|
||||
|
||||
`T`
|
||||
|
||||
## Since
|
||||
|
||||
2.0.0.
|
||||
Creates a singleton object.
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/ioc/dependency-injection.ts:11](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/ioc/dependency-injection.ts#L11)
|
||||
39
src/content/docs/v3/api/functions/transient.md
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "transient"
|
||||
---
|
||||
|
||||
> **transient**\<`T`\>(`cb`): () => () => `T`
|
||||
|
||||
@__PURE__
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T**
|
||||
|
||||
## Parameters
|
||||
|
||||
• **cb**
|
||||
|
||||
## Returns
|
||||
|
||||
`Function`
|
||||
|
||||
### Returns
|
||||
|
||||
`Function`
|
||||
|
||||
#### Returns
|
||||
|
||||
`T`
|
||||
|
||||
## Since
|
||||
|
||||
2.0.0
|
||||
Creates a transient object
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/ioc/dependency-injection.ts:21](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/ioc/dependency-injection.ts#L21)
|
||||
124
src/content/docs/v3/api/interfaces/BothCommand.md
Normal file
@@ -0,0 +1,124 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "BothCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### alias?
|
||||
|
||||
> `optional` **alias**: `string`[]
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:125](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L125)
|
||||
|
||||
***
|
||||
|
||||
### description
|
||||
|
||||
> **description**: `string`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:126](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L126)
|
||||
|
||||
***
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (`ctx`, `args`) => `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **ctx**: [`Context`](/v3/api/classes/context/)
|
||||
|
||||
• **args**: [`Args`](/v3/api/type-aliases/args/)
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:128](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L128)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/v3/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### options?
|
||||
|
||||
> `optional` **options**: [`SernOptionsData`](/v3/api/type-aliases/sernoptionsdata/)[]
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:127](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L127)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/v3/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`Both`](/v3/api/enumerations/commandtype/#both)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:124](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L124)
|
||||
102
src/content/docs/v3/api/interfaces/ButtonCommand.md
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "ButtonCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (`ctx`) => `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **ctx**: `ButtonInteraction`\<`CacheType`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:65](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L65)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/v3/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/v3/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`Button`](/v3/api/enumerations/commandtype/#button)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:64](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L64)
|
||||
102
src/content/docs/v3/api/interfaces/ChannelSelectCommand.md
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "ChannelSelectCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (`ctx`) => `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **ctx**: `ChannelSelectMenuInteraction`\<`CacheType`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:75](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L75)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/v3/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/v3/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`ChannelSelect`](/v3/api/enumerations/commandtype/#channelselect)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:74](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L74)
|
||||
126
src/content/docs/v3/api/interfaces/CommandModuleDefs.md
Normal file
@@ -0,0 +1,126 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "CommandModuleDefs"
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### 1
|
||||
|
||||
> **1**: [`TextCommand`](/v3/api/interfaces/textcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:150](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L150)
|
||||
|
||||
***
|
||||
|
||||
### 1024
|
||||
|
||||
> **1024**: [`ChannelSelectCommand`](/v3/api/interfaces/channelselectcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:158](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L158)
|
||||
|
||||
***
|
||||
|
||||
### 128
|
||||
|
||||
> **128**: [`UserSelectCommand`](/v3/api/interfaces/userselectcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:160](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L160)
|
||||
|
||||
***
|
||||
|
||||
### 16
|
||||
|
||||
> **16**: [`ButtonCommand`](/v3/api/interfaces/buttoncommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:155](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L155)
|
||||
|
||||
***
|
||||
|
||||
### 2
|
||||
|
||||
> **2**: [`SlashCommand`](/v3/api/interfaces/slashcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:151](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L151)
|
||||
|
||||
***
|
||||
|
||||
### 256
|
||||
|
||||
> **256**: [`RoleSelectCommand`](/v3/api/interfaces/roleselectcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:157](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L157)
|
||||
|
||||
***
|
||||
|
||||
### 3
|
||||
|
||||
> **3**: [`BothCommand`](/v3/api/interfaces/bothcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:152](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L152)
|
||||
|
||||
***
|
||||
|
||||
### 32
|
||||
|
||||
> **32**: [`StringSelectCommand`](/v3/api/interfaces/stringselectcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:156](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L156)
|
||||
|
||||
***
|
||||
|
||||
### 4
|
||||
|
||||
> **4**: [`ContextMenuUser`](/v3/api/interfaces/contextmenuuser/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:154](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L154)
|
||||
|
||||
***
|
||||
|
||||
### 512
|
||||
|
||||
> **512**: [`MentionableSelectCommand`](/v3/api/interfaces/mentionableselectcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:159](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L159)
|
||||
|
||||
***
|
||||
|
||||
### 64
|
||||
|
||||
> **64**: [`ModalSubmitCommand`](/v3/api/interfaces/modalsubmitcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:161](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L161)
|
||||
|
||||
***
|
||||
|
||||
### 8
|
||||
|
||||
> **8**: [`ContextMenuMsg`](/v3/api/interfaces/contextmenumsg/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:153](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L153)
|
||||
102
src/content/docs/v3/api/interfaces/ContextMenuMsg.md
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "ContextMenuMsg"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (`ctx`) => `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **ctx**: `MessageContextMenuCommandInteraction`\<`CacheType`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:60](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L60)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/v3/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/v3/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`CtxMsg`](/v3/api/enumerations/commandtype/#ctxmsg)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:59](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L59)
|
||||
102
src/content/docs/v3/api/interfaces/ContextMenuUser.md
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "ContextMenuUser"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (`ctx`) => `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **ctx**: `UserContextMenuCommandInteraction`\<`CacheType`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:55](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L55)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/v3/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/v3/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`CtxUser`](/v3/api/enumerations/commandtype/#ctxuser)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:54](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L54)
|
||||
38
src/content/docs/v3/api/interfaces/ControlPlugin.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "ControlPlugin"
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **Args** *extends* `any`[] = `any`[]
|
||||
|
||||
## Properties
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (...`args`) => [`PluginResult`](/v3/api/type-aliases/pluginresult/)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**args**: `Args`
|
||||
|
||||
#### Returns
|
||||
|
||||
[`PluginResult`](/v3/api/type-aliases/pluginresult/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-plugin.ts:73](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-plugin.ts#L73)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`Control`](/v3/api/enumerations/plugintype/#control)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-plugin.ts:72](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-plugin.ts#L72)
|
||||
34
src/content/docs/v3/api/interfaces/Controller.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Controller"
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### next()
|
||||
|
||||
> **next**: () => `Ok`\<`void`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Ok`\<`void`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-plugin.ts:59](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-plugin.ts#L59)
|
||||
|
||||
***
|
||||
|
||||
### stop()
|
||||
|
||||
> **stop**: () => `Err`\<`void`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Err`\<`void`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-plugin.ts:60](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-plugin.ts#L60)
|
||||
94
src/content/docs/v3/api/interfaces/CoreDependencies.md
Normal file
@@ -0,0 +1,94 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "CoreDependencies"
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### @sern/client()
|
||||
|
||||
> **@sern/client**: () => [`Emitter`](/v3/api/interfaces/emitter/)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Emitter`](/v3/api/interfaces/emitter/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/ioc.ts:28](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/ioc.ts#L28)
|
||||
|
||||
***
|
||||
|
||||
### @sern/emitter()
|
||||
|
||||
> **@sern/emitter**: () => [`Emitter`](/v3/api/interfaces/emitter/)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Emitter`](/v3/api/interfaces/emitter/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/ioc.ts:29](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/ioc.ts#L29)
|
||||
|
||||
***
|
||||
|
||||
### @sern/errors()
|
||||
|
||||
> **@sern/errors**: () => [`ErrorHandling`](/v3/api/interfaces/errorhandling/)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ErrorHandling`](/v3/api/interfaces/errorhandling/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/ioc.ts:36](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/ioc.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### @sern/logger()?
|
||||
|
||||
> `optional` **@sern/logger**: () => [`Logging`](/v3/api/interfaces/logging/)\<`unknown`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Logging`](/v3/api/interfaces/logging/)\<`unknown`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/ioc.ts:37](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/ioc.ts#L37)
|
||||
|
||||
***
|
||||
|
||||
### @sern/modules()
|
||||
|
||||
> **@sern/modules**: () => `ModuleManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
`ModuleManager`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/ioc.ts:35](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/ioc.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### ~~@sern/store()~~
|
||||
|
||||
> **@sern/store**: () => [`CoreModuleStore`](/v3/api/interfaces/coremodulestore/)
|
||||
|
||||
:::caution[Deprecated]
|
||||
Will be removed and turned internal
|
||||
:::
|
||||
|
||||
#### Returns
|
||||
|
||||
[`CoreModuleStore`](/v3/api/interfaces/coremodulestore/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/ioc.ts:34](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/ioc.ts#L34)
|
||||
28
src/content/docs/v3/api/interfaces/CoreModuleStore.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "CoreModuleStore"
|
||||
---
|
||||
|
||||
Represents a core module store that stores IDs mapped to file paths.
|
||||
|
||||
## Properties
|
||||
|
||||
### commands
|
||||
|
||||
> **commands**: `Map`\<`string`, `Module`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/module-store.ts:7](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/contracts/module-store.ts#L7)
|
||||
|
||||
***
|
||||
|
||||
### metadata
|
||||
|
||||
> **metadata**: `WeakMap`\<`Module`, `CommandMeta`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/module-store.ts:8](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/contracts/module-store.ts#L8)
|
||||
106
src/content/docs/v3/api/interfaces/DiscordEventCommand.md
Normal file
@@ -0,0 +1,106 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "DiscordEventCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** *extends* keyof `ClientEvents` = keyof `ClientEvents`
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `T`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:106](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L106)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/v3/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/v3/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`Discord`](/v3/api/enumerations/eventtype/#discord)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:107](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L107)
|
||||
|
||||
## Methods
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**(...`args`): `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**args**: `ClientEvents`\[`T`\]
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:108](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L108)
|
||||
23
src/content/docs/v3/api/interfaces/Disposable.md
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Disposable"
|
||||
---
|
||||
|
||||
Represents a Disposable contract.
|
||||
Let dependencies implement this to dispose and cleanup.
|
||||
|
||||
## Methods
|
||||
|
||||
### dispose()
|
||||
|
||||
> **dispose**(): `unknown`
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/hooks.ts:15](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/contracts/hooks.ts#L15)
|
||||
66
src/content/docs/v3/api/interfaces/Emitter.md
Normal file
@@ -0,0 +1,66 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Emitter"
|
||||
---
|
||||
|
||||
## Methods
|
||||
|
||||
### addListener()
|
||||
|
||||
> **addListener**(`eventName`, `listener`): `this`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **eventName**: `string` \| `symbol`
|
||||
|
||||
• **listener**: `AnyFunction`
|
||||
|
||||
#### Returns
|
||||
|
||||
`this`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/emitter.ts:6](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/contracts/emitter.ts#L6)
|
||||
|
||||
***
|
||||
|
||||
### emit()
|
||||
|
||||
> **emit**(`eventName`, ...`payload`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **eventName**: `string` \| `symbol`
|
||||
|
||||
• ...**payload**: `any`[]
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/emitter.ts:8](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/contracts/emitter.ts#L8)
|
||||
|
||||
***
|
||||
|
||||
### removeListener()
|
||||
|
||||
> **removeListener**(`eventName`, `listener`): `this`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **eventName**: `string` \| `symbol`
|
||||
|
||||
• **listener**: `AnyFunction`
|
||||
|
||||
#### Returns
|
||||
|
||||
`this`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/emitter.ts:7](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/contracts/emitter.ts#L7)
|
||||
52
src/content/docs/v3/api/interfaces/ErrorHandling.md
Normal file
@@ -0,0 +1,52 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "ErrorHandling"
|
||||
---
|
||||
|
||||
## Since
|
||||
|
||||
2.0.0
|
||||
|
||||
## Methods
|
||||
|
||||
### ~~crash()~~
|
||||
|
||||
> **crash**(`err`): `never`
|
||||
|
||||
:::caution[Deprecated]
|
||||
Version 4 will remove this method
|
||||
:::
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **err**: `Error`
|
||||
|
||||
#### Returns
|
||||
|
||||
`never`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/error-handling.ts:9](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/contracts/error-handling.ts#L9)
|
||||
|
||||
***
|
||||
|
||||
### updateAlive()
|
||||
|
||||
> **updateAlive**(`error`): `void`
|
||||
|
||||
A function that is called on every throw.
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **error**: `Error`
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/error-handling.ts:14](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/contracts/error-handling.ts#L14)
|
||||
36
src/content/docs/v3/api/interfaces/EventModuleDefs.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "EventModuleDefs"
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### 1
|
||||
|
||||
> **1**: [`DiscordEventCommand`](/v3/api/interfaces/discordeventcommand/)\<keyof `ClientEvents`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:166](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L166)
|
||||
|
||||
***
|
||||
|
||||
### 2
|
||||
|
||||
> **2**: [`SernEventCommand`](/v3/api/interfaces/serneventcommand/)\<keyof [`SernEventsMapping`](/v3/api/interfaces/serneventsmapping/)\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:165](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L165)
|
||||
|
||||
***
|
||||
|
||||
### 3
|
||||
|
||||
> **3**: [`ExternalEventCommand`](/v3/api/interfaces/externaleventcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:167](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L167)
|
||||
112
src/content/docs/v3/api/interfaces/ExternalEventCommand.md
Normal file
@@ -0,0 +1,112 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "ExternalEventCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### emitter
|
||||
|
||||
> **emitter**: keyof `Dependencies`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:48](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L48)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:47](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L47)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/v3/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/v3/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`External`](/v3/api/enumerations/eventtype/#external)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:49](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L49)
|
||||
|
||||
## Methods
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**(...`args`): `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**args**: `unknown`[]
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:50](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/types/core-modules.ts#L50)
|
||||
23
src/content/docs/v3/api/interfaces/Init.md
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Init"
|
||||
---
|
||||
|
||||
Represents an initialization contract.
|
||||
Let dependencies implement this to initiate some logic.
|
||||
|
||||
## Methods
|
||||
|
||||
### init()
|
||||
|
||||
> **init**(): `unknown`
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/hooks.ts:7](https://github.com/sern-handler/handler/blob/a19edaf8838dcf088d3947f4a6aa6213d8f5bb9e/src/core/contracts/hooks.ts#L7)
|
||||