203 Commits

Author SHA1 Message Date
Jacob Nguyen
74b259e1b6 build docs 2023-08-23 20:28:45 -05:00
Jacob Nguyen
76eb15c793 progress on build docs 2023-08-22 14:49:45 -05:00
Jacob Nguyen
2689b95e85 fix broken links 2023-08-13 10:52:46 -05:00
Jacob Nguyen
e64667b31c Update publish.md 2023-08-13 00:57:14 -05:00
Jacob Nguyen
749b706a02 Merge pull request #40 from sern-handler/cli
feat: dedicated cli information
2023-08-09 13:08:46 -05:00
Jacob Nguyen
2f757710e1 publish + 2023-08-09 13:04:50 -05:00
Jacob Nguyen
d77ee3f7f5 casing 2023-08-09 12:57:09 -05:00
Jacob Nguyen
1d142db329 feat: dedicated cli information 2023-08-09 12:52:03 -05:00
Jacob Nguyen
71f100d079 Merge pull request #39 from sern-handler/Murtatrxx-patch-1
refactor: Update services.md
2023-08-04 21:20:51 -05:00
Jacob Nguyen
0b8de88344 update service guide 2023-08-04 21:08:51 -05:00
xxDeveloper
bfc4d6ac8e fix: JSX issue 2023-08-04 20:14:30 +03:00
xxDeveloper
b06251f499 please work 2023-08-04 20:06:52 +03:00
xxDeveloper
19db611a9b fix: Deploy success 2023-08-04 20:01:11 +03:00
xxDeveloper
ef452e678a fix: Unterminated JSX tag 2023-08-04 19:50:29 +03:00
xxDeveloper
c7a8611476 docs: Add some magic 2023-08-04 19:44:22 +03:00
xxDeveloper
9802586bf7 docs: Update services.md 2023-08-04 19:35:18 +03:00
Jacob Nguyen
d59674eca2 Merge pull request #38 from sern-handler/meta
try new meta
2023-07-29 18:43:42 -05:00
Jacob Nguyen
9168f61c09 better links 2023-07-29 18:28:27 -05:00
Jacob Nguyen
c1d64d1172 more info 2023-07-29 18:21:13 -05:00
Jacob Nguyen
2b3cdc2374 fix meta 2023-07-29 18:19:41 -05:00
Jacob Nguyen
530a622c36 try again 2023-07-29 18:07:05 -05:00
Jacob Nguyen
c46f074926 try new meta 2023-07-29 17:31:02 -05:00
Jacob Nguyen
3cc8b38390 fix links oops 2023-07-29 17:20:21 -05:00
Jacob Nguyen
ef6420a669 Merge pull request #36 from sern-handler/feat/version3
feat: version 3
2023-07-29 17:03:42 -05:00
Jacob Nguyen
e10e6cbd2f upgrades to guide and frontpage 2023-07-29 11:09:03 -05:00
xxDeveloper
d531eb7340 fix: Why 2023-07-28 18:10:11 +03:00
xxDeveloper
332399bb43 fix: Search issues 2023-07-28 18:05:26 +03:00
xxDeveloper
b97bc9dde7 fix: Optimise search 2023-07-28 17:52:14 +03:00
xxDeveloper
d447a40f98 fix: DocSearch 2023-07-28 17:40:34 +03:00
xxDeveloper
eca35e1309 fix: Please work 2023-07-28 17:32:36 +03:00
xxDeveloper
44645d89de fix: Search 2023-07-28 17:25:31 +03:00
xxDeveloper
66bdaf7f9f docs: Add search 2023-07-28 17:22:38 +03:00
xxDeveloper
d9a69a4b6b docs: Update choose-ide.md 2023-07-28 14:03:28 +03:00
Jacob Nguyen
70ff70a1bf update svgs 2023-07-28 00:37:35 -05:00
Jacob Nguyen
59b6096423 update npm create 2023-07-28 00:25:46 -05:00
Jacob Nguyen
ee11018d48 feat: big ass revamp 2023-07-28 00:15:56 -05:00
Jacob Nguyen
e547c0f485 Merge pull request #37 from SrIzan10/new-logo
feat: new logo!
2023-07-26 10:20:59 -05:00
75140b3d38 feat: new logo! 2023-07-26 17:16:15 +02:00
Jacob Nguyen
f1917da3e6 feat: add new interfaces 2023-07-17 09:59:50 -05:00
Jacob Nguyen
7a80638a1b update docs and blog 2023-07-17 09:55:43 -05:00
Jacob Nguyen
4c6b6f9177 comment out plugin 2023-06-30 21:59:32 -05:00
Jacob Nguyen
49a910f90a fix docs build 2023-06-30 21:56:51 -05:00
Jacob Nguyen
05e470b99b change walkthrough name and update walkthrough 2023-06-28 10:34:30 -05:00
Jacob Nguyen
ebe5c84ba3 separating walkthroughs 2023-06-26 23:03:54 -05:00
Jacob Nguyen
a4d12af7f2 chore: add more 2023-06-26 22:22:26 -05:00
Jacob Nguyen
b8377ec5a4 Merge pull request #34 from sern-handler/chore/docs
chore: update docs
2023-04-19 12:58:13 -05:00
Jacob Nguyen
b8be42b1d7 Merge pull request #33 from SrIzan10/patch-6
chore: change srizan domain from ml to dev
2023-04-19 12:56:54 -05:00
Jacob Nguyen
9eebee836a chore: change ethan's title 2023-04-15 15:21:53 -05:00
Jacob Nguyen
64adb7b0ca chore: update docusaurus and docs 2023-04-15 15:08:48 -05:00
Jacob Nguyen
51a9774b58 chore: update docs 2023-04-15 15:08:05 -05:00
Jacob Nguyen
4feb242b61 chore: update links 2023-04-15 15:07:45 -05:00
24a2098402 chore: change srizan domain from ml to dev 2023-04-04 16:26:22 +02:00
xxDeveloper
6ab8f09271 Update preparing.md 2023-02-06 23:04:24 +03:00
xxDeveloper
04a7824983 Update preparing.md 2023-02-06 22:53:19 +03:00
xxDeveloper
994f0ca0e8 Update preparing.md 2023-02-06 22:52:37 +03:00
Jacob Nguyen
a60c20545e Merge pull request #31 from sern-handler/twofive
feat: twopointfive blog
2023-01-30 12:23:10 -06:00
Jacob Nguyen
9923ad226d fix: comment plugin out 2023-01-26 15:55:38 -06:00
Jacob Nguyen
a418273592 fix: typo 2023-01-26 15:51:08 -06:00
Jacob Nguyen
cefbc62823 docs: finish blog 2023-01-26 15:47:53 -06:00
Jacob Nguyen
437b8759cb docs: add new plugins docs 2023-01-17 11:33:48 -06:00
Jacob Nguyen
7e0c9c012f fix: links 2023-01-17 11:33:25 -06:00
Jacob Nguyen
9087c085c4 feat: update documentation and clarify documentation 2023-01-17 11:23:46 -06:00
Jacob Nguyen
adfbe3b8a4 feat: update docs and some blog progress 2023-01-12 22:06:31 -06:00
Jacob Nguyen
39ff89aa00 feat: blog2/main (#30) 2022-12-28 22:43:41 +03:00
Jacob Nguyen
486b4eced9 feat: starting writing 2.0 release blog 2022-12-13 23:22:31 -06:00
THEALAN
ccc5466b9c Label Fixes (#28) 2022-12-05 08:00:56 +03:00
xxDeveloper
ffc3e5419a Update CNAME 2022-11-05 13:57:43 +03:00
xxDeveloper
c965f6fca2 feat: Improvements 2022-10-09 12:38:06 +03:00
ba9b7605a6 feat: how to use sern blog post (#27)
* feat: how to use sern blog post

* fix: all issues
2022-10-09 10:37:04 +03:00
xxDeveloper
3842e2dc35 fix: Improvements for previous release-logs 2022-10-08 20:20:13 +03:00
Jacob Nguyen
dd0a61d71a Merge pull request #26 from sern-handler/feat-blog
feat: blog
2022-09-28 11:50:11 -05:00
Jacob Nguyen
b588f64dd5 fix: admonition 2022-09-28 01:47:54 -05:00
Jacob Nguyen
9a686c27f0 fix: admonition 2022-09-28 01:45:14 -05:00
Jacob Nguyen
068ee4c7f3 feat: change date of blog 2022-09-28 01:39:01 -05:00
Jacob Nguyen
61bef454da fix: try fiux 2022-09-28 01:31:45 -05:00
Jacob Nguyen
0c5cc44017 fix: links 2022-09-28 01:24:32 -05:00
Jacob Nguyen
62e0d6a61e feat: blogwork 2022-09-28 00:20:58 -05:00
Jacob Nguyen
784d50b8a7 feat: adding blogs 2022-09-27 14:33:41 -05:00
xxDeveloper
6857d86848 fix: typo at subtitle 2022-09-25 13:51:38 +03:00
0936b2db77 fix: hand lers. rede fined. (#25) 2022-09-25 13:46:42 +03:00
Jacob Nguyen
db4c4adfa8 Merge pull request #24 from SrIzan10/patch-4
feat: change discord embed preview color
2022-09-16 13:08:02 -05:00
92a99887eb revert: nvm 2022-09-16 20:06:15 +02:00
ae3a02b066 fix: attempt 2 2022-09-16 20:03:35 +02:00
a745ed65f1 feat: image on embed, attempt 1 2022-09-16 19:55:54 +02:00
f4377c8689 feat: change discord embed preview color 2022-09-16 19:49:00 +02:00
Duro
d253d3845a fix: node download link (#23) 2022-09-15 18:11:47 +03:00
d6378cf861 fix: hero image stretched out (#21)
* fix: icon on iPhone 13 stretched out

* chore: fix typo

* feat: adding width attr

Co-authored-by: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com>
2022-08-31 19:41:15 +03:00
b36464273e fix: if you have more problems, join the discord (#22) 2022-08-29 17:21:57 +03:00
7648247f38 fix: duplicate title in index (#19) 2022-08-29 17:12:48 +03:00
0efe03d88a fix: typo and its contributors (#20) 2022-08-29 15:31:32 +03:00
xxDeveloper
7c8008625d chore: Zoho domain verification 2022-08-24 22:05:08 +03:00
xxDeveloper
98254a7391 Delete zoho-domain-verification.html 2022-08-24 22:04:23 +03:00
xxDeveloper
85b6bbb1cf chore: Zoho domain verification 2022-08-24 21:55:14 +03:00
Jacob Nguyen
24569595f9 Merge pull request #18 from SrIzan10/srizan-patch-1
feat: static discord link
2022-08-18 14:55:14 -05:00
647c89755c fix: discord.html moved to static/ 2022-08-18 21:35:45 +02:00
0e6caf5c8a feat: discord link 2022-08-18 20:35:56 +02:00
Jacob Nguyen
9a7e98bede feat: update config (#17) 2022-08-17 22:36:33 +03:00
Jacob Nguyen
43f6e227ca Merge pull request #16 from EvolutionX-10/master
fix: edit the page link (again) + js snippet fix
2022-08-17 12:25:02 -05:00
Jacob Nguyen
427fa8cdc9 chore: update branch name in workflow 2022-08-17 12:10:06 -05:00
Evo
ce68afeeaf fix: js snippet for ping cmd 2022-08-17 22:35:50 +05:30
Evo
0f01b5863e chore: fixes link (again) 2022-08-17 22:23:53 +05:30
Evo
0fafea8539 Merge branch 'sern-handler:master' into master 2022-08-17 22:23:12 +05:30
Evo
96283b2d45 fix: edit the page link (#1) (#15) 2022-08-17 19:51:47 +03:00
Evo
5f28408e05 fix: edit the page link (#1) 2022-08-17 22:20:05 +05:30
Jacob Nguyen
6214328309 Merge pull request #13 from AnisTigrini/fix/license-rendering-bug
fix: Small rendering bug on MIT License
2022-08-16 21:47:27 -05:00
Anis Tigrini
5244a9d020 fixed double quotes issue 2022-08-16 22:44:09 -04:00
Anis Tigrini
95f07e7bfa fixed alt on MIT License 2022-08-16 22:26:02 -04:00
Anis Tigrini
428e975fee fixed MIT license rendering on website 2022-08-16 22:19:56 -04:00
Jacob Nguyen
178a49dcc5 Merge pull request #12 from EvolutionX-10/patch-1
fix: incorrect example in event module
2022-08-13 21:15:46 -05:00
Evo
57b2a3ec73 chore: address requested changes 2022-08-14 07:44:17 +05:30
Evo
40e4fe60ad fix: incorrect example in event module 2022-08-14 07:06:46 +05:30
Jacob Nguyen
2051a692be chore: edit link so no new windows 2022-08-13 16:53:10 -05:00
Jacob Nguyen
4e66d27350 fix: broken link 2022-08-13 16:48:29 -05:00
Jacob Nguyen
e19b5e345e feat: add favicon 2022-08-13 16:45:31 -05:00
Jacob Nguyen
8845e3827d feat: action changes and edit link 2022-08-13 16:34:53 -05:00
Jacob Nguyen
d30eb72469 feat: delete needless assets/dir 2022-08-13 16:23:23 -05:00
Jacob Nguyen
73478e6d29 Trigger Build 2022-08-13 15:31:26 -05:00
Jacob Nguyen
b9227a70e2 Trigger Build 2022-08-13 15:25:07 -05:00
Jacob Nguyen
07b83f76fe feat: edit action 2022-08-13 15:19:41 -05:00
Jacob Nguyen
3956759f06 Trigger Build 2022-08-13 15:15:08 -05:00
Jacob Nguyen
88b4ffae11 feat: update gh action 2022-08-13 14:54:05 -05:00
Jacob Nguyen
2bce9458bf feat: update gh action 2022-08-13 14:51:14 -05:00
Jacob Nguyen
cd601bdefe Merge remote-tracking branch 'origin/jacoobes' into jacoobes 2022-08-13 14:46:44 -05:00
Jacob Nguyen
ae9c40ee50 feat: configure docusaurus.config.js for github pages 2022-08-13 14:46:16 -05:00
Jacob Nguyen
d4abf4bc9d feat: move CNAME to static/ 2022-08-13 14:46:16 -05:00
Jacob Nguyen
e4eaf9dda2 feat: remove old index.html in static/ 2022-08-13 14:46:16 -05:00
Jacob Nguyen
5178605264 feat: remove old index.html in static/ 2022-08-13 14:46:16 -05:00
xxDeveloper
62982d91e4 ci: Create docusaurus workflow 2022-08-13 22:44:08 +03:00
Jacob Nguyen
e8acece51a feat: configure docusaurus.config.js for github pages 2022-08-13 14:41:38 -05:00
Jacob Nguyen
463f0f61e0 feat: move CNAME to static/ 2022-08-13 14:38:57 -05:00
Jacob Nguyen
d23c54dd2c feat: remove old index.html in static/ 2022-08-13 14:36:15 -05:00
Jacob Nguyen
e627b8bb55 feat: remove old index.html in static/ 2022-08-13 14:27:21 -05:00
Jacob Nguyen
add28784d2 Merge pull request #11 from sern-handler/jacoobes
feat: Added docs
2022-08-13 14:18:54 -05:00
Jacob Nguyen
0eccac926f Merge branch 'master' into jacoobes
# Conflicts:
#	docs/guide/.nojekyll
#	docs/guide/README.md
#	docs/guide/getting-started/choose-ide.md
#	docs/guide/good-to-know/sern-config.html
#	docs/guide/intro.html
#	docs/guide/other/release-notes.html
#	docs/guide/walkthrough/cli.md
#	docs/guide/walkthrough/conclusion.md
#	docs/guide/walkthrough/first-command.md
#	docs/guide/walkthrough/first-event.md
#	docs/guide/walkthrough/goal.md
#	docs/guide/walkthrough/good-to-know.md
#	docs/guide/walkthrough/plugins.md
#	docs/guide/walkthroughs/cli.html
#	docs/guide/walkthroughs/conclusion.html
#	docs/guide/walkthroughs/first-command.html
#	docs/guide/walkthroughs/first-event.html
#	docs/guide/walkthroughs/plugins.html
#	netlify.toml
#	package.json
2022-08-13 14:05:39 -05:00
Jacob Nguyen
f18d4ded88 feat: add a few more admonitions 2022-08-13 13:55:04 -05:00
Jacob Nguyen
a128e8dee6 feat: cleaning up, adding admonitions 2022-08-13 13:45:13 -05:00
Jacob Nguyen
211aeaefbd feat: add intro 2022-08-12 22:04:29 -05:00
Jacob Nguyen
33301874f9 feat: fix responsiveness and uneven footer
Co-authored-by: xxDeveloper <Murtatrxx@users.noreply.github.com>
2022-08-11 20:14:30 -05:00
Jacob Nguyen
cc7bd61542 feat: make blog private for now 2022-08-09 17:39:33 -05:00
Jacob Nguyen
48912ed979 feat: sidebar order for walkthrough 2022-08-09 17:35:04 -05:00
Jacob Nguyen
cd964af129 feat: made hero larger 2022-08-09 17:18:19 -05:00
Jacob Nguyen
4e604a0449 feat: add coming soon plugins page 2022-08-09 16:52:07 -05:00
Jacob Nguyen
6f4ab8ef9c feat: fixing some links after repo change 2022-08-09 16:20:31 -05:00
Jacob Nguyen
e43eec5f20 feat: change linebreaks, remove other/ 2022-08-09 16:02:05 -05:00
Jacob Nguyen
fe27ff5a0c feat: progresso noodle soup
Co-authored-by: xxDeveloper <Murtatrxx@users.noreply.github.com>
2022-08-08 16:41:48 -05:00
Jacob Nguyen
eb3b049a19 feat: work on blog and edit README.md 2022-08-08 14:00:55 -05:00
Jacob Nguyen
974b909946 feat: add netlify serve directory 2022-08-08 11:27:10 -05:00
Jacob Nguyen
f607b95346 feat: commit out plugins 2022-08-07 18:03:48 -05:00
Jacob Nguyen
ed91cceabc feat: changes 2022-08-07 17:29:05 -05:00
Jacob Nguyen
83320e49f6 feat adding guide to repo, adding api 2022-08-07 16:43:28 -05:00
Jacob Nguyen
fc3dde72f9 feat adding guide to repo, adding api 2022-08-07 16:42:55 -05:00
Jacob Nguyen
e0444a9998 feat: add doc blog 2022-08-07 10:51:42 -05:00
Jacob Nguyen
8e4f5299df feat: add resources 2022-08-07 10:50:21 -05:00
Jacob Nguyen
70010ffe57 feat: start merge 2022-08-07 10:47:25 -05:00
xxDeveloper
97309dba62 feat: Added more functionality bot 404 page 2022-07-28 21:34:22 +03:00
xxDeveloper
31651e1963 feat: Added 404 page 2022-07-28 21:31:05 +03:00
Jacob Nguyen
05e188439d fixes: fixes a lot of the bad links and rewording for brevity (#9)
* bug: typos

* fix: links

* fix: sidebar links

* fix: cli link

* fix: local links

* fix: oops forgot some links

* fixing more links

* docs: adding brevity

* feat: adding basic plugin description back

* fix: export -> exports

* fix: intro href

* fix: docs link (don't want unwanted redirect to home

* fix: titles

* style: format ( vscode default )

* docs: comment out

* adding nojekyll

* fix: idk trying to fix netlify deploy

* Create netlify.toml

* Update package.json

* docs: Removed nojekyll

* chore: update netlify.toml

Co-authored-by: xxDeveloper <77380166+Murtatrxx@users.noreply.github.com>
2022-07-26 23:17:05 +03:00
xxDeveloper
5bfe0f825c Update netlify.toml 2022-07-26 21:55:26 +03:00
xxDeveloper
da0eefdf3b Create netlify.toml 2022-07-26 21:53:27 +03:00
xxDeveloper
2ee09a6e7a docs: Fix the color 2022-07-25 11:38:49 +03:00
xxDeveloper
fc134c0c9c docs: Guide v1.0.0 2022-07-24 23:26:42 +03:00
xxDeveloper
24765af575 Merge branch 'master' of https://github.com/sern-handler/website 2022-07-24 23:24:04 +03:00
xxDeveloper
243c020628 docs: Guide v1.0.0 2022-07-24 23:23:38 +03:00
xxDeveloper
cff7bd7e09 docs(readme): Uncapitalized the brand name 2022-07-15 16:56:01 +03:00
xxDeveloper
0eec925422 Merge pull request #8 from sern-handler/guide-improve
docs: Guide improve
2022-07-15 16:55:23 +03:00
xxDeveloper
b08f1ff29f docs(website): Uncapitalized the brand name 2022-07-15 16:48:56 +03:00
xxDeveloper
674184badb Merge pull request #7 from sern-handler/jacoobes
docs: Added guide
2022-07-12 23:35:00 +03:00
Jacob Nguyen
9cfb202014 feat: requested changes 2022-07-12 14:28:07 -05:00
Jacob Nguyen
c2e1028bc8 fix: anchorsx2 2022-07-11 16:00:53 -05:00
Jacob Nguyen
99a3ed27f7 fix: anchors 2022-07-11 15:58:23 -05:00
Jacob Nguyen
0e83cb99ec feat: change to requested https://github.com/sern-handler/website/pull/7 2022-07-11 15:54:27 -05:00
Jacob Nguyen
23ab9d36f5 feat: all of it has been written i think ( rough draft ) 2022-07-10 14:44:57 -05:00
Jacob Nguyen
3fbfdeff76 feat: add diagram 2022-07-10 00:04:52 -05:00
Jacob Nguyen
3d05c4873f feat: eventplugins.drawio.svg 2022-07-09 23:55:53 -05:00
Jacob Nguyen
d34b97dfa8 feat: Event plugin diagram 2022-07-09 23:49:35 -05:00
Jacob Nguyen
e37640b6b2 event-plugin-diagram 2022-07-09 23:30:00 -05:00
Jacob Nguyen
0e363ad491 feat: finish command plugin section 2022-07-09 23:26:17 -05:00
Jacob Nguyen
7ff79a4576 feat: more progress on docs 2022-07-06 01:06:32 -05:00
Jacob Nguyen
7771807657 feat: typos 2022-07-02 10:45:13 -05:00
Jacob Nguyen
8f33ee8e60 Merge remote-tracking branch 'origin/jacoobes' into jacoobes
# Conflicts:
#	guide-en/README.md
2022-07-02 10:23:39 -05:00
Jacob Nguyen
ed3a4a53e3 feat: revert changes 2022-07-02 10:23:07 -05:00
xxDeveloper
f84e2e686a docs: Updated template Disclaimer 2022-07-02 11:53:22 +03:00
Jacob Nguyen
93e3aeccd8 feat: add another example of commandModule 2022-07-01 20:36:33 -05:00
Jacob Nguyen
7140a7aef8 feat: adding docs 2022-07-01 19:10:17 -05:00
xxDeveloper
3abba07c89 Merge branch 'master' of https://github.com/sern-handler/website 2022-06-26 23:32:28 +03:00
xxDeveloper
28395413ae feat: Added templates for other languages 2022-06-26 23:32:23 +03:00
xxDeveloper
70e20f6030 feat: Remove name, add todo 2022-06-26 23:29:43 +03:00
Jacob Nguyen
2542851e2e feat: Remove name, add todo 2022-06-26 15:28:52 -05:00
xxDeveloper
c129a4e032 Merge branch 'master' of https://github.com/sern-handler/website 2022-06-26 23:27:02 +03:00
xxDeveloper
d8cab0782e feat: Added some text to preparing.md 2022-06-26 23:26:56 +03:00
xxDeveloper
bf0611bd79 feat: Added some text to choose-ide.md file 2022-06-26 23:24:25 +03:00
xxDeveloper
3d0cf23c53 Create LICENSE 2022-06-26 23:19:16 +03:00
xxDeveloper
9a0f5a5dbc chore: Shortened the discord link 2022-06-26 23:17:26 +03:00
xxDeveloper
384e09541b fix: Fixed the topbar link to the guide 2022-06-26 23:16:17 +03:00
xxDeveloper
97722573fa feat: Added first steps template 2022-06-26 23:12:54 +03:00
xxDeveloper
bc6f9048c2 feat: Few improvements to templates 2022-06-26 23:10:13 +03:00
xxDeveloper
c1d5931ccd Merge branch 'master' of https://github.com/sern-handler/website 2022-06-26 23:06:30 +03:00
xxDeveloper
81c7250f63 docs: 💎 Added guide templates 2022-06-26 23:06:20 +03:00
xxDeveloper
f1db5ff361 docs: Updated readme 2022-06-24 15:53:31 +03:00
xxDeveloper
6aa53edc22 chore: Updated icon 2022-06-24 15:51:37 +03:00
xxDeveloper
2f46becc47 chore: Updated topbar links 2022-06-24 15:47:55 +03:00
xxDeveloper
54b58d944f feat: 💥 Pretend links to be working 2022-06-23 22:25:12 +03:00
xxDeveloper
f90b05bf92 ci: please build page pls 2022-06-23 21:32:06 +03:00
148 changed files with 33155 additions and 11702 deletions

39
.github/workflows/docusaurus.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Deploy to GitHub Pages
on:
push:
branches: [ main ]
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install dependencies
run: npm ci
- name: Build website
run: npm run build
# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./build
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com

20
.gitignore vendored Normal file
View File

@@ -0,0 +1,20 @@
# Dependencies
/node_modules
# Production
/build
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

8
.idea/.gitignore generated vendored Normal file
View 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
View 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
View 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
View 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
View 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
View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

420
.idea/workspace.xml generated Normal file
View File

@@ -0,0 +1,420 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="53dd69d3-e01a-4656-b414-c727f5aa549a" name="Changes" comment="docs: add new plugins docs">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/classes/CommandExecutable.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/classes/CommandExecutable.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/classes/Context.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/classes/Context.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/classes/DefaultErrorHandling.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/classes/DefaultErrorHandling.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/classes/DefaultLogging.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/classes/DefaultLogging.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/classes/DefaultModuleManager.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/classes/DefaultModuleManager.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/classes/EventExecutable.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/classes/EventExecutable.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/classes/ModuleStore.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/classes/ModuleStore.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/classes/SernEmitter.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/classes/SernEmitter.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/enums/CommandType.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/enums/CommandType.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/enums/EventType.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/enums/EventType.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/enums/PayloadType.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/enums/PayloadType.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/enums/PluginType.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/enums/PluginType.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/enums/SernError.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/enums/SernError.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/AutocompleteCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/AutocompleteCommand.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/BothCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/BothCommand.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ButtonCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ButtonCommand.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ChannelSelectCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ChannelSelectCommand.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/CommandPlugin.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/CommandPlugin.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ContextMenuMsg.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ContextMenuMsg.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ContextMenuUser.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ContextMenuUser.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ControlPlugin.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ControlPlugin.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/Controller.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/Controller.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/Dependencies.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/Dependencies.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/DependencyConfiguration.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/DependencyConfiguration.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/DiscordEventCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/DiscordEventCommand.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ErrorHandling.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ErrorHandling.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/EventPlugin.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/EventPlugin.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ExternalEventCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ExternalEventCommand.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/InitArgs.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/InitArgs.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/InitPlugin.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/InitPlugin.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/Logging.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/Logging.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/MentionableSelectCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/MentionableSelectCommand.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ModalSubmitCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ModalSubmitCommand.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/Module.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/Module.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/ModuleManager.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/ModuleManager.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/Plugin.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/Plugin.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/RoleSelectCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/RoleSelectCommand.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/SernAutocompleteData.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/SernAutocompleteData.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/SernEventCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/SernEventCommand.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/SernSubCommandData.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/SernSubCommandData.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/SernSubCommandGroupData.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/SernSubCommandGroupData.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/SlashCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/SlashCommand.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/StringSelectCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/StringSelectCommand.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/TextCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/TextCommand.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/UserSelectCommand.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/UserSelectCommand.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/interfaces/Wrapper.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/interfaces/Wrapper.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/modules.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/modules.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/api/namespaces/Sern.md" beforeDir="false" afterPath="$PROJECT_DIR$/docs/api/namespaces/Sern.md" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ComposerSettings">
<execution />
</component>
<component name="Git.Merge.Settings">
<option name="BRANCH" value="master" />
</component>
<component name="Git.Rebase.Settings">
<option name="NEW_BASE" value="jacoobes" />
</component>
<component name="Git.Settings">
<option name="RECENT_BRANCH_BY_REPOSITORY">
<map>
<entry key="$PROJECT_DIR$" value="main" />
</map>
</option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="GithubPullRequestsUISettings">
<option name="selectedUrlAndAccountId">
<UrlAndAccount>
<option name="accountId" value="1fedf39a-45aa-449b-9d1d-6f25985f42b4" />
<option name="url" value="https://github.com/sern-handler/website.git" />
</UrlAndAccount>
</option>
</component>
<component name="MacroExpansionManager">
<option name="directoryName" value="d62oj9rg" />
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProjectId" id="2DJXFY4dwukGLOzXi05b6lHCkuk" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;ASKED_SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
&quot;Git.Branch.Popup.ShowAllRemotes&quot;: &quot;true&quot;,
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Users/jacob/OneDrive/Desktop/Projects/sern/website&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;project.structure.last.edited&quot;: &quot;Modules&quot;,
&quot;project.structure.proportion&quot;: &quot;0.0&quot;,
&quot;project.structure.side.proportion&quot;: &quot;0.0&quot;,
&quot;ts.external.directory.path&quot;: &quot;E:\\IntelliJ IDEA 2022.1.1\\plugins\\JavaScriptLanguage\\jsLanguageServicesImpl\\external&quot;
}
}</component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="C:\Users\jacob\IdeaProjects\website\static\img" />
</key>
</component>
<component name="RunManager" selected="npm.start">
<configuration name="build" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="build" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
<configuration name="start" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="start" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
<configuration name="typedoc-json" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="typedoc-json" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="npm.start" />
<item itemvalue="npm.build" />
<item itemvalue="npm.typedoc-json" />
</list>
</recent_temporary>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="53dd69d3-e01a-4656-b414-c727f5aa549a" name="Changes" comment="chore: edit link so no new windows" />
<created>1660418057765</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1660418057765</updated>
<workItem from="1660418059202" duration="1120000" />
<workItem from="1660419190329" duration="211000" />
<workItem from="1660703091089" duration="348000" />
<workItem from="1661890199928" duration="3164000" />
<workItem from="1661963277269" duration="666000" />
<workItem from="1661966300011" duration="124000" />
<workItem from="1664254948139" duration="391000" />
<workItem from="1664301972139" duration="4356000" />
<workItem from="1664322335828" duration="5088000" />
<workItem from="1664342243187" duration="510000" />
<workItem from="1664342844947" duration="41000" />
<workItem from="1664345686862" duration="1690000" />
<workItem from="1670994246639" duration="17000" />
<workItem from="1670994294247" duration="1058000" />
<workItem from="1671030002725" duration="5842000" />
<workItem from="1671047161316" duration="3576000" />
<workItem from="1671119393024" duration="3889000" />
<workItem from="1673974979200" duration="2385000" />
<workItem from="1674757791435" duration="925000" />
</task>
<task id="LOCAL-00001" summary="feat: remove old index.html in static/">
<created>1660418841831</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1660418841831</updated>
</task>
<task id="LOCAL-00002" summary="feat: remove old index.html in static/">
<created>1660419375631</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1660419375631</updated>
</task>
<task id="LOCAL-00003" summary="feat: edit action">
<created>1660421982013</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1660421982013</updated>
</task>
<task id="LOCAL-00004" summary="feat: delete needless assets/dir">
<created>1660425803740</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1660425803740</updated>
</task>
<task id="LOCAL-00005" summary="feat: action changes and edit link">
<created>1660426493480</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1660426493480</updated>
</task>
<task id="LOCAL-00006" summary="feat: add favicon">
<created>1660427131558</created>
<option name="number" value="00006" />
<option name="presentableId" value="LOCAL-00006" />
<option name="project" value="LOCAL" />
<updated>1660427131558</updated>
</task>
<task id="LOCAL-00007" summary="fix: broken link">
<created>1660427309873</created>
<option name="number" value="00007" />
<option name="presentableId" value="LOCAL-00007" />
<option name="project" value="LOCAL" />
<updated>1660427309873</updated>
</task>
<task id="LOCAL-00008" summary="chore: edit link so no new windows">
<created>1660427590730</created>
<option name="number" value="00008" />
<option name="presentableId" value="LOCAL-00008" />
<option name="project" value="LOCAL" />
<updated>1660427590730</updated>
</task>
<task id="LOCAL-00009" summary="chore: fix typo">
<created>1661890861168</created>
<option name="number" value="00009" />
<option name="presentableId" value="LOCAL-00009" />
<option name="project" value="LOCAL" />
<updated>1661890861168</updated>
</task>
<task id="LOCAL-00010" summary="feat: adding width attr">
<created>1661963793586</created>
<option name="number" value="00010" />
<option name="presentableId" value="LOCAL-00010" />
<option name="project" value="LOCAL" />
<updated>1661963793586</updated>
</task>
<task id="LOCAL-00011" summary="feat: adding blogs">
<created>1664307221790</created>
<option name="number" value="00011" />
<option name="presentableId" value="LOCAL-00011" />
<option name="project" value="LOCAL" />
<updated>1664307221790</updated>
</task>
<task id="LOCAL-00012" summary="feat: blogwork">
<created>1664342459061</created>
<option name="number" value="00012" />
<option name="presentableId" value="LOCAL-00012" />
<option name="project" value="LOCAL" />
<updated>1664342459061</updated>
</task>
<task id="LOCAL-00013" summary="fix: links">
<created>1664346272428</created>
<option name="number" value="00013" />
<option name="presentableId" value="LOCAL-00013" />
<option name="project" value="LOCAL" />
<updated>1664346272428</updated>
</task>
<task id="LOCAL-00014" summary="fix: try fiux">
<created>1664346705175</created>
<option name="number" value="00014" />
<option name="presentableId" value="LOCAL-00014" />
<option name="project" value="LOCAL" />
<updated>1664346705175</updated>
</task>
<task id="LOCAL-00015" summary="feat: change date of blog">
<created>1664347141696</created>
<option name="number" value="00015" />
<option name="presentableId" value="LOCAL-00015" />
<option name="project" value="LOCAL" />
<updated>1664347141696</updated>
</task>
<task id="LOCAL-00016" summary="feat: starting writing 2.0 release blog">
<created>1670995351643</created>
<option name="number" value="00016" />
<option name="presentableId" value="LOCAL-00016" />
<option name="project" value="LOCAL" />
<updated>1670995351643</updated>
</task>
<task id="LOCAL-00017" summary="feat: adding more to blog">
<created>1671035904313</created>
<option name="number" value="00017" />
<option name="presentableId" value="LOCAL-00017" />
<option name="project" value="LOCAL" />
<updated>1671035904313</updated>
</task>
<task id="LOCAL-00018" summary="feat: update docs and links">
<created>1671049168115</created>
<option name="number" value="00018" />
<option name="presentableId" value="LOCAL-00018" />
<option name="project" value="LOCAL" />
<updated>1671049168115</updated>
</task>
<task id="LOCAL-00019" summary="feat: update docs and links">
<created>1671049335597</created>
<option name="number" value="00019" />
<option name="presentableId" value="LOCAL-00019" />
<option name="project" value="LOCAL" />
<updated>1671049335597</updated>
</task>
<task id="LOCAL-00020" summary="feat: fix blog links">
<created>1671050397033</created>
<option name="number" value="00020" />
<option name="presentableId" value="LOCAL-00020" />
<option name="project" value="LOCAL" />
<updated>1671050397033</updated>
</task>
<task id="LOCAL-00021" summary="feat: update blog">
<created>1671121547701</created>
<option name="number" value="00021" />
<option name="presentableId" value="LOCAL-00021" />
<option name="project" value="LOCAL" />
<updated>1671121547701</updated>
</task>
<task id="LOCAL-00022" summary="feat: update typedoc">
<created>1671121807771</created>
<option name="number" value="00022" />
<option name="presentableId" value="LOCAL-00022" />
<option name="project" value="LOCAL" />
<updated>1671121807771</updated>
</task>
<task id="LOCAL-00023" summary="feat: try again">
<created>1671123452807</created>
<option name="number" value="00023" />
<option name="presentableId" value="LOCAL-00023" />
<option name="project" value="LOCAL" />
<updated>1671123452807</updated>
</task>
<task id="LOCAL-00024" summary="feat: update docs and some blog progress">
<created>1673582791487</created>
<option name="number" value="00024" />
<option name="presentableId" value="LOCAL-00024" />
<option name="project" value="LOCAL" />
<updated>1673582791487</updated>
</task>
<task id="LOCAL-00025" summary="feat: update documentation and clarify documentation">
<created>1673976226325</created>
<option name="number" value="00025" />
<option name="presentableId" value="LOCAL-00025" />
<option name="project" value="LOCAL" />
<updated>1673976226325</updated>
</task>
<task id="LOCAL-00026" summary="fix: links">
<created>1673976805332</created>
<option name="number" value="00026" />
<option name="presentableId" value="LOCAL-00026" />
<option name="project" value="LOCAL" />
<updated>1673976805332</updated>
</task>
<task id="LOCAL-00027" summary="docs: add new plugins docs">
<created>1673976828238</created>
<option name="number" value="00027" />
<option name="presentableId" value="LOCAL-00027" />
<option name="project" value="LOCAL" />
<updated>1673976828238</updated>
</task>
<option name="localTasksCounter" value="28" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="feat: remove old index.html in static/" />
<MESSAGE value="feat: edit action" />
<MESSAGE value="feat: delete needless assets/dir" />
<MESSAGE value="feat: action changes and edit link" />
<MESSAGE value="feat: add favicon" />
<MESSAGE value="fix: broken link" />
<MESSAGE value="chore: edit link so no new windows" />
<MESSAGE value="chore: fix typo" />
<MESSAGE value="feat: adding width attr" />
<MESSAGE value="feat: adding blogs" />
<MESSAGE value="feat: blogwork" />
<MESSAGE value="fix: try fiux" />
<MESSAGE value="feat: change date of blog" />
<MESSAGE value="feat: starting writing 2.0 release blog" />
<MESSAGE value="feat: adding more to blog" />
<MESSAGE value="feat: update docs and links" />
<MESSAGE value="feat: fix blog links" />
<MESSAGE value="feat: update blog" />
<MESSAGE value="feat: update typedoc" />
<MESSAGE value="feat: try again" />
<MESSAGE value="feat: add image" />
<MESSAGE value="feat: update docs and some blog progress" />
<MESSAGE value="feat: update documentation and clarify documentation" />
<MESSAGE value="fix: links" />
<MESSAGE value="docs: add new plugins docs" />
<option name="LAST_COMMIT_MESSAGE" value="docs: add new plugins docs" />
</component>
</project>

12
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,12 @@
{
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
".idea": true,
".vscode": true
}
}

30
404.html Normal file
View File

@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html style="height:100%">
<head>
<meta name="viewport" charset="utf-8" content="width=device-width, initial-scale=1, shrink-to-fit=no" >
<link rel="icon" href="./assets/images/favicon.ico">
<meta name="theme-color" content="#fff">
<meta name="twitter:card" content="summary">
<meta property="og:title" content="sern">
<meta property="og:description" content="serns clean, modern and web interface.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://sern-handler.js.org/">
<meta property="og:locale" content="en_US">
<meta name="description" content="serns clean, modern and user-friendly web interface.">
<title>sern - Page Not Found</title>
</head>
<body style="color: #444; margin:0;font: normal 14px/20px Arial, Helvetica, sans-serif; height:100%; background-color: #fff;">
<div style="height:auto; min-height:100%; "> <div style="text-align: center; width:800px; margin-left: -400px; position:absolute; top: 30%; left:50%;">
<h1 style="margin:0; font-size:150px; line-height:150px; font-weight:bold;">404</h1>
<h2 style="margin-top:20px;font-size: 30px;">Not Found
</h2>
<p>The link you visited is may be broken or invalid.</p>
<div class="button">
<h2>
<a href="http://sern-handler.js.org" title="Back to home" style="color: #444;">Back to homepage</a>
</h2>
</div>
</div></div></body></html>

1
CNAME
View File

@@ -1 +0,0 @@
sern-handler.js.org

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 Sern
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1 +1,3 @@
# docs
# Website
sern's clean, modern and user-friendly web interface.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -1,2 +0,0 @@
"use strict";

3
babel.config.js Normal file
View File

@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};

View File

@@ -0,0 +1,79 @@
---
slug: 1.2.0
title: Release 1.2.0
authors: [jacoobes]
tags: [release]
---
## Class-based modules
Today we're announcing the ability to create class based modules!
To get started, install
```
npm install @sern/handler@latest
```
Quick List of changes!
- [Class based modules](#class-based-modules)
- [Deprecation Warnings](#deprecation-warnings)
- [Dependencies update](#dependencies-update)
### Class based modules
Incorporate class based modules into your project instead of the traditional `commandModule` or `eventModule`
Extend the new [CommandExecutable](docs/api/classes/CommandExecutable) or [EventExecutable](docs/api/classes/EventExecutable)
```ts title="commands/meaning-of-life.ts"
import { CommandType, CommandExecutable, type Args, type Context } from '@sern/handler';
import { publish } from '../plugins/publish.js';
import { serendipityOnly } from '../plugins/serendipityOnly.js';
export default class extends CommandExecutable<CommandType.Both> {
type = CommandType.Both as const;
description = 'What is the meaning of life?'
override onEvent = [
serendipityOnly()
];
override plugins = [
publish(),
];
// highlight-next-line
execute = async (ctx: Context, args: Args) => {
await ctx.reply('42')
};
}
```
:::caution
execute must not be a method of the class. It should be as above, a property on the class!
:::
```ts title="events/guildMemberAdd.ts"
import { CommandType, EventExecutable, type EventType } from '@sern/handler';
import type { GuildMember } from 'discord.js'
export default class extends EventExecutable<EventType.Discord> {
type = EventType.Discord as const;
// highlight-next-line
execute = (member: GuildMember) => {
console.log(member)
};
}
```
Now, you might ask **why** this feature was added. <br /> Simply put, to give flexibility to the developers.
I believe that you should build your own structures however you might like and customize to your liking.
In addition, **decorators now unofficially work with modules!**
Feel free to use TypeScript experimental decorators to augment and customize your classes.
### Deprecation Warnings
The next update will bring sern v2 with some important features. Here are some things to watch out for.
- [Wrapper#client](docs/api/interfaces/Wrapper) will be deprecated
- [Wrapper#sernEmitter](docs/api/interfaces/Wrapper) will be deprecated
- a SernEmitter will be automatically created once Sern#init is called
- The option to pass in a function or array for [Wrapper#events](docs/api/interfaces/Wrapper) will be deprecated. Only strings are accepted.
- [Sern#addExternal](docs/api/classes/SernEmitter) will be deprecated in favor of a better way.
### Dependencies Update
- TypeScript has been updated to 4.8.3
- Discord.js has been upgraded to 14.5

View File

@@ -0,0 +1,62 @@
---
slug: getting-started
title: How to get started with sern!
authors: [Sr Izan]
tags: [guides]
---
## Hello everyone!
I'm Sr Izan, your fellow user and contributor.
Today I'm going to show you how to get started with sern and all its cool features.
### Step 1: Install the CLI.
Install the CLI:
```
npm i -g @sern/cli
```
and then run
```
sern init
```
:::tip
You can also run `sern init -y` if you want to use the default options.
:::
The CLI is written in Typescript and open-sourced on [Github](https://github.com/sern-handler/cli). (thanks [evo](https://github.com/EvolutionX-10)!)
### Step 2: Have some way to store secrets.
Normally you'd need a way to store secrets, and the best way to do that is by installing another package: `dotenv`
just `npm i dotenv` in the project folder and add `require('dotenv').config()` to your import section. Then, when you login, `process.env.TOKEN` (or however you have it named on your `.env` file) should do the trick.
:::caution
If you're using ESM, configure dotenv with `import 'dotenv/config'` instead of `require('dotenv').config()`.
:::
### And... that's it?
Yes, that's it. Here's a little FAQ to get you started. You can also join the [Discord](https://sern.dev/discord) for any problems.
### Extra: Video tutorial!
<video width="400" controls>
<source src="https://srizan.s-ul.eu/wtJBVsZU" type="video/mp4" />
</video>
## FAQ
**Q**: How do I publish a slash command?
**A**: Install the publish extension. Little video:
<video width="400" controls>
<source src="https://srizan.s-ul.eu/uHzPhfcS" type="video/mp4" />
</video>
**Q**: Any snippet VSCode extension?
**A**: Yeah, just search `sern Snippets` made by a verified publisher called Sr Izan (haha yeah me funny!)
**Q**: HEEEELLLPPPP!!!!
**A**: Hey, don't panic! We're here to help so, join the [Discord](https://sern.dev/discord). We're trying to get to 100 members!

View File

@@ -0,0 +1,191 @@
---
slug: 2.0.0
title: Release 2.0.0
authors: [jacoobes]
tags: [release]
---
## 2.0 Release
Join our [discord](https://sern.dev/discord)! <br />
Wow! We're finally increasing our semantic versioning by +`1.7.9.` <br />
What does this mean?
### Plugin Support for Event Modules
You can now use plugins for event modules. Previous version would throw an error if the
`plugins` field was populated.
```typescript
export function commandPlTest() : SernEmitterPlugin {
return {
type: PluginType.Command,
execute: ({ mod}, controller) => {
if(mod.name === 'module.register') {
console.log('Event Module created correctly')
return controller.next()
}
console.log('event name is wrong')
return controller.stop()
}
}
}
```
Applying this plugin to some `eventModule`:
```typescript
export default eventModule({
name: 'error',
type: EventType.Sern,
plugins: [commandPlTest()],
execute(m) {
console.log(m)
},
})
```
## Dependency Injection and Decoupling
The powerful npm package `iti` decouples sern even more.
Decoupling data structures with the Inversion of Control pattern separates data from logic, which will help speed production
and make sern even more customizable than before.
### How do I start?
```typescript title="src/index.ts"
//With typescript, you can customize / augment your typings.
interface MyDependencies extends Dependencies {
'@sern/client' : Singleton<Client>;
'@sern/logger' : Singleton<DefaultLogging>
}
export const useContainer = Sern.makeDependencies<MyDependencies>({
// exclude: new Set(['@sern/logger']), don't autofill optional dependencies
build: root => root
.add({ '@sern/client': single(client) })
.add({ '@sern/logger': single(new DefaultLogging()) })
});
Sern.init({
defaultPrefix: '!', // removing defaultPrefix will shut down text commands
commands: 'src/commands',
// events: 'src/events' (optional),
containerConfig : {
get: useContainer //pass in your dependency getter here
}
});
```
Using the `Sern#makeDependencies` function, inject your dependencies.
We'll use specific dependencies that are created with the `@sern/keyword`
key.
Using typescript to display all `keywords` and what they represent:
```typescript
export interface Dependencies {
'@sern/client': Singleton<EventEmitter>; //Discord Client
'@sern/logger'?: Singleton<Logging>; //Logger
'@sern/emitter': Singleton<SernEmitter>; //SernEmitter
'@sern/store' : Singleton<ModuleStore>; //Stores all Command Modules
'@sern/modules' : Singleton<ModuleManager>; //Manages Modules
'@sern/errors': Singleton<ErrorHandling>; //A Lifetime / Crash Handler
}
```
:::danger
Sern#addExternal has been deprecated and removed in favor of Sern#makeDependencies
:::
At the moment, one optional dependency, `@sern/logger`, exists. If not added explicitly,
we'll **autofill** with a [DefaultLogger](https://sern.dev/docs/api/classes/defaultlogging).
:::tip
If you don't want a logger, add it to the
`exclude` field while composing dependencies.
:::
Use your generated dependency getter `useContainer` (use whatever name you want), access them
from anywhere.
:::note
the function [useContainerRaw](https://sern.dev/docs/api/modules#usecontainerraw) is provided for direct access to dependencies and the internal
data structure. Use this wisely as no guarantees are made and crashes can happen.
:::
The `build` field follows [createContainer](https://itijs.org/docs/quick-start#usage) function call.
## New CommandTypes
2.0 includes all the new role select menus. `CommandType.MenuSelect` has been renamed into
`CommandType.StringSelect`. The remaining SelectMenus are
`CommandType.RoleSelect`, `CommandType.ChannelSelect`, `CommandType.UserSelect`, `CommandType.MentionableSelect`
```typescript title="commands/roleselect.ts"
export default commandModule({
type: CommandType.RoleSelect,
execute(ctx) {
ctx.reply('role select')
},
})
```
In addition, commandModules with ContextMenus have been renamed.
```diff
- CommandType.MenuUser, CommandType.MenuMsg
+ CommandType.CtxUser, CommandType.CtxMsg
```
## Typings Simplification
Pre 2.0:
<img src="https://cdn.discordapp.com/attachments/820348341358952550/1038577974829666386/image.png" />
<br/> <br/> <br/>
Post 2.0:
<br/>
<img src="https://cdn.discordapp.com/attachments/820348341358952550/1052623728489550015/image.png" />
CommandPlugin<T\> and EventPlugin<T\> typings have also been static'ified, transformed from types to interfaces
## Breaking Changes
<img src="https://img.srizan.dev/Discord_z8Sn1UBfEe.png" />
<br />
All deprecation warnings from previous versions have taken effect, and are removed in 2.0.
```diff
- type Module = EventModule | CommandModule
+ type AnyModule = EventModule | CommandModule
-export type SpreadParams<T extends (...args: never) => unknown> = (
- args: Parameters<T>[number],
- ) => unknown;
```
Override type has been removed due to redundancy
```diff
- discord.js : 14.5
+ discord.js : 14.7
-typescript: 4.7
+ typescript: 4.9
```
```diff
+ interface Wrapper {
+ readonly defaultPrefix?: string;
+ readonly commands: string;
+ readonly events?: string;
+ readonly containerConfig : {
+ get: (...keys: (keyof Dependencies)[]) => unknown[];
+ }
+}
- interface Wrapper {
- readonly client: Client;
- readonly sernEmitter?: SernEmitter;
- readonly defaultPrefix?: string;
- readonly commands: string;
- readonly events?:
- | string
- | { mod: EventModule; absPath: string }[]
- | (() => { mod: EventModule; absPath: string }[]);
-}
```
```diff
+ DefaultLogger
+ DefaultModuleManager
+ SernEmitter
+ DefaultErrorHandling
+ type Singleton<T> = () => T
+ type Transient<T> = () => () => T;
+ type LogPayload<T = unknown> = { message: T }
+ export const single = <T>() => T
+ export const many = <T>() => () => T
```
Including the previous section, some names to symbols and data structures were altered to
be better represented. view [changelog](/404.html)
## Context refactoring
The context data structure has been internally altered to represent its dynamics better.

View File

@@ -0,0 +1,31 @@
---
slug: 2.5.0
title: Release 2.5.0
authors: [jacoobes]
tags: [release]
---
## 2.5 Release
### Join our [discord](https://sern.dev/discord) <br />
- Thank you for using sern in your projects. It's only going to get better!
- I apologize for the sudden small breaking change. After this update, there won't be any for a while.
Wow! We're increasing our semantic versioning by `+0.3.9` <br />
What does this mean?
### Breaking changes
- [controller](../docs/api/modules#controller) parameter for plugins has been removed
- You'll need to import it instead
- This **breaks** old [CommandPlugin](../docs/api/interfaces/CommandPlugin), but **not** old [EventPlugin](../docs/api/interfaces/EventPlugin)
### Deprecations
- [CommandPlugin](../docs/api/interfaces/CommandPlugin) and [EventPlugin](../docs/api/interfaces/EventPlugin) have been renamed [InitPlugin](../docs/api/interfaces/InitPlugin) and [ControlPlugin](../docs/api/interfaces/ControlPlugin)
### Reason
- The naming of plugins was getting too complex. For example, plugin naming evolved into CommandModuleCommandPlugin, CommandModuleEventPlugin and more.
- I realize that this affects all plugins. I have updated all [plugins](https://github.com/sern-handler/awesome-plugins/pull/68) to match these changes
- The old way of declaring plugins has been deprecated in favor of newer functions that facilitate and ease typings
- [CommandControlPlugin](../docs/api/modules#commandcontrolplugin)
- [CommandInitPlugin](../docs/api/modules#commandinitplugin)
- [EventControlPlugin](../docs/api/modules#eventcontrolplugin)
- [EventInitPlugin](../docs/api/modules#eventinitplugin)
- [DiscordEventControlPlugin](../docs/api/modules#discordeventcontrolplugin)
This will probably be the last breaking change in a while. Thanks for using sern!

View File

@@ -0,0 +1,102 @@
---
slug: 3.0.0
title: Release 3.0.0
authors: [jacoobes]
tags: [release]
---
## 3.0 Release
### Join our [discord](https://sern.dev/discord) <br />
### Features
#### Dependency Management
- `Service` API (recommended to use this over useContainer hooks)
- Dependencies type must be globally augmented in order for Services api to function properly
- new methods on ModuleManager
- getPublishableCommands()
- Init Hooks
- implement starting behavior for dependencies
- To enforce and type check this, use the `Initializable` type when making your Dependencies type!
- Emitter interface
- More generic interface to define any event emitter
- You can now swap out the SernEmitter with whatever emitter now.
```ts
class DatabaseService implements Init {
//some hypothetical database
_pgsql : database()
async init() {
await _pgsql.load()
}
}
await makeDependencies({
build: root => root.add({
db: new DatabaseService() //will be init'ed automatically
})
})
```
- new SernEmitter event `modulesLoaded` , which allows users to customize behavior after all modules are loaded!
```ts
export default eventModule({
name: 'modulesLoaded',
type: EventType.Sern,
execute: () => {
console.log('All modules loaded')
}
})
```
#### Quality of Life
- faster module loading
- I utilize async generators for reading files now. A lot faster than the first iteration.
- better error handling
- Less boilerplate
- Services api cleans up v2 boilerplate
- class modules devex got upgraded and work better than before
- automatically ignore any files not ending in (mts, cts, mjs, cjs, ts, js)
- ignore commands and events with `!` prefix on filename or directory (ie: `!filename.ts` or `!directory` will be ignored by sern)
- `Service` API (recommended to use this over useContainer hooks)
- Dependencies type must be globally augmented in order for Services api to function properly
- Less boilerplate
- new methods on ModuleManager
- automatically ignore any files not ending in (mts, cts, mjs, cjs, ts, js)
- ignore commands / events with `!` prefix on filename or directory (ie: `!filename.ts` or `!directory`)
- new SernEmitter event `modulesLoaded` , which allows users to customize behavior after all modules are loaded!
- Init Hooks
- implement starting behavior for dependencies
### Experimental
- Experimental things may be subject to removal, need feedback and are not guaranteed stable
- dev / prod mode
- sern will behave differently depending on mode set
- init sern from `file` option
- reads from local sern.config.json
```js
Sern.init('file');
```
### Breaking changes
- Sern.makeDependencies -> makeDependencies
- it is asynchronous and top level function now. Make sure to await it before initing for proper synchronization.
- module store and manager internally changed, so those using them may recieve breaking changes
- BaseOptions type removed
```diff
- Sern.makeDependencies({ build: () => {} })
+ await makeDependencies({ build: () => {} })
```
### Deprecations
- Removed all previous marked deprecations in v3
- ModuleStore will be removed as a dependency in v4. The only way to access modules should be through ModuleManager
- Default Dependencies will be made internal in the v4. Users should only have access to its interface / contract

View File

@@ -0,0 +1,34 @@
---
slug: newlogo
title: New logo!
authors: [sern]
tags: [branding]
---
Hey everyone! Today we have very special news for you all: We're changing our logo!
# Why?
You see, on today's standards, having a simple logo is essential. Our logo aligns perfectly with these design principles but it can always be improved.
We were chilling, you know, cooking sern handler v3, sern gui, `npm create @sern/bot` and serncord when we thought about changing the logo to a sleek design with less colors.
And here we are!
# Who did our new branding?
[Ropox](https://github.com/Murtatrxx)!
Bro's the GOAT. This website is maintained by him, the domain costs are funded by him and also he started brainstorming how the logo would be on paper:
![](/blog/newlogo/paperprototypes.jpg)
And there it all clicked:
![](/blog/newlogo/paperlogo.png)
seren tried by the way!
![](/blog/newlogo/serentried.png)
# Anyways, here it is:
![](/img/logo.png)
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 ❤️

19
blog/authors.yml Normal file
View File

@@ -0,0 +1,19 @@
jacoobes:
name: jacoobes
title: Head Dev
url: https://github.com/jacoobes
image_url: https://github.com/jacoobes.png
Sr Izan:
name: Sr Izan
title: Developer
url: https://github.com/SrIzan10
image_url: https://github.com/SrIzan10.png
sern:
name: sern Team
url: https://github.com/sern-handler
image_url: https://github.com/sernbot.png
Murtatrxx:
name: Murtatrxx
title: Developer
url: https://github.com/Murtatrxx
image_url: https://github.com/Murtatrxx.png

1
docs/api/_category_.yml Normal file
View File

@@ -0,0 +1 @@
label: "API"

View File

@@ -0,0 +1,93 @@
---
id: "CommandExecutable"
title: "Class: CommandExecutable<Type>"
sidebar_label: "CommandExecutable"
sidebar_position: 0
custom_edit_url: null
---
**`Experimental`**
Will be refactored / changed in future
## Type parameters
| Name | Type |
| :------ | :------ |
| `Type` | extends [`CommandType`](../enums/CommandType.md) = [`CommandType`](../enums/CommandType.md) |
## Constructors
### constructor
**new CommandExecutable**<`Type`\>()
#### Type parameters
| Name | Type |
| :------ | :------ |
| `Type` | extends [`CommandType`](../enums/CommandType.md) = [`CommandType`](../enums/CommandType.md) |
## Properties
### plugins
**plugins**: [`AnyCommandPlugin`](../modules.md#anycommandplugin)[] = `[]`
#### Defined in
[src/core/modules.ts:79](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L79)
___
### type
`Abstract` **type**: `Type`
#### Defined in
[src/core/modules.ts:78](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L78)
___
### \_instance
`Static` `Private` **\_instance**: [`CommandModule`](../modules.md#commandmodule)
#### Defined in
[src/core/modules.ts:80](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L80)
## Methods
### execute
`Abstract` **execute**(`...args`): `unknown`
#### Parameters
| Name | Type |
| :------ | :------ |
| `...args` | `CommandArgs`<`Type`, [`Control`](../enums/PluginType.md#control)\> |
#### Returns
`unknown`
#### Defined in
[src/core/modules.ts:91](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L91)
___
### getInstance
`Static` **getInstance**(): [`CommandModule`](../modules.md#commandmodule)
#### Returns
[`CommandModule`](../modules.md#commandmodule)
#### Defined in
[src/core/modules.ts:82](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L82)

316
docs/api/classes/Context.md Normal file
View File

@@ -0,0 +1,316 @@
---
id: "Context"
title: "Class: Context"
sidebar_label: "Context"
sidebar_position: 0
custom_edit_url: null
---
**`Since`**
1.0.0
Provides values shared between
Message and ChatInputCommandInteraction
## Hierarchy
- `CoreContext`<`Message`, `ChatInputCommandInteraction`\>
**`Context`**
## Constructors
### constructor
`Protected` **new Context**(`ctx`)
#### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `Result`<`Message`<`boolean`\>, `ChatInputCommandInteraction`<`CacheType`\>\> |
#### Overrides
CoreContext&lt;Message, ChatInputCommandInteraction\&gt;.constructor
#### Defined in
[src/core/structures/context.ts:29](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L29)
## Properties
### ctx
`Protected` **ctx**: `Result`<`Message`<`boolean`\>, `ChatInputCommandInteraction`<`CacheType`\>\>
#### Inherited from
CoreContext.ctx
#### Defined in
[src/core/structures/context.ts:29](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L29)
## Accessors
### channel
`get` **channel**(): ``null`` \| `TextBasedChannel`
#### Returns
``null`` \| `TextBasedChannel`
#### Defined in
[src/core/structures/context.ts:37](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L37)
___
### client
• `get` **client**(): `Client`<`boolean`\>
#### Returns
`Client`<`boolean`\>
#### Defined in
[src/core/structures/context.ts:66](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L66)
___
### createdTimestamp
• `get` **createdTimestamp**(): `number`
#### Returns
`number`
#### Defined in
[src/core/structures/context.ts:48](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L48)
___
### guild
• `get` **guild**(): ``null`` \| `Guild`
#### Returns
``null`` \| `Guild`
#### Defined in
[src/core/structures/context.ts:52](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L52)
___
### guildId
• `get` **guildId**(): ``null`` \| `string`
#### Returns
``null`` \| `string`
#### Defined in
[src/core/structures/context.ts:56](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L56)
___
### id
• `get` **id**(): `string`
#### Returns
`string`
#### Defined in
[src/core/structures/context.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L33)
___
### inGuild
• `get` **inGuild**(): `boolean`
#### Returns
`boolean`
#### Defined in
[src/core/structures/context.ts:70](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L70)
___
### interaction
• `get` **interaction**(): `I`
#### Returns
`I`
#### Inherited from
CoreContext.interaction
#### Defined in
[src/core/structures/core-context.ts:15](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/core-context.ts#L15)
___
### member
• `get` **member**(): ``null`` \| `GuildMember` \| `APIInteractionGuildMember`
#### Returns
``null`` \| `GuildMember` \| `APIInteractionGuildMember`
#### Defined in
[src/core/structures/context.ts:62](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L62)
___
### message
• `get` **message**(): `M`
#### Returns
`M`
#### Inherited from
CoreContext.message
#### Defined in
[src/core/structures/core-context.ts:12](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/core-context.ts#L12)
___
### options
• `get` **options**(): `Omit`<`CommandInteractionOptionResolver`<`CacheType`\>, ``"getMessage"`` \| ``"getFocused"``\>
#### Returns
`Omit`<`CommandInteractionOptionResolver`<`CacheType`\>, ``"getMessage"`` \| ``"getFocused"``\>
#### Overrides
CoreContext.options
#### Defined in
[src/core/structures/context.ts:26](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L26)
___
### user
• `get` **user**(): `User`
If context is holding a message, message.author
else, interaction.user
#### Returns
`User`
#### Defined in
[src/core/structures/context.ts:44](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L44)
## Methods
### isMessage
▸ **isMessage**(): this is CoreContext<Message<boolean\>, never\>
#### Returns
this is CoreContext<Message<boolean\>, never\>
#### Inherited from
CoreContext.isMessage
#### Defined in
[src/core/structures/core-context.ts:19](https://github.com/sern-handler/handler/blob/81cdde2/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
#### Defined in
[src/core/structures/core-context.ts:23](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/core-context.ts#L23)
___
### reply
▸ **reply**(`content`): `Promise`<`Message`<`boolean`\>\>
#### Parameters
| Name | Type |
| :------ | :------ |
| `content` | `ReplyOptions` |
#### Returns
`Promise`<`Message`<`boolean`\>\>
#### Defined in
[src/core/structures/context.ts:74](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L74)
___
### wrap
▸ `Static` **wrap**(`wrappable`): [`Context`](Context.md)
#### Parameters
| Name | Type |
| :------ | :------ |
| `wrappable` | `Message`<`boolean`\> \| `BaseInteraction`<`CacheType`\> |
#### Returns
[`Context`](Context.md)
#### Overrides
CoreContext.wrap
#### Defined in
[src/core/structures/context.ts:84](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/context.ts#L84)

View File

@@ -0,0 +1,93 @@
---
id: "DefaultErrorHandling"
title: "Class: DefaultErrorHandling"
sidebar_label: "DefaultErrorHandling"
sidebar_position: 0
custom_edit_url: null
---
**`Since`**
2.0.0
Version 4.0.0 will internalize this api. Please refrain from using ModuleStore!
## Implements
- [`ErrorHandling`](../interfaces/ErrorHandling.md)
## Constructors
### constructor
**new DefaultErrorHandling**()
## Properties
### keepAlive
**keepAlive**: `number` = `5`
Number of times the process should throw an error until crashing and exiting
#### Implementation of
[ErrorHandling](../interfaces/ErrorHandling.md).[keepAlive](../interfaces/ErrorHandling.md#keepalive)
#### Defined in
[src/core/structures/services/error-handling.ts:13](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/error-handling.ts#L13)
## Methods
### crash
**crash**(`err`): `never`
**`Deprecated`**
Version 4 will remove this method
#### Parameters
| Name | Type |
| :------ | :------ |
| `err` | `Error` |
#### Returns
`never`
#### Implementation of
[ErrorHandling](../interfaces/ErrorHandling.md).[crash](../interfaces/ErrorHandling.md#crash)
#### Defined in
[src/core/structures/services/error-handling.ts:9](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/error-handling.ts#L9)
___
### updateAlive
**updateAlive**(`err`): `void`
A function that is called on every crash. Updates keepAlive.
If keepAlive is 0, the process crashes.
#### Parameters
| Name | Type |
| :------ | :------ |
| `err` | `Error` |
#### Returns
`void`
#### Implementation of
[ErrorHandling](../interfaces/ErrorHandling.md).[updateAlive](../interfaces/ErrorHandling.md#updatealive)
#### Defined in
[src/core/structures/services/error-handling.ts:15](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/error-handling.ts#L15)

View File

@@ -0,0 +1,132 @@
---
id: "DefaultLogging"
title: "Class: DefaultLogging"
sidebar_label: "DefaultLogging"
sidebar_position: 0
custom_edit_url: null
---
**`Since`**
2.0.0
Version 4.0.0 will internalize this api. Please refrain from using ModuleStore!
## Implements
- [`Logging`](../interfaces/Logging.md)
## Constructors
### constructor
**new DefaultLogging**()
## Methods
### date
`Private` **date**(): `Date`
#### Returns
`Date`
#### Defined in
[src/core/structures/services/logger.ts:9](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/logger.ts#L9)
___
### debug
**debug**(`payload`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`LogPayload`](../modules.md#logpayload) |
#### Returns
`void`
#### Implementation of
[Logging](../interfaces/Logging.md).[debug](../interfaces/Logging.md#debug)
#### Defined in
[src/core/structures/services/logger.ts:10](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/logger.ts#L10)
___
### error
**error**(`payload`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`LogPayload`](../modules.md#logpayload) |
#### Returns
`void`
#### Implementation of
[Logging](../interfaces/Logging.md).[error](../interfaces/Logging.md#error)
#### Defined in
[src/core/structures/services/logger.ts:14](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/logger.ts#L14)
___
### info
**info**(`payload`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`LogPayload`](../modules.md#logpayload) |
#### Returns
`void`
#### Implementation of
[Logging](../interfaces/Logging.md).[info](../interfaces/Logging.md#info)
#### Defined in
[src/core/structures/services/logger.ts:18](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/logger.ts#L18)
___
### warning
**warning**(`payload`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`LogPayload`](../modules.md#logpayload) |
#### Returns
`void`
#### Implementation of
[Logging](../interfaces/Logging.md).[warning](../interfaces/Logging.md#warning)
#### Defined in
[src/core/structures/services/logger.ts:22](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/logger.ts#L22)

View File

@@ -0,0 +1,189 @@
---
id: "DefaultModuleManager"
title: "Class: DefaultModuleManager"
sidebar_label: "DefaultModuleManager"
sidebar_position: 0
custom_edit_url: null
---
**`Since`**
2.0.0
Version 4.0.0 will internalize this api. Please refrain from using DefaultModuleManager!
## Implements
- [`ModuleManager`](../interfaces/ModuleManager.md)
## Constructors
### constructor
**new DefaultModuleManager**(`moduleStore`)
#### Parameters
| Name | Type |
| :------ | :------ |
| `moduleStore` | [`CoreModuleStore`](../interfaces/CoreModuleStore.md) |
#### Defined in
[src/core/structures/services/module-manager.ts:12](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/module-manager.ts#L12)
## Properties
### moduleStore
`Private` **moduleStore**: [`CoreModuleStore`](../interfaces/CoreModuleStore.md)
#### Defined in
[src/core/structures/services/module-manager.ts:12](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/module-manager.ts#L12)
## Methods
### get
**get**(`id`): `undefined` \| `string`
#### Parameters
| Name | Type |
| :------ | :------ |
| `id` | `string` |
#### Returns
`undefined` \| `string`
#### Implementation of
[ModuleManager](../interfaces/ModuleManager.md).[get](../interfaces/ModuleManager.md#get)
#### Defined in
[src/core/structures/services/module-manager.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/module-manager.ts#L34)
___
### getByNameCommandType
**getByNameCommandType**<`T`\>(`name`, `commandType`): `undefined` \| `Promise`<[`CommandModuleDefs`](../interfaces/CommandModuleDefs.md)[`T`]\>
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends [`CommandType`](../enums/CommandType.md) |
#### Parameters
| Name | Type |
| :------ | :------ |
| `name` | `string` |
| `commandType` | `T` |
#### Returns
`undefined` \| `Promise`<[`CommandModuleDefs`](../interfaces/CommandModuleDefs.md)[`T`]\>
#### Implementation of
[ModuleManager](../interfaces/ModuleManager.md).[getByNameCommandType](../interfaces/ModuleManager.md#getbynamecommandtype)
#### Defined in
[src/core/structures/services/module-manager.ts:14](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/module-manager.ts#L14)
___
### getMetadata
**getMetadata**(`m`): `CommandMeta`
#### Parameters
| Name | Type |
| :------ | :------ |
| `m` | `Module` |
#### Returns
`CommandMeta`
#### Implementation of
[ModuleManager](../interfaces/ModuleManager.md).[getMetadata](../interfaces/ModuleManager.md#getmetadata)
#### Defined in
[src/core/structures/services/module-manager.ts:26](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/module-manager.ts#L26)
___
### getPublishableCommands
**getPublishableCommands**(): `Promise`<[`CommandModule`](../modules.md#commandmodule)[]\>
#### Returns
`Promise`<[`CommandModule`](../modules.md#commandmodule)[]\>
#### Implementation of
[ModuleManager](../interfaces/ModuleManager.md).[getPublishableCommands](../interfaces/ModuleManager.md#getpublishablecommands)
#### Defined in
[src/core/structures/services/module-manager.ts:41](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/module-manager.ts#L41)
___
### set
**set**(`id`, `path`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `id` | `string` |
| `path` | `string` |
#### Returns
`void`
#### Implementation of
[ModuleManager](../interfaces/ModuleManager.md).[set](../interfaces/ModuleManager.md#set)
#### Defined in
[src/core/structures/services/module-manager.ts:37](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/module-manager.ts#L37)
___
### setMetadata
**setMetadata**(`m`, `c`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `m` | `Module` |
| `c` | `CommandMeta` |
#### Returns
`void`
#### Implementation of
[ModuleManager](../interfaces/ModuleManager.md).[setMetadata](../interfaces/ModuleManager.md#setmetadata)
#### Defined in
[src/core/structures/services/module-manager.ts:22](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/services/module-manager.ts#L22)

View File

@@ -0,0 +1,93 @@
---
id: "EventExecutable"
title: "Class: EventExecutable<Type>"
sidebar_label: "EventExecutable"
sidebar_position: 0
custom_edit_url: null
---
**`Experimental`**
Will be refactored in future
## Type parameters
| Name | Type |
| :------ | :------ |
| `Type` | extends [`EventType`](../enums/EventType.md) |
## Constructors
### constructor
**new EventExecutable**<`Type`\>()
#### Type parameters
| Name | Type |
| :------ | :------ |
| `Type` | extends [`EventType`](../enums/EventType.md) |
## Properties
### plugins
**plugins**: [`AnyEventPlugin`](../modules.md#anyeventplugin)[] = `[]`
#### Defined in
[src/core/modules.ts:100](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L100)
___
### type
`Abstract` **type**: `Type`
#### Defined in
[src/core/modules.ts:99](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L99)
___
### \_instance
`Static` `Private` **\_instance**: [`EventModule`](../modules.md#eventmodule)
#### Defined in
[src/core/modules.ts:102](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L102)
## Methods
### execute
`Abstract` **execute**(`...args`): `unknown`
#### Parameters
| Name | Type |
| :------ | :------ |
| `...args` | `EventArgs`<`Type`, [`Control`](../enums/PluginType.md#control)\> |
#### Returns
`unknown`
#### Defined in
[src/core/modules.ts:111](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L111)
___
### getInstance
`Static` **getInstance**(): [`EventModule`](../modules.md#eventmodule)
#### Returns
[`EventModule`](../modules.md#eventmodule)
#### Defined in
[src/core/modules.ts:103](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L103)

View File

@@ -0,0 +1,47 @@
---
id: "ModuleStore"
title: "Class: ModuleStore"
sidebar_label: "ModuleStore"
sidebar_position: 0
custom_edit_url: null
---
Represents a core module store that stores IDs mapped to file paths.
## Implements
- [`CoreModuleStore`](../interfaces/CoreModuleStore.md)
## Constructors
### constructor
**new ModuleStore**()
## Properties
### commands
**commands**: `Map`<`string`, `string`\>
#### Implementation of
[CoreModuleStore](../interfaces/CoreModuleStore.md).[commands](../interfaces/CoreModuleStore.md#commands)
#### Defined in
[src/core/structures/module-store.ts:11](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/module-store.ts#L11)
___
### metadata
**metadata**: `WeakMap`<`Module`, `CommandMeta`\>
#### Implementation of
[CoreModuleStore](../interfaces/CoreModuleStore.md).[metadata](../interfaces/CoreModuleStore.md#metadata)
#### Defined in
[src/core/structures/module-store.ts:10](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/module-store.ts#L10)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
label: "Classes"
position: 3

View File

@@ -0,0 +1,145 @@
---
id: "CommandType"
title: "Enumeration: CommandType"
sidebar_label: "CommandType"
sidebar_position: 0
custom_edit_url: null
---
**`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``
#### Defined in
[src/core/structures/enums.ts:20](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L20)
___
### Button
• **Button** = ``16``
#### Defined in
[src/core/structures/enums.ts:23](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L23)
___
### ChannelSelect
• **ChannelSelect** = ``1024``
#### Defined in
[src/core/structures/enums.ts:29](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L29)
___
### CtxMsg
• **CtxMsg** = ``8``
#### Defined in
[src/core/structures/enums.ts:22](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L22)
___
### CtxUser
• **CtxUser** = ``4``
#### Defined in
[src/core/structures/enums.ts:21](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L21)
___
### MentionableSelect
• **MentionableSelect** = ``512``
#### Defined in
[src/core/structures/enums.ts:28](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L28)
___
### Modal
• **Modal** = ``64``
#### Defined in
[src/core/structures/enums.ts:25](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L25)
___
### RoleSelect
• **RoleSelect** = ``256``
#### Defined in
[src/core/structures/enums.ts:27](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L27)
___
### Slash
• **Slash** = ``2``
#### Defined in
[src/core/structures/enums.ts:19](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L19)
___
### StringSelect
• **StringSelect** = ``32``
#### Defined in
[src/core/structures/enums.ts:24](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L24)
___
### Text
• **Text** = ``1``
#### Defined in
[src/core/structures/enums.ts:18](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L18)
___
### UserSelect
• **UserSelect** = ``128``
#### Defined in
[src/core/structures/enums.ts:26](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L26)

View File

@@ -0,0 +1,59 @@
---
id: "EventType"
title: "Enumeration: EventType"
sidebar_label: "EventType"
sidebar_position: 0
custom_edit_url: null
---
A bitfield that discriminates event modules
**`Example`**
```ts
export default eventModule({
//highlight-next-line
type : EventType.Discord,
name : 'guildMemberAdd'
execute(member : GuildMember) {
console.log(member)
}
})
```
## Enumeration Members
### Discord
**Discord** = ``1``
The EventType for handling discord events
#### Defined in
[src/core/structures/enums.ts:51](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L51)
___
### External
• **External** = ``3``
The EventType for handling external events.
Could be for example, `process` events, database events
#### Defined in
[src/core/structures/enums.ts:60](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L60)
___
### Sern
• **Sern** = ``2``
The EventType for handling sern events
#### Defined in
[src/core/structures/enums.ts:55](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L55)

View File

@@ -0,0 +1,43 @@
---
id: "PayloadType"
title: "Enumeration: PayloadType"
sidebar_label: "PayloadType"
sidebar_position: 0
custom_edit_url: null
---
## Enumeration Members
### Failure
**Failure** = ``"failure"``
The PayloadType for a SernEmitter failure event
#### Defined in
[src/core/structures/enums.ts:98](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L98)
___
### Success
• **Success** = ``"success"``
The PayloadType for a SernEmitter success event
#### Defined in
[src/core/structures/enums.ts:94](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L94)
___
### Warning
• **Warning** = ``"warning"``
The PayloadType for a SernEmitter warning event
#### Defined in
[src/core/structures/enums.ts:102](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L102)

View File

@@ -0,0 +1,45 @@
---
id: "PluginType"
title: "Enumeration: PluginType"
sidebar_label: "PluginType"
sidebar_position: 0
custom_edit_url: null
---
A bitfield that discriminates plugins
**`Example`**
```ts
export default function myPlugin() : EventPlugin<CommandType.Text> {
//highlight-next-line
type : PluginType.Event,
execute([ctx, args], controller) {
return controller.next();
}
}
```
## Enumeration Members
### Control
**Control** = ``2``
The PluginType for EventPlugins
#### Defined in
[src/core/structures/enums.ts:85](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L85)
___
### Init
• **Init** = ``1``
The PluginType for InitPlugins
#### Defined in
[src/core/structures/enums.ts:81](https://github.com/sern-handler/handler/blob/81cdde2/src/core/structures/enums.ts#L81)

104
docs/api/enums/SernError.md Normal file
View File

@@ -0,0 +1,104 @@
---
id: "SernError"
title: "Enumeration: SernError"
sidebar_label: "SernError"
sidebar_position: 0
custom_edit_url: null
---
## Enumeration Members
### InvalidModuleType
**InvalidModuleType** = ``"Detected an unknown module type"``
Throws when registering an invalid module.
This means it is undefined or an invalid command type was provided
#### Defined in
[src/handler/structures/errors.ts:9](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/structures/errors.ts#L9)
___
### MismatchEvent
• **MismatchEvent** = ``"You cannot use message when an interaction fired or vice versa"``
A crash that occurs when accessing an invalid property of Context
#### Defined in
[src/handler/structures/errors.ts:29](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/structures/errors.ts#L29)
___
### MismatchModule
• **MismatchModule** = ``"A module type mismatched with event emitted!"``
Attempted to lookup module in command module store. Nothing was found!
#### Defined in
[src/handler/structures/errors.ts:17](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/structures/errors.ts#L17)
___
### MissingRequired
• **MissingRequired** = ``"@sern/client is required but was not found"``
Required Dependency not found
#### Defined in
[src/handler/structures/errors.ts:37](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/structures/errors.ts#L37)
___
### NotSupportedInteraction
• **NotSupportedInteraction** = ``"This interaction is not supported."``
Unsupported interaction at this moment.
#### Defined in
[src/handler/structures/errors.ts:21](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/structures/errors.ts#L21)
___
### NotSupportedYet
• **NotSupportedYet** = ``"This feature is not supported yet"``
Unsupported feature attempted to access at this time
#### Defined in
[src/handler/structures/errors.ts:33](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/structures/errors.ts#L33)
___
### PluginFailure
• **PluginFailure** = ``"A plugin failed to call controller.next()"``
One plugin called `controller.stop()` (end command execution / loading)
#### Defined in
[src/handler/structures/errors.ts:25](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/structures/errors.ts#L25)
___
### UndefinedModule
• **UndefinedModule** = ``"A module could not be detected"``
Attempted to lookup module in command module store. Nothing was found!
#### Defined in
[src/handler/structures/errors.ts:13](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/structures/errors.ts#L13)

View File

@@ -0,0 +1,2 @@
label: "Enumerations"
position: 2

137
docs/api/index.md Normal file
View File

@@ -0,0 +1,137 @@
---
id: "index"
title: "@sern/handler"
sidebar_label: "Readme"
sidebar_position: 0
custom_edit_url: null
---
<div align="center">
<img src="https://raw.githubusercontent.com/sern-handler/.github/main/banner.png" width="900px" />
</div>
<h1 align="center">Handlers. Redefined.</h1>
<h4 align="center">A complete, customizable, typesafe, & reactive framework for discord bots</h4>
<div align="center" styles="margin-top: 10px">
<img src="https://img.shields.io/badge/open-source-brightgreen" />
<a href="https://www.npmjs.com/package/@sern/handler"><img src="https://img.shields.io/npm/v/@sern/handler?maxAge=3600" alt="NPM version" /></a>
<a href="https://www.npmjs.com/package/@sern/handler"><img src="https://img.shields.io/npm/dt/@sern/handler?maxAge=3600" alt="NPM downloads" /></a>
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-brightgreen" alt="License MIT" /></a>
<a href="https://sern.dev"><img alt="docs.rs" src="https://img.shields.io/docsrs/docs" /></a>
<img alt="Lines of code" src="https://img.shields.io/badge/total%20lines-2k-blue" />
</div>
## Why?
- For you. A framework that's tailored to your exact needs.
- Lightweight. Does a lot while being small.
- Latest features. Support for discord.js v14 and all of its interactions.
- Hybrid, customizable and composable commands. Create them just how you like.
- Start quickly. Plug and play or customize to your liking.
- Embraces reactive programming. For consistent and reliable backend.
- Switch and customize how errors are handled, logging, and more.
- Use it with TypeScript or JavaScript. CommonJS and ESM supported.
- Active and growing community, always here to help. [Join us](https://sern.dev/discord)
- Unleash its full potential with a powerful CLI and awesome plugins.
## 📜 Installation
```sh
npm install @sern/handler
```
```sh
yarn add @sern/handler
```
```sh
pnpm add @sern/handler
```
## 👶 Basic Usage
<details open><summary>ping.ts</summary>
```ts
export default commandModule({
type: CommandType.Slash,
//Installed plugin to publish to discord api and allow access to owners only.
plugins: [publish(), ownerOnly()],
description: 'A ping pong command',
execute(ctx) {
ctx.reply('Hello owner of the bot');
}
});
```
</details>
<details open><summary>modal.ts</summary>
```ts
export default commandModule({
type: CommandType.Modal,
//Installed a plugin to make sure modal fields pass a validation.
plugins : [
assertFields({
fields: {
name: /^([^0-9]*)$/
},
failure: (errors, modal) => modal.reply('your submission did not pass the validations')
})
],
execute : (modal) => {
modal.reply('thanks for the submission!');
}
})
```
</details>
<details open><summary>index.ts</summary>
```ts
import { Client, GatewayIntentBits } from 'discord.js';
import { Sern, single, type Dependencies } from '@sern/handler';
//client has been declared previously
interface MyDependencies extends Dependencies {
'@sern/client': Singleton<Client>;
}
export const useContainer = Sern.makeDependencies<MyDependencies>({
build: root => root
.add({ '@sern/client': single(() => client) })
});
//View docs for all options
Sern.init({
defaultPrefix: '!', // removing defaultPrefix will shut down text commands
commands: 'src/commands',
// events: 'src/events' (optional),
containerConfig : {
get: useContainer
}
});
client.login("YOUR_BOT_TOKEN_HERE");
```
</details>
## 🤖 Bots Using sern
- [Community Bot](https://github.com/sern-handler/sern-community), the community bot for our [discord server](https://sern.dev/discord).
- [Vinci](https://github.com/SrIzan10/vinci), the bot for Mara Turing.
- [Bask](https://github.com/baskbotml/bask), Listen your favorite artists on Discord.
- [ava](https://github.com/SrIzan10/ava), A discord bot that plays KNGI and Gensokyo Radio.
- [Murayama](https://github.com/murayamabot/murayama), :pepega:
- [Protector (WIP)](https://github.com/needhamgary/Protector), Just a simple bot to help enhance a private minecraft server.
- [SmokinWeed 💨](https://github.com/Peter-MJ-Parker/sern-bud), A fun bot for a small - but growing - server.
## 💻 CLI
It is **highly encouraged** to use the [command line interface](https://github.com/sern-handler/cli) for your project. Don't forget to view it.
## 🔗 Links
- [Official Documentation and Guide](https://sern.dev)
- [Support Server](https://sern.dev/discord)
## 👋 Contribute
- Read our contribution [guidelines](https://github.com/sern-handler/handler/blob/main/.github/CONTRIBUTING.md) carefully
- Pull up on [issues](https://github.com/sern-handler/handler/issues) and report bugs
- All kinds of contributions are welcomed.

View File

@@ -0,0 +1,55 @@
---
id: "AutocompleteCommand"
title: "Interface: AutocompleteCommand"
sidebar_label: "AutocompleteCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `Omit`<[`Module`](Module.md), ``"name"`` \| ``"type"`` \| ``"plugins"`` \| ``"description"``\>
**`AutocompleteCommand`**
## Properties
### execute
**execute**: (`ctx`: `AutocompleteInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `AutocompleteInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
Omit.execute
#### Defined in
[src/types/module.ts:111](https://github.com/sern-handler/handler/blob/c1f6906/src/types/module.ts#L111)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Overrides
Omit.onEvent
#### Defined in
[src/types/module.ts:110](https://github.com/sern-handler/handler/blob/c1f6906/src/types/module.ts#L110)

View File

@@ -0,0 +1,88 @@
---
id: "AutocompletePlugin"
title: "Interface: AutocompletePlugin"
sidebar_label: "AutocompletePlugin"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Plugin`](Plugin.md)
**`AutocompletePlugin`**
## Properties
### description
`Optional` **description**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[description](Plugin.md#description)
#### Defined in
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
___
### execute
**execute**: (`autocmp`: `AutocompleteInteraction`<`CacheType`\>, `controlller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
#### Type declaration
▸ (`autocmp`, `controlller`): `Awaitable`<`Result`<`void`, `void`\>\>
##### Parameters
| Name | Type |
| :------ | :------ |
| `autocmp` | `AutocompleteInteraction`<`CacheType`\> |
| `controlller` | [`Controller`](Controller.md) |
##### Returns
`Awaitable`<`Result`<`void`, `void`\>\>
#### Defined in
[src/handler/plugins/plugin.ts:73](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L73)
___
### name
`Optional` **name**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[name](Plugin.md#name)
#### Defined in
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
___
### type
**type**: [`Event`](../enums/PluginType.md#event)
#### Overrides
[Plugin](Plugin.md).[type](Plugin.md#type)
#### Defined in
[src/handler/plugins/plugin.ts:72](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L72)

View File

@@ -0,0 +1,132 @@
---
id: "BothCommand"
title: "Interface: BothCommand"
sidebar_label: "BothCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `Module`
**`BothCommand`**
## Properties
### alias
`Optional` **alias**: `string`[]
#### Defined in
[src/types/core-modules.ts:124](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L124)
___
### description
**description**: `string`
#### Overrides
Module.description
#### Defined in
[src/types/core-modules.ts:125](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L125)
___
### execute
**execute**: (`ctx`: [`Context`](../classes/Context.md), `args`: [`Args`](../modules.md#args)) => `unknown`
#### Type declaration
▸ (`ctx`, `args`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | [`Context`](../classes/Context.md) |
| `args` | [`Args`](../modules.md#args) |
##### Returns
`unknown`
#### Overrides
Module.execute
#### Defined in
[src/types/core-modules.ts:127](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L127)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
___
### options
`Optional` **options**: [`SernOptionsData`](../modules.md#sernoptionsdata)[]
#### Defined in
[src/types/core-modules.ts:126](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L126)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
___
### type
**type**: [`Both`](../enums/CommandType.md#both)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:123](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L123)

View File

@@ -0,0 +1,111 @@
---
id: "ButtonCommand"
title: "Interface: ButtonCommand"
sidebar_label: "ButtonCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `Module`
**`ButtonCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
Module.description
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
___
### execute
**execute**: (`ctx`: `ButtonInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `ButtonInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
Module.execute
#### Defined in
[src/types/core-modules.ts:64](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L64)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
___
### type
**type**: [`Button`](../enums/CommandType.md#button)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:63](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L63)

View File

@@ -0,0 +1,111 @@
---
id: "ChannelSelectCommand"
title: "Interface: ChannelSelectCommand"
sidebar_label: "ChannelSelectCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `Module`
**`ChannelSelectCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
Module.description
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
___
### execute
**execute**: (`ctx`: `ChannelSelectMenuInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `ChannelSelectMenuInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
Module.execute
#### Defined in
[src/types/core-modules.ts:74](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L74)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
___
### type
**type**: [`ChannelSelect`](../enums/CommandType.md#channelselect)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:73](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L73)

View File

@@ -0,0 +1,127 @@
---
id: "CommandModuleDefs"
title: "Interface: CommandModuleDefs"
sidebar_label: "CommandModuleDefs"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### 1
**1**: [`TextCommand`](TextCommand.md)
#### Defined in
[src/types/core-modules.ts:149](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L149)
___
### 1024
**1024**: [`ChannelSelectCommand`](ChannelSelectCommand.md)
#### Defined in
[src/types/core-modules.ts:157](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L157)
___
### 128
**128**: [`UserSelectCommand`](UserSelectCommand.md)
#### Defined in
[src/types/core-modules.ts:159](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L159)
___
### 16
**16**: [`ButtonCommand`](ButtonCommand.md)
#### Defined in
[src/types/core-modules.ts:154](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L154)
___
### 2
**2**: [`SlashCommand`](SlashCommand.md)
#### Defined in
[src/types/core-modules.ts:150](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L150)
___
### 256
**256**: [`RoleSelectCommand`](RoleSelectCommand.md)
#### Defined in
[src/types/core-modules.ts:156](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L156)
___
### 3
**3**: [`BothCommand`](BothCommand.md)
#### Defined in
[src/types/core-modules.ts:151](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L151)
___
### 32
**32**: [`StringSelectCommand`](StringSelectCommand.md)
#### Defined in
[src/types/core-modules.ts:155](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L155)
___
### 4
**4**: [`ContextMenuUser`](ContextMenuUser.md)
#### Defined in
[src/types/core-modules.ts:153](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L153)
___
### 512
**512**: [`MentionableSelectCommand`](MentionableSelectCommand.md)
#### Defined in
[src/types/core-modules.ts:158](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L158)
___
### 64
**64**: [`ModalSubmitCommand`](ModalSubmitCommand.md)
#### Defined in
[src/types/core-modules.ts:160](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L160)
___
### 8
**8**: [`ContextMenuMsg`](ContextMenuMsg.md)
#### Defined in
[src/types/core-modules.ts:152](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L152)

View File

@@ -0,0 +1,72 @@
---
id: "CommandPlugin"
title: "Interface: CommandPlugin<T>"
sidebar_label: "CommandPlugin"
sidebar_position: 0
custom_edit_url: null
---
**`Deprecated`**
Use the newer helper functions and import { controller } from '@sern/handler'
## Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends [`CommandType`](../enums/CommandType.md) = [`CommandType`](../enums/CommandType.md) |
## Properties
### description
`Optional` **description**: `string`
#### Defined in
[src/types/plugin.ts:51](https://github.com/sern-handler/handler/blob/c1f6906/src/types/plugin.ts#L51)
___
### execute
**execute**: (`m`: [`InitArgs`](InitArgs.md)<[`Processed`](../modules.md#processed)<[`CommandModule`](../modules.md#commandmodule)\>\>, `controller?`: [`Deprecated`](../modules.md#deprecated)<``"Please import controller instead"``\>) => [`PluginResult`](../modules.md#pluginresult)
#### Type declaration
▸ (`m`, `controller?`): [`PluginResult`](../modules.md#pluginresult)
##### Parameters
| Name | Type |
| :------ | :------ |
| `m` | [`InitArgs`](InitArgs.md)<[`Processed`](../modules.md#processed)<[`CommandModule`](../modules.md#commandmodule)\>\> |
| `controller?` | [`Deprecated`](../modules.md#deprecated)<``"Please import controller instead"``\> |
##### Returns
[`PluginResult`](../modules.md#pluginresult)
#### Defined in
[src/types/plugin.ts:53](https://github.com/sern-handler/handler/blob/c1f6906/src/types/plugin.ts#L53)
___
### name
• `Optional` **name**: `string`
#### Defined in
[src/types/plugin.ts:50](https://github.com/sern-handler/handler/blob/c1f6906/src/types/plugin.ts#L50)
___
### type
• **type**: [`Init`](../enums/PluginType.md#init)
#### Defined in
[src/types/plugin.ts:52](https://github.com/sern-handler/handler/blob/c1f6906/src/types/plugin.ts#L52)

View File

@@ -0,0 +1,111 @@
---
id: "ContextMenuMsg"
title: "Interface: ContextMenuMsg"
sidebar_label: "ContextMenuMsg"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `Module`
**`ContextMenuMsg`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
Module.description
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
___
### execute
**execute**: (`ctx`: `MessageContextMenuCommandInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `MessageContextMenuCommandInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
Module.execute
#### Defined in
[src/types/core-modules.ts:59](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L59)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
___
### type
**type**: [`CtxMsg`](../enums/CommandType.md#ctxmsg)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:58](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L58)

View File

@@ -0,0 +1,111 @@
---
id: "ContextMenuUser"
title: "Interface: ContextMenuUser"
sidebar_label: "ContextMenuUser"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `Module`
**`ContextMenuUser`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
Module.description
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
___
### execute
**execute**: (`ctx`: `UserContextMenuCommandInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `UserContextMenuCommandInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
Module.execute
#### Defined in
[src/types/core-modules.ts:54](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L54)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
___
### type
**type**: [`CtxUser`](../enums/CommandType.md#ctxuser)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:53](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L53)

View File

@@ -0,0 +1,47 @@
---
id: "ControlPlugin"
title: "Interface: ControlPlugin<Args>"
sidebar_label: "ControlPlugin"
sidebar_position: 0
custom_edit_url: null
---
## Type parameters
| Name | Type |
| :------ | :------ |
| `Args` | extends `any`[] = `any`[] |
## Properties
### execute
**execute**: (...`args`: `Args`) => [`PluginResult`](../modules.md#pluginresult)
#### Type declaration
▸ (`...args`): [`PluginResult`](../modules.md#pluginresult)
##### Parameters
| Name | Type |
| :------ | :------ |
| `...args` | `Args` |
##### Returns
[`PluginResult`](../modules.md#pluginresult)
#### Defined in
[src/types/core-plugin.ts:73](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L73)
___
### type
**type**: [`Control`](../enums/PluginType.md#control)
#### Defined in
[src/types/core-plugin.ts:72](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L72)

View File

@@ -0,0 +1,43 @@
---
id: "Controller"
title: "Interface: Controller"
sidebar_label: "Controller"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### next
**next**: () => `Ok`<`void`\>
#### Type declaration
▸ (): `Ok`<`void`\>
##### Returns
`Ok`<`void`\>
#### Defined in
[src/types/core-plugin.ts:59](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L59)
___
### stop
**stop**: () => `Err`<`void`\>
#### Type declaration
▸ (): `Err`<`void`\>
##### Returns
`Err`<`void`\>
#### Defined in
[src/types/core-plugin.ts:60](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L60)

View File

@@ -0,0 +1,115 @@
---
id: "CoreDependencies"
title: "Interface: CoreDependencies"
sidebar_label: "CoreDependencies"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### @sern/client
**@sern/client**: () => [`Emitter`](Emitter.md)
#### Type declaration
▸ (): [`Emitter`](Emitter.md)
##### Returns
[`Emitter`](Emitter.md)
#### Defined in
[src/types/ioc.ts:28](https://github.com/sern-handler/handler/blob/81cdde2/src/types/ioc.ts#L28)
___
### @sern/emitter
**@sern/emitter**: () => [`Emitter`](Emitter.md)
#### Type declaration
▸ (): [`Emitter`](Emitter.md)
##### Returns
[`Emitter`](Emitter.md)
#### Defined in
[src/types/ioc.ts:30](https://github.com/sern-handler/handler/blob/81cdde2/src/types/ioc.ts#L30)
___
### @sern/errors
**@sern/errors**: () => [`ErrorHandling`](ErrorHandling.md)
#### Type declaration
▸ (): [`ErrorHandling`](ErrorHandling.md)
##### Returns
[`ErrorHandling`](ErrorHandling.md)
#### Defined in
[src/types/ioc.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/ioc.ts#L33)
___
### @sern/logger
`Optional` **@sern/logger**: () => [`Logging`](Logging.md)<`unknown`\>
#### Type declaration
▸ (): [`Logging`](Logging.md)<`unknown`\>
##### Returns
[`Logging`](Logging.md)<`unknown`\>
#### Defined in
[src/types/ioc.ts:29](https://github.com/sern-handler/handler/blob/81cdde2/src/types/ioc.ts#L29)
___
### @sern/modules
**@sern/modules**: () => [`ModuleManager`](ModuleManager.md)
#### Type declaration
▸ (): [`ModuleManager`](ModuleManager.md)
##### Returns
[`ModuleManager`](ModuleManager.md)
#### Defined in
[src/types/ioc.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/ioc.ts#L32)
___
### @sern/store
**@sern/store**: () => [`CoreModuleStore`](CoreModuleStore.md)
#### Type declaration
▸ (): [`CoreModuleStore`](CoreModuleStore.md)
##### Returns
[`CoreModuleStore`](CoreModuleStore.md)
#### Defined in
[src/types/ioc.ts:31](https://github.com/sern-handler/handler/blob/81cdde2/src/types/ioc.ts#L31)

View File

@@ -0,0 +1,33 @@
---
id: "CoreModuleStore"
title: "Interface: CoreModuleStore"
sidebar_label: "CoreModuleStore"
sidebar_position: 0
custom_edit_url: null
---
Represents a core module store that stores IDs mapped to file paths.
## Implemented by
- [`ModuleStore`](../classes/ModuleStore.md)
## Properties
### commands
**commands**: `Map`<`string`, `string`\>
#### Defined in
[src/core/contracts/module-store.ts:7](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/module-store.ts#L7)
___
### metadata
**metadata**: `WeakMap`<`Module`, `CommandMeta`\>
#### Defined in
[src/core/contracts/module-store.ts:8](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/module-store.ts#L8)

View File

@@ -0,0 +1,67 @@
---
id: "Dependencies"
title: "Interface: Dependencies"
sidebar_label: "Dependencies"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### @sern/client
**@sern/client**: [`Singleton`](../modules.md#singleton)<`__module`\>
#### Defined in
[src/types/handler.ts:40](https://github.com/sern-handler/handler/blob/c1f6906/src/types/handler.ts#L40)
___
### @sern/emitter
**@sern/emitter**: [`Singleton`](../modules.md#singleton)<[`SernEmitter`](../classes/SernEmitter.md)\>
#### Defined in
[src/types/handler.ts:42](https://github.com/sern-handler/handler/blob/c1f6906/src/types/handler.ts#L42)
___
### @sern/errors
**@sern/errors**: [`Singleton`](../modules.md#singleton)<[`ErrorHandling`](ErrorHandling.md)\>
#### Defined in
[src/types/handler.ts:45](https://github.com/sern-handler/handler/blob/c1f6906/src/types/handler.ts#L45)
___
### @sern/logger
`Optional` **@sern/logger**: [`Singleton`](../modules.md#singleton)<[`Logging`](Logging.md)<`unknown`\>\>
#### Defined in
[src/types/handler.ts:41](https://github.com/sern-handler/handler/blob/c1f6906/src/types/handler.ts#L41)
___
### @sern/modules
**@sern/modules**: [`Singleton`](../modules.md#singleton)<[`ModuleManager`](ModuleManager.md)\>
#### Defined in
[src/types/handler.ts:44](https://github.com/sern-handler/handler/blob/c1f6906/src/types/handler.ts#L44)
___
### @sern/store
**@sern/store**: [`Singleton`](../modules.md#singleton)<[`ModuleStore`](../classes/ModuleStore.md)\>
#### Defined in
[src/types/handler.ts:43](https://github.com/sern-handler/handler/blob/c1f6906/src/types/handler.ts#L43)

View File

@@ -0,0 +1,47 @@
---
id: "DependencyConfiguration"
title: "Interface: DependencyConfiguration<T>"
sidebar_label: "DependencyConfiguration"
sidebar_position: 0
custom_edit_url: null
---
## Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends [`Dependencies`](Dependencies.md) |
## Properties
### build
**build**: (`root`: `Container`<`Omit`<[`Dependencies`](Dependencies.md), ``"@sern/client"``\>, {}\>) => `Container`<`T`, {}\>
#### Type declaration
▸ (`root`): `Container`<`T`, {}\>
##### Parameters
| Name | Type |
| :------ | :------ |
| `root` | `Container`<`Omit`<[`Dependencies`](Dependencies.md), ``"@sern/client"``\>, {}\> |
##### Returns
`Container`<`T`, {}\>
#### Defined in
[src/types/handler.ts:68](https://github.com/sern-handler/handler/blob/c1f6906/src/types/handler.ts#L68)
___
### exclude
• `Optional` **exclude**: `Set`<``"@sern/logger"``\>
#### Defined in
[src/types/handler.ts:67](https://github.com/sern-handler/handler/blob/c1f6906/src/types/handler.ts#L67)

View File

@@ -0,0 +1,90 @@
---
id: "DiscordEmitterPlugin"
title: "Interface: DiscordEmitterPlugin"
sidebar_label: "DiscordEmitterPlugin"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Plugin`](Plugin.md)
**`DiscordEmitterPlugin`**
## Properties
### description
`Optional` **description**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[description](Plugin.md#description)
#### Defined in
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
___
### execute
**execute**: (`payload`: { `absPath`: `string` ; `mod`: `DiscordEventCommand`<keyof `ClientEvents`\> & { `name`: `string` } }, `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
#### Type declaration
▸ (`payload`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
##### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | `Object` |
| `payload.absPath` | `string` |
| `payload.mod` | `DiscordEventCommand`<keyof `ClientEvents`\> & { `name`: `string` } |
| `controller` | [`Controller`](Controller.md) |
##### Returns
`Awaitable`<`Result`<`void`, `void`\>\>
#### Defined in
[src/handler/plugins/plugin.ts:49](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L49)
___
### name
`Optional` **name**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[name](Plugin.md#name)
#### Defined in
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
___
### type
**type**: [`Command`](../enums/PluginType.md#command)
#### Overrides
[Plugin](Plugin.md).[type](Plugin.md#type)
#### Defined in
[src/handler/plugins/plugin.ts:48](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L48)

View File

@@ -0,0 +1,113 @@
---
id: "DiscordEventCommand"
title: "Interface: DiscordEventCommand<T>"
sidebar_label: "DiscordEventCommand"
sidebar_position: 0
custom_edit_url: null
---
## Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends keyof `ClientEvents` = keyof `ClientEvents` |
## Hierarchy
- `Module`
**`DiscordEventCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
Module.description
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
___
### name
`Optional` **name**: `T`
#### Overrides
Module.name
#### Defined in
[src/types/core-modules.ts:105](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L105)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
___
### type
**type**: [`Discord`](../enums/EventType.md#discord)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:106](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L106)
## Methods
### execute
**execute**(`...args`): `unknown`
#### Parameters
| Name | Type |
| :------ | :------ |
| `...args` | `ClientEvents`[`T`] |
#### Returns
`unknown`
#### Overrides
Module.execute
#### Defined in
[src/types/core-modules.ts:107](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L107)

View File

@@ -0,0 +1,94 @@
---
id: "DiscordEventPlugin"
title: "Interface: DiscordEventPlugin<T>"
sidebar_label: "DiscordEventPlugin"
sidebar_position: 0
custom_edit_url: null
---
## Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends keyof `ClientEvents` = keyof `ClientEvents` |
## Hierarchy
- [`Plugin`](Plugin.md)
**`DiscordEventPlugin`**
## Properties
### description
`Optional` **description**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[description](Plugin.md#description)
#### Defined in
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
___
### execute
**execute**: (`args`: `ClientEvents`[`T`], `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
#### Type declaration
▸ (`args`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
##### Parameters
| Name | Type |
| :------ | :------ |
| `args` | `ClientEvents`[`T`] |
| `controller` | [`Controller`](Controller.md) |
##### Returns
`Awaitable`<`Result`<`void`, `void`\>\>
#### Defined in
[src/handler/plugins/plugin.ts:105](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L105)
___
### name
`Optional` **name**: `T`
**`Deprecated`**
will be removed in the next update
#### Overrides
[Plugin](Plugin.md).[name](Plugin.md#name)
#### Defined in
[src/handler/plugins/plugin.ts:103](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L103)
___
### type
**type**: [`Event`](../enums/PluginType.md#event)
#### Overrides
[Plugin](Plugin.md).[type](Plugin.md#type)
#### Defined in
[src/handler/plugins/plugin.ts:104](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L104)

View File

@@ -0,0 +1,70 @@
---
id: "Emitter"
title: "Interface: Emitter"
sidebar_label: "Emitter"
sidebar_position: 0
custom_edit_url: null
---
## Methods
### addListener
**addListener**(`eventName`, `listener`): [`Emitter`](Emitter.md)
#### Parameters
| Name | Type |
| :------ | :------ |
| `eventName` | `string` \| `symbol` |
| `listener` | `AnyFunction` |
#### Returns
[`Emitter`](Emitter.md)
#### Defined in
[src/core/contracts/emitter.ts:4](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/emitter.ts#L4)
___
### emit
**emit**(`eventName`, `...payload`): `boolean`
#### Parameters
| Name | Type |
| :------ | :------ |
| `eventName` | `string` \| `symbol` |
| `...payload` | `any`[] |
#### Returns
`boolean`
#### Defined in
[src/core/contracts/emitter.ts:6](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/emitter.ts#L6)
___
### removeListener
**removeListener**(`eventName`, `listener`): [`Emitter`](Emitter.md)
#### Parameters
| Name | Type |
| :------ | :------ |
| `eventName` | `string` \| `symbol` |
| `listener` | `AnyFunction` |
#### Returns
[`Emitter`](Emitter.md)
#### Defined in
[src/core/contracts/emitter.ts:5](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/emitter.ts#L5)

View File

@@ -0,0 +1,74 @@
---
id: "ErrorHandling"
title: "Interface: ErrorHandling"
sidebar_label: "ErrorHandling"
sidebar_position: 0
custom_edit_url: null
---
**`Since`**
2.0.0
## Implemented by
- [`DefaultErrorHandling`](../classes/DefaultErrorHandling.md)
## Properties
### keepAlive
**keepAlive**: `number`
Number of times the process should throw an error until crashing and exiting
#### Defined in
[src/core/contracts/error-handling.ts:8](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/error-handling.ts#L8)
## Methods
### crash
**crash**(`err`): `never`
**`Deprecated`**
Version 4 will remove this method
#### Parameters
| Name | Type |
| :------ | :------ |
| `err` | `Error` |
#### Returns
`never`
#### Defined in
[src/core/contracts/error-handling.ts:14](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/error-handling.ts#L14)
___
### updateAlive
**updateAlive**(`error`): `void`
A function that is called on every crash. Updates keepAlive.
If keepAlive is 0, the process crashes.
#### Parameters
| Name | Type |
| :------ | :------ |
| `error` | `Error` |
#### Returns
`void`
#### Defined in
[src/core/contracts/error-handling.ts:20](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/error-handling.ts#L20)

View File

@@ -0,0 +1,37 @@
---
id: "EventModuleDefs"
title: "Interface: EventModuleDefs"
sidebar_label: "EventModuleDefs"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### 1
**1**: [`DiscordEventCommand`](DiscordEventCommand.md)<keyof `ClientEvents`\>
#### Defined in
[src/types/core-modules.ts:165](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L165)
___
### 2
**2**: [`SernEventCommand`](SernEventCommand.md)<keyof [`SernEventsMapping`](SernEventsMapping.md)\>
#### Defined in
[src/types/core-modules.ts:164](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L164)
___
### 3
**3**: [`ExternalEventCommand`](ExternalEventCommand.md)
#### Defined in
[src/types/core-modules.ts:166](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L166)

View File

@@ -0,0 +1,72 @@
---
id: "EventPlugin"
title: "Interface: EventPlugin<T>"
sidebar_label: "EventPlugin"
sidebar_position: 0
custom_edit_url: null
---
**`Deprecated`**
Use the newer helper functions
## Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends [`CommandType`](../enums/CommandType.md) |
## Properties
### description
`Optional` **description**: `string`
#### Defined in
[src/types/plugin.ts:64](https://github.com/sern-handler/handler/blob/c1f6906/src/types/plugin.ts#L64)
___
### execute
**execute**: (`args`: [`CommandArgs`](../modules.md#commandargs)<`T`, [`Event`](../enums/PluginType.md#event)\>, `controller?`: [`Controller`](Controller.md)) => [`PluginResult`](../modules.md#pluginresult)
#### Type declaration
▸ (`args`, `controller?`): [`PluginResult`](../modules.md#pluginresult)
##### Parameters
| Name | Type |
| :------ | :------ |
| `args` | [`CommandArgs`](../modules.md#commandargs)<`T`, [`Event`](../enums/PluginType.md#event)\> |
| `controller?` | [`Controller`](Controller.md) |
##### Returns
[`PluginResult`](../modules.md#pluginresult)
#### Defined in
[src/types/plugin.ts:66](https://github.com/sern-handler/handler/blob/c1f6906/src/types/plugin.ts#L66)
___
### name
`Optional` **name**: `string`
#### Defined in
[src/types/plugin.ts:63](https://github.com/sern-handler/handler/blob/c1f6906/src/types/plugin.ts#L63)
___
### type
**type**: [`Event`](../enums/PluginType.md#event)
#### Defined in
[src/types/plugin.ts:65](https://github.com/sern-handler/handler/blob/c1f6906/src/types/plugin.ts#L65)

View File

@@ -0,0 +1,90 @@
---
id: "ExternalEmitterPlugin"
title: "Interface: ExternalEmitterPlugin"
sidebar_label: "ExternalEmitterPlugin"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Plugin`](Plugin.md)
**`ExternalEmitterPlugin`**
## Properties
### description
`Optional` **description**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[description](Plugin.md#description)
#### Defined in
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
___
### execute
**execute**: (`payload`: { `absPath`: `string` ; `mod`: `ExternalEventCommand` & { `name`: `string` } }, `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
#### Type declaration
▸ (`payload`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
##### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | `Object` |
| `payload.absPath` | `string` |
| `payload.mod` | `ExternalEventCommand` & { `name`: `string` } |
| `controller` | [`Controller`](Controller.md) |
##### Returns
`Awaitable`<`Result`<`void`, `void`\>\>
#### Defined in
[src/handler/plugins/plugin.ts:57](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L57)
___
### name
`Optional` **name**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[name](Plugin.md#name)
#### Defined in
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
___
### type
**type**: [`Command`](../enums/PluginType.md#command)
#### Overrides
[Plugin](Plugin.md).[type](Plugin.md#type)
#### Defined in
[src/handler/plugins/plugin.ts:56](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L56)

View File

@@ -0,0 +1,117 @@
---
id: "ExternalEventCommand"
title: "Interface: ExternalEventCommand"
sidebar_label: "ExternalEventCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `Module`
**`ExternalEventCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
Module.description
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
___
### emitter
**emitter**: keyof `Dependencies`
#### Defined in
[src/types/core-modules.ts:47](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L47)
___
### name
`Optional` **name**: `string`
#### Overrides
Module.name
#### Defined in
[src/types/core-modules.ts:46](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L46)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
___
### type
**type**: [`External`](../enums/EventType.md#external)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:48](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L48)
## Methods
### execute
**execute**(`...args`): `unknown`
#### Parameters
| Name | Type |
| :------ | :------ |
| `...args` | `unknown`[] |
#### Returns
`unknown`
#### Overrides
Module.execute
#### Defined in
[src/types/core-modules.ts:49](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L49)

View File

@@ -0,0 +1,88 @@
---
id: "ExternalEventPlugin"
title: "Interface: ExternalEventPlugin"
sidebar_label: "ExternalEventPlugin"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Plugin`](Plugin.md)
**`ExternalEventPlugin`**
## Properties
### description
`Optional` **description**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[description](Plugin.md#description)
#### Defined in
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
___
### execute
**execute**: (`args`: `unknown`[], `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
#### Type declaration
▸ (`args`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
##### Parameters
| Name | Type |
| :------ | :------ |
| `args` | `unknown`[] |
| `controller` | [`Controller`](Controller.md) |
##### Returns
`Awaitable`<`Result`<`void`, `void`\>\>
#### Defined in
[src/handler/plugins/plugin.ts:99](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L99)
___
### name
`Optional` **name**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[name](Plugin.md#name)
#### Defined in
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
___
### type
**type**: [`Event`](../enums/PluginType.md#event)
#### Overrides
[Plugin](Plugin.md).[type](Plugin.md#type)
#### Defined in
[src/handler/plugins/plugin.ts:98](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L98)

View File

@@ -0,0 +1,24 @@
---
id: "Init"
title: "Interface: Init"
sidebar_label: "Init"
sidebar_position: 0
custom_edit_url: null
---
Represents an initialization contract.
Let dependencies implement this to initiate some logic.
## Methods
### init
**init**(): `unknown`
#### Returns
`unknown`
#### Defined in
[src/core/contracts/init.ts:8](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/init.ts#L8)

View File

@@ -0,0 +1,33 @@
---
id: "InitArgs"
title: "Interface: InitArgs<T>"
sidebar_label: "InitArgs"
sidebar_position: 0
custom_edit_url: null
---
## Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends [`Processed`](../modules.md#processed)<[`Module`](Module.md)\> |
## Properties
### absPath
**absPath**: `string`
#### Defined in
[src/handler/plugins/args.ts:107](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/plugins/args.ts#L107)
___
### module
**module**: `T`
#### Defined in
[src/handler/plugins/args.ts:106](https://github.com/sern-handler/handler/blob/c1f6906/src/handler/plugins/args.ts#L106)

View File

@@ -0,0 +1,47 @@
---
id: "InitPlugin"
title: "Interface: InitPlugin<Args>"
sidebar_label: "InitPlugin"
sidebar_position: 0
custom_edit_url: null
---
## Type parameters
| Name | Type |
| :------ | :------ |
| `Args` | extends `any`[] = `any`[] |
## Properties
### execute
**execute**: (...`args`: `Args`) => [`PluginResult`](../modules.md#pluginresult)
#### Type declaration
▸ (`...args`): [`PluginResult`](../modules.md#pluginresult)
##### Parameters
| Name | Type |
| :------ | :------ |
| `...args` | `Args` |
##### Returns
[`PluginResult`](../modules.md#pluginresult)
#### Defined in
[src/types/core-plugin.ts:69](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L69)
___
### type
**type**: [`Init`](../enums/PluginType.md#init)
#### Defined in
[src/types/core-plugin.ts:68](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L68)

View File

@@ -0,0 +1,101 @@
---
id: "Logging"
title: "Interface: Logging<T>"
sidebar_label: "Logging"
sidebar_position: 0
custom_edit_url: null
---
**`Since`**
2.0.0
## Type parameters
| Name | Type |
| :------ | :------ |
| `T` | `unknown` |
## Implemented by
- [`DefaultLogging`](../classes/DefaultLogging.md)
## Methods
### debug
**debug**(`payload`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`LogPayload`](../modules.md#logpayload)<`T`\> |
#### Returns
`void`
#### Defined in
[src/core/contracts/logging.ts:8](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/logging.ts#L8)
___
### error
**error**(`payload`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`LogPayload`](../modules.md#logpayload)<`T`\> |
#### Returns
`void`
#### Defined in
[src/core/contracts/logging.ts:5](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/logging.ts#L5)
___
### info
**info**(`payload`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`LogPayload`](../modules.md#logpayload)<`T`\> |
#### Returns
`void`
#### Defined in
[src/core/contracts/logging.ts:7](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/logging.ts#L7)
___
### warning
**warning**(`payload`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | [`LogPayload`](../modules.md#logpayload)<`T`\> |
#### Returns
`void`
#### Defined in
[src/core/contracts/logging.ts:6](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/logging.ts#L6)

View File

@@ -0,0 +1,111 @@
---
id: "MentionableSelectCommand"
title: "Interface: MentionableSelectCommand"
sidebar_label: "MentionableSelectCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `Module`
**`MentionableSelectCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
Module.description
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
___
### execute
**execute**: (`ctx`: `MentionableSelectMenuInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `MentionableSelectMenuInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
Module.execute
#### Defined in
[src/types/core-modules.ts:84](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L84)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
___
### type
**type**: [`MentionableSelect`](../enums/CommandType.md#mentionableselect)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:83](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L83)

View File

@@ -0,0 +1,111 @@
---
id: "ModalSubmitCommand"
title: "Interface: ModalSubmitCommand"
sidebar_label: "ModalSubmitCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `Module`
**`ModalSubmitCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
Module.description
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
___
### execute
**execute**: (`ctx`: `ModalSubmitInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `ModalSubmitInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
Module.execute
#### Defined in
[src/types/core-modules.ts:94](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L94)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
___
### type
**type**: [`Modal`](../enums/CommandType.md#modal)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:93](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L93)

View File

@@ -0,0 +1,115 @@
---
id: "Module"
title: "Interface: Module"
sidebar_label: "Module"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- **`Module`**
↳ [`TextCommand`](TextCommand.md)
↳ [`SlashCommand`](SlashCommand.md)
↳ [`BothCommand`](BothCommand.md)
↳ [`ContextMenuUser`](ContextMenuUser.md)
↳ [`ContextMenuMsg`](ContextMenuMsg.md)
↳ [`ButtonCommand`](ButtonCommand.md)
↳ [`StringSelectCommand`](StringSelectCommand.md)
↳ [`ChannelSelectCommand`](ChannelSelectCommand.md)
↳ [`RoleSelectCommand`](RoleSelectCommand.md)
↳ [`MentionableSelectCommand`](MentionableSelectCommand.md)
↳ [`UserSelectCommand`](UserSelectCommand.md)
↳ [`ModalSubmitCommand`](ModalSubmitCommand.md)
↳ [`SernEventCommand`](SernEventCommand.md)
↳ [`DiscordEventCommand`](DiscordEventCommand.md)
↳ [`ExternalEventCommand`](ExternalEventCommand.md)
## Properties
### description
`Optional` **description**: `string`
#### Defined in
[src/types/module.ts:38](https://github.com/sern-handler/handler/blob/c1f6906/src/types/module.ts#L38)
___
### execute
**execute**: (...`args`: `any`[]) => `any`
#### Type declaration
▸ (...`args`): `any`
##### Parameters
| Name | Type |
| :------ | :------ |
| `...args` | `any`[] |
##### Returns
`any`
#### Defined in
[src/types/module.ts:39](https://github.com/sern-handler/handler/blob/c1f6906/src/types/module.ts#L39)
___
### name
`Optional` **name**: `string`
#### Defined in
[src/types/module.ts:35](https://github.com/sern-handler/handler/blob/c1f6906/src/types/module.ts#L35)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Defined in
[src/types/module.ts:36](https://github.com/sern-handler/handler/blob/c1f6906/src/types/module.ts#L36)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Defined in
[src/types/module.ts:37](https://github.com/sern-handler/handler/blob/c1f6906/src/types/module.ts#L37)
___
### type
**type**: [`CommandType`](../enums/CommandType.md) \| [`EventType`](../enums/EventType.md)
#### Defined in
[src/types/module.ts:34](https://github.com/sern-handler/handler/blob/c1f6906/src/types/module.ts#L34)

View File

@@ -0,0 +1,138 @@
---
id: "ModuleManager"
title: "Interface: ModuleManager"
sidebar_label: "ModuleManager"
sidebar_position: 0
custom_edit_url: null
---
**`Since`**
2.0.0
## Implemented by
- [`DefaultModuleManager`](../classes/DefaultModuleManager.md)
## Methods
### get
**get**(`id`): `undefined` \| `string`
#### Parameters
| Name | Type |
| :------ | :------ |
| `id` | `string` |
#### Returns
`undefined` \| `string`
#### Defined in
[src/core/contracts/module-manager.ts:13](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/module-manager.ts#L13)
___
### getByNameCommandType
**getByNameCommandType**<`T`\>(`name`, `commandType`): `undefined` \| `Promise`<[`CommandModuleDefs`](CommandModuleDefs.md)[`T`]\>
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends [`CommandType`](../enums/CommandType.md) |
#### Parameters
| Name | Type |
| :------ | :------ |
| `name` | `string` |
| `commandType` | `T` |
#### Returns
`undefined` \| `Promise`<[`CommandModuleDefs`](CommandModuleDefs.md)[`T`]\>
#### Defined in
[src/core/contracts/module-manager.ts:18](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/module-manager.ts#L18)
___
### getMetadata
**getMetadata**(`m`): `undefined` \| `CommandMeta`
#### Parameters
| Name | Type |
| :------ | :------ |
| `m` | `Module` |
#### Returns
`undefined` \| `CommandMeta`
#### Defined in
[src/core/contracts/module-manager.ts:14](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/module-manager.ts#L14)
___
### getPublishableCommands
**getPublishableCommands**(): `Promise`<[`CommandModule`](../modules.md#commandmodule)[]\>
#### Returns
`Promise`<[`CommandModule`](../modules.md#commandmodule)[]\>
#### Defined in
[src/core/contracts/module-manager.ts:17](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/module-manager.ts#L17)
___
### set
**set**(`id`, `path`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `id` | `string` |
| `path` | `string` |
#### Returns
`void`
#### Defined in
[src/core/contracts/module-manager.ts:16](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/module-manager.ts#L16)
___
### setMetadata
**setMetadata**(`m`, `c`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `m` | `Module` |
| `c` | `CommandMeta` |
#### Returns
`void`
#### Defined in
[src/core/contracts/module-manager.ts:15](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/module-manager.ts#L15)

View File

@@ -0,0 +1,47 @@
---
id: "Plugin"
title: "Interface: Plugin<Args>"
sidebar_label: "Plugin"
sidebar_position: 0
custom_edit_url: null
---
## Type parameters
| Name | Type |
| :------ | :------ |
| `Args` | extends `any`[] = `any`[] |
## Properties
### execute
**execute**: (...`args`: `Args`) => [`PluginResult`](../modules.md#pluginresult)
#### Type declaration
▸ (`...args`): [`PluginResult`](../modules.md#pluginresult)
##### Parameters
| Name | Type |
| :------ | :------ |
| `...args` | `Args` |
##### Returns
[`PluginResult`](../modules.md#pluginresult)
#### Defined in
[src/types/core-plugin.ts:64](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L64)
___
### type
**type**: [`PluginType`](../enums/PluginType.md)
#### Defined in
[src/types/core-plugin.ts:63](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L63)

View File

@@ -0,0 +1,111 @@
---
id: "RoleSelectCommand"
title: "Interface: RoleSelectCommand"
sidebar_label: "RoleSelectCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `Module`
**`RoleSelectCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
Module.description
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
___
### execute
**execute**: (`ctx`: `RoleSelectMenuInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `RoleSelectMenuInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
Module.execute
#### Defined in
[src/types/core-modules.ts:79](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L79)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
___
### type
**type**: [`RoleSelect`](../enums/CommandType.md#roleselect)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:78](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L78)

View File

@@ -0,0 +1,113 @@
---
id: "SernAutocompleteData"
title: "Interface: SernAutocompleteData"
sidebar_label: "SernAutocompleteData"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `Omit`<`BaseApplicationCommandOptionsData`, ``"autocomplete"``\>
**`SernAutocompleteData`**
## Properties
### autocomplete
**autocomplete**: ``true``
#### Defined in
[src/types/core-modules.ts:171](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L171)
___
### command
• **command**: `AutocompleteCommand`
#### Defined in
[src/types/core-modules.ts:176](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L176)
___
### description
• **description**: `string`
#### Inherited from
Omit.description
#### Defined in
node_modules/discord.js/typings/index.d.ts:4301
___
### descriptionLocalizations
• `Optional` **descriptionLocalizations**: `Partial`<`Record`<``"id"`` \| ``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
#### Inherited from
Omit.descriptionLocalizations
#### Defined in
node_modules/discord.js/typings/index.d.ts:4302
___
### name
• **name**: `string`
#### Inherited from
Omit.name
#### Defined in
node_modules/discord.js/typings/index.d.ts:4299
___
### nameLocalizations
• `Optional` **nameLocalizations**: `Partial`<`Record`<``"id"`` \| ``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
#### Inherited from
Omit.nameLocalizations
#### Defined in
node_modules/discord.js/typings/index.d.ts:4300
___
### required
• `Optional` **required**: `boolean`
#### Inherited from
Omit.required
#### Defined in
node_modules/discord.js/typings/index.d.ts:4303
___
### type
• **type**: `String` \| `Integer` \| `Number`
#### Defined in
[src/types/core-modules.ts:172](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L172)

View File

@@ -0,0 +1,90 @@
---
id: "SernEmitterPlugin"
title: "Interface: SernEmitterPlugin"
sidebar_label: "SernEmitterPlugin"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- [`Plugin`](Plugin.md)
**`SernEmitterPlugin`**
## Properties
### description
`Optional` **description**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[description](Plugin.md#description)
#### Defined in
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
___
### execute
**execute**: (`payload`: { `absPath`: `string` ; `mod`: `SernEventCommand`<keyof [`SernEventsMapping`](../modules.md#serneventsmapping)\> & { `name`: `string` } }, `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
#### Type declaration
▸ (`payload`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
##### Parameters
| Name | Type |
| :------ | :------ |
| `payload` | `Object` |
| `payload.absPath` | `string` |
| `payload.mod` | `SernEventCommand`<keyof [`SernEventsMapping`](../modules.md#serneventsmapping)\> & { `name`: `string` } |
| `controller` | [`Controller`](Controller.md) |
##### Returns
`Awaitable`<`Result`<`void`, `void`\>\>
#### Defined in
[src/handler/plugins/plugin.ts:65](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L65)
___
### name
`Optional` **name**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[name](Plugin.md#name)
#### Defined in
[src/handler/plugins/plugin.ts:31](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L31)
___
### type
**type**: [`Command`](../enums/PluginType.md#command)
#### Overrides
[Plugin](Plugin.md).[type](Plugin.md#type)
#### Defined in
[src/handler/plugins/plugin.ts:64](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L64)

View File

@@ -0,0 +1,113 @@
---
id: "SernEventCommand"
title: "Interface: SernEventCommand<T>"
sidebar_label: "SernEventCommand"
sidebar_position: 0
custom_edit_url: null
---
## Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends keyof [`SernEventsMapping`](SernEventsMapping.md) = keyof [`SernEventsMapping`](SernEventsMapping.md) |
## Hierarchy
- `Module`
**`SernEventCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
Module.description
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
___
### name
`Optional` **name**: `T`
#### Overrides
Module.name
#### Defined in
[src/types/core-modules.ts:41](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L41)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
___
### type
**type**: [`Sern`](../enums/EventType.md#sern)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:42](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L42)
## Methods
### execute
**execute**(`...args`): `unknown`
#### Parameters
| Name | Type |
| :------ | :------ |
| `...args` | [`SernEventsMapping`](SernEventsMapping.md)[`T`] |
#### Returns
`unknown`
#### Overrides
Module.execute
#### Defined in
[src/types/core-modules.ts:43](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L43)

View File

@@ -0,0 +1,94 @@
---
id: "SernEventPlugin"
title: "Interface: SernEventPlugin<T>"
sidebar_label: "SernEventPlugin"
sidebar_position: 0
custom_edit_url: null
---
## Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends keyof [`SernEventsMapping`](../modules.md#serneventsmapping) = keyof [`SernEventsMapping`](../modules.md#serneventsmapping) |
## Hierarchy
- [`Plugin`](Plugin.md)
**`SernEventPlugin`**
## Properties
### description
`Optional` **description**: `string`
**`Deprecated`**
will be removed in the next update
#### Inherited from
[Plugin](Plugin.md).[description](Plugin.md#description)
#### Defined in
[src/handler/plugins/plugin.ts:33](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L33)
___
### execute
**execute**: (`args`: [`SernEventsMapping`](../modules.md#serneventsmapping)[`T`], `controller`: [`Controller`](Controller.md)) => `Awaitable`<`Result`<`void`, `void`\>\>
#### Type declaration
▸ (`args`, `controller`): `Awaitable`<`Result`<`void`, `void`\>\>
##### Parameters
| Name | Type |
| :------ | :------ |
| `args` | [`SernEventsMapping`](../modules.md#serneventsmapping)[`T`] |
| `controller` | [`Controller`](Controller.md) |
##### Returns
`Awaitable`<`Result`<`void`, `void`\>\>
#### Defined in
[src/handler/plugins/plugin.ts:91](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L91)
___
### name
`Optional` **name**: `T`
**`Deprecated`**
will be removed in the next update
#### Overrides
[Plugin](Plugin.md).[name](Plugin.md#name)
#### Defined in
[src/handler/plugins/plugin.ts:89](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L89)
___
### type
**type**: [`Event`](../enums/PluginType.md#event)
#### Overrides
[Plugin](Plugin.md).[type](Plugin.md#type)
#### Defined in
[src/handler/plugins/plugin.ts:90](https://github.com/sern-handler/handler/blob/3daacfc/src/handler/plugins/plugin.ts#L90)

View File

@@ -0,0 +1,57 @@
---
id: "SernEventsMapping"
title: "Interface: SernEventsMapping"
sidebar_label: "SernEventsMapping"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### error
**error**: [[`Payload`](../modules.md#payload)]
#### Defined in
[src/types/utility.ts:21](https://github.com/sern-handler/handler/blob/81cdde2/src/types/utility.ts#L21)
___
### module.activate
**module.activate**: [[`Payload`](../modules.md#payload)]
#### Defined in
[src/types/utility.ts:20](https://github.com/sern-handler/handler/blob/81cdde2/src/types/utility.ts#L20)
___
### module.register
**module.register**: [[`Payload`](../modules.md#payload)]
#### Defined in
[src/types/utility.ts:19](https://github.com/sern-handler/handler/blob/81cdde2/src/types/utility.ts#L19)
___
### modulesLoaded
**modulesLoaded**: [undefined?]
#### Defined in
[src/types/utility.ts:23](https://github.com/sern-handler/handler/blob/81cdde2/src/types/utility.ts#L23)
___
### warning
**warning**: [[`Payload`](../modules.md#payload)]
#### Defined in
[src/types/utility.ts:22](https://github.com/sern-handler/handler/blob/81cdde2/src/types/utility.ts#L22)

View File

@@ -0,0 +1,107 @@
---
id: "SernSubCommandData"
title: "Interface: SernSubCommandData"
sidebar_label: "SernSubCommandData"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `APIApplicationCommandOptionBase`<`ApplicationCommandOptionType.Subcommand`\>
**`SernSubCommandData`**
## Properties
### description
**description**: `string`
#### Inherited from
APIApplicationCommandOptionBase.description
#### Defined in
node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts:7
___
### description\_localizations
`Optional` **description\_localizations**: ``null`` \| `Partial`<`Record`<``"id"`` \| ``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
#### Inherited from
APIApplicationCommandOptionBase.description\_localizations
#### Defined in
node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts:8
___
### name
• **name**: `string`
#### Inherited from
APIApplicationCommandOptionBase.name
#### Defined in
node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts:5
___
### name\_localizations
• `Optional` **name\_localizations**: ``null`` \| `Partial`<`Record`<``"id"`` \| ``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
#### Inherited from
APIApplicationCommandOptionBase.name\_localizations
#### Defined in
node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts:6
___
### options
• `Optional` **options**: [`SernOptionsData`](../modules.md#sernoptionsdata)[]
#### Defined in
[src/types/core-modules.ts:208](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L208)
___
### required
• `Optional` **required**: `boolean`
#### Inherited from
APIApplicationCommandOptionBase.required
#### Defined in
node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts:9
___
### type
• **type**: `Subcommand`
#### Overrides
APIApplicationCommandOptionBase.type
#### Defined in
[src/types/core-modules.ts:207](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L207)

View File

@@ -0,0 +1,117 @@
---
id: "SernSubCommandGroupData"
title: "Interface: SernSubCommandGroupData"
sidebar_label: "SernSubCommandGroupData"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `BaseApplicationCommandOptionsData`
**`SernSubCommandGroupData`**
## Properties
### autocomplete
`Optional` **autocomplete**: `undefined`
#### Inherited from
BaseApplicationCommandOptionsData.autocomplete
#### Defined in
node_modules/discord.js/typings/index.d.ts:4304
___
### description
**description**: `string`
#### Inherited from
BaseApplicationCommandOptionsData.description
#### Defined in
node_modules/discord.js/typings/index.d.ts:4301
___
### descriptionLocalizations
`Optional` **descriptionLocalizations**: `Partial`<`Record`<``"id"`` \| ``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
#### Inherited from
BaseApplicationCommandOptionsData.descriptionLocalizations
#### Defined in
node_modules/discord.js/typings/index.d.ts:4302
___
### name
• **name**: `string`
#### Inherited from
BaseApplicationCommandOptionsData.name
#### Defined in
node_modules/discord.js/typings/index.d.ts:4299
___
### nameLocalizations
• `Optional` **nameLocalizations**: `Partial`<`Record`<``"id"`` \| ``"en-US"`` \| ``"en-GB"`` \| ``"bg"`` \| ``"zh-CN"`` \| ``"zh-TW"`` \| ``"hr"`` \| ``"cs"`` \| ``"da"`` \| ``"nl"`` \| ``"fi"`` \| ``"fr"`` \| ``"de"`` \| ``"el"`` \| ``"hi"`` \| ``"hu"`` \| ``"it"`` \| ``"ja"`` \| ``"ko"`` \| ``"lt"`` \| ``"no"`` \| ``"pl"`` \| ``"pt-BR"`` \| ``"ro"`` \| ``"ru"`` \| ``"es-ES"`` \| ``"sv-SE"`` \| ``"th"`` \| ``"tr"`` \| ``"uk"`` \| ``"vi"``, ``null`` \| `string`\>\>
#### Inherited from
BaseApplicationCommandOptionsData.nameLocalizations
#### Defined in
node_modules/discord.js/typings/index.d.ts:4300
___
### options
• `Optional` **options**: [`SernSubCommandData`](SernSubCommandData.md)[]
#### Defined in
[src/types/core-modules.ts:213](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L213)
___
### required
• `Optional` **required**: `boolean`
#### Inherited from
BaseApplicationCommandOptionsData.required
#### Defined in
node_modules/discord.js/typings/index.d.ts:4303
___
### type
• **type**: `SubcommandGroup`
#### Defined in
[src/types/core-modules.ts:212](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L212)

View File

@@ -0,0 +1,122 @@
---
id: "SlashCommand"
title: "Interface: SlashCommand"
sidebar_label: "SlashCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `Module`
**`SlashCommand`**
## Properties
### description
**description**: `string`
#### Overrides
Module.description
#### Defined in
[src/types/core-modules.ts:117](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L117)
___
### execute
**execute**: (`ctx`: [`Context`](../classes/Context.md), `args`: [``"slash"``, [`SlashOptions`](../modules.md#slashoptions)]) => `unknown`
#### Type declaration
▸ (`ctx`, `args`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | [`Context`](../classes/Context.md) |
| `args` | [``"slash"``, [`SlashOptions`](../modules.md#slashoptions)] |
##### Returns
`unknown`
#### Overrides
Module.execute
#### Defined in
[src/types/core-modules.ts:119](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L119)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
___
### options
`Optional` **options**: [`SernOptionsData`](../modules.md#sernoptionsdata)[]
#### Defined in
[src/types/core-modules.ts:118](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L118)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
___
### type
**type**: [`Slash`](../enums/CommandType.md#slash)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:116](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L116)

View File

@@ -0,0 +1,111 @@
---
id: "StringSelectCommand"
title: "Interface: StringSelectCommand"
sidebar_label: "StringSelectCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `Module`
**`StringSelectCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
Module.description
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
___
### execute
**execute**: (`ctx`: `StringSelectMenuInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `StringSelectMenuInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
Module.execute
#### Defined in
[src/types/core-modules.ts:69](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L69)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
___
### type
**type**: [`StringSelect`](../enums/CommandType.md#stringselect)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:68](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L68)

View File

@@ -0,0 +1,122 @@
---
id: "TextCommand"
title: "Interface: TextCommand"
sidebar_label: "TextCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `Module`
**`TextCommand`**
## Properties
### alias
`Optional` **alias**: `string`[]
#### Defined in
[src/types/core-modules.ts:111](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L111)
___
### description
`Optional` **description**: `string`
#### Inherited from
Module.description
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
___
### execute
**execute**: (`ctx`: [`Context`](../classes/Context.md), `args`: [``"text"``, `string`[]]) => `unknown`
#### Type declaration
▸ (`ctx`, `args`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | [`Context`](../classes/Context.md) |
| `args` | [``"text"``, `string`[]] |
##### Returns
`unknown`
#### Overrides
Module.execute
#### Defined in
[src/types/core-modules.ts:112](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L112)
___
### name
• `Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
___
### onEvent
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
___
### plugins
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
___
### type
• **type**: [`Text`](../enums/CommandType.md#text)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:110](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L110)

View File

@@ -0,0 +1,111 @@
---
id: "UserSelectCommand"
title: "Interface: UserSelectCommand"
sidebar_label: "UserSelectCommand"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `Module`
**`UserSelectCommand`**
## Properties
### description
`Optional` **description**: `string`
#### Inherited from
Module.description
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L35)
___
### execute
**execute**: (`ctx`: `UserSelectMenuInteraction`<`CacheType`\>) => `unknown`
#### Type declaration
▸ (`ctx`): `unknown`
##### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `UserSelectMenuInteraction`<`CacheType`\> |
##### Returns
`unknown`
#### Overrides
Module.execute
#### Defined in
[src/types/core-modules.ts:89](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L89)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:32](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L32)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L33)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L34)
___
### type
**type**: [`UserSelect`](../enums/CommandType.md#userselect)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:88](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L88)

View File

@@ -0,0 +1,65 @@
---
id: "Wrapper"
title: "Interface: Wrapper"
sidebar_label: "Wrapper"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### commands
**commands**: `string`
#### Defined in
[src/types/core.ts:8](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core.ts#L8)
___
### containerConfig
`Optional` **containerConfig**: `Object`
#### Type declaration
| Name | Type |
| :------ | :------ |
| `get` | (...`keys`: keyof `Dependencies`[]) => `unknown`[] |
#### Defined in
[src/types/core.ts:18](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core.ts#L18)
___
### defaultPrefix
`Optional` **defaultPrefix**: `string`
#### Defined in
[src/types/core.ts:9](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core.ts#L9)
___
### events
`Optional` **events**: `string`
#### Defined in
[src/types/core.ts:10](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core.ts#L10)
___
### mode
`Optional` **mode**: ``"DEV"`` \| ``"PROD"``
Overload to enable mode in case developer does not use a .env file.
#### Defined in
[src/types/core.ts:14](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core.ts#L14)

View File

@@ -0,0 +1,2 @@
label: "Interfaces"
position: 4

739
docs/api/modules.md Normal file
View File

@@ -0,0 +1,739 @@
---
id: "modules"
title: "@sern/handler"
sidebar_label: "Exports"
sidebar_position: 0.5
custom_edit_url: null
---
## Namespaces
- [Sern](namespaces/Sern.md)
## Enumerations
- [CommandType](enums/CommandType.md)
- [EventType](enums/EventType.md)
- [PayloadType](enums/PayloadType.md)
- [PluginType](enums/PluginType.md)
## Classes
- [CommandExecutable](classes/CommandExecutable.md)
- [Context](classes/Context.md)
- [DefaultErrorHandling](classes/DefaultErrorHandling.md)
- [DefaultLogging](classes/DefaultLogging.md)
- [DefaultModuleManager](classes/DefaultModuleManager.md)
- [EventExecutable](classes/EventExecutable.md)
- [ModuleStore](classes/ModuleStore.md)
- [SernEmitter](classes/SernEmitter.md)
## Interfaces
- [BothCommand](interfaces/BothCommand.md)
- [ButtonCommand](interfaces/ButtonCommand.md)
- [ChannelSelectCommand](interfaces/ChannelSelectCommand.md)
- [CommandModuleDefs](interfaces/CommandModuleDefs.md)
- [ContextMenuMsg](interfaces/ContextMenuMsg.md)
- [ContextMenuUser](interfaces/ContextMenuUser.md)
- [ControlPlugin](interfaces/ControlPlugin.md)
- [Controller](interfaces/Controller.md)
- [CoreDependencies](interfaces/CoreDependencies.md)
- [CoreModuleStore](interfaces/CoreModuleStore.md)
- [DiscordEventCommand](interfaces/DiscordEventCommand.md)
- [Emitter](interfaces/Emitter.md)
- [ErrorHandling](interfaces/ErrorHandling.md)
- [EventModuleDefs](interfaces/EventModuleDefs.md)
- [ExternalEventCommand](interfaces/ExternalEventCommand.md)
- [Init](interfaces/Init.md)
- [InitPlugin](interfaces/InitPlugin.md)
- [Logging](interfaces/Logging.md)
- [MentionableSelectCommand](interfaces/MentionableSelectCommand.md)
- [ModalSubmitCommand](interfaces/ModalSubmitCommand.md)
- [ModuleManager](interfaces/ModuleManager.md)
- [Plugin](interfaces/Plugin.md)
- [RoleSelectCommand](interfaces/RoleSelectCommand.md)
- [SernAutocompleteData](interfaces/SernAutocompleteData.md)
- [SernEventCommand](interfaces/SernEventCommand.md)
- [SernEventsMapping](interfaces/SernEventsMapping.md)
- [SernSubCommandData](interfaces/SernSubCommandData.md)
- [SernSubCommandGroupData](interfaces/SernSubCommandGroupData.md)
- [SlashCommand](interfaces/SlashCommand.md)
- [StringSelectCommand](interfaces/StringSelectCommand.md)
- [TextCommand](interfaces/TextCommand.md)
- [UserSelectCommand](interfaces/UserSelectCommand.md)
- [Wrapper](interfaces/Wrapper.md)
## References
### controller
Re-exports [controller](namespaces/Sern.md#controller)
## Type Aliases
### AnyCommandPlugin
Ƭ **AnyCommandPlugin**: [`ControlPlugin`](interfaces/ControlPlugin.md) \| [`InitPlugin`](interfaces/InitPlugin.md)<[`InitArgs`<`Processed`<[`CommandModule`](modules.md#commandmodule)\>\>]\>
#### Defined in
[src/types/core-plugin.ts:76](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L76)
___
### AnyEventPlugin
Ƭ **AnyEventPlugin**: [`ControlPlugin`](interfaces/ControlPlugin.md) \| [`InitPlugin`](interfaces/InitPlugin.md)<[`InitArgs`<`Processed`<[`EventModule`](modules.md#eventmodule)\>\>]\>
#### Defined in
[src/types/core-plugin.ts:77](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L77)
___
### Args
Ƭ **Args**: `ParseType`<{ `slash`: [`SlashOptions`](modules.md#slashoptions) ; `text`: `string`[] }\>
#### Defined in
[src/types/utility.ts:16](https://github.com/sern-handler/handler/blob/81cdde2/src/types/utility.ts#L16)
___
### CommandModule
Ƭ **CommandModule**: [`TextCommand`](interfaces/TextCommand.md) \| [`SlashCommand`](interfaces/SlashCommand.md) \| [`BothCommand`](interfaces/BothCommand.md) \| [`ContextMenuUser`](interfaces/ContextMenuUser.md) \| [`ContextMenuMsg`](interfaces/ContextMenuMsg.md) \| [`ButtonCommand`](interfaces/ButtonCommand.md) \| [`StringSelectCommand`](interfaces/StringSelectCommand.md) \| [`MentionableSelectCommand`](interfaces/MentionableSelectCommand.md) \| [`UserSelectCommand`](interfaces/UserSelectCommand.md) \| [`ChannelSelectCommand`](interfaces/ChannelSelectCommand.md) \| [`RoleSelectCommand`](interfaces/RoleSelectCommand.md) \| [`ModalSubmitCommand`](interfaces/ModalSubmitCommand.md)
#### Defined in
[src/types/core-modules.ts:131](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L131)
___
### EventModule
Ƭ **EventModule**: [`DiscordEventCommand`](interfaces/DiscordEventCommand.md) \| [`SernEventCommand`](interfaces/SernEventCommand.md) \| [`ExternalEventCommand`](interfaces/ExternalEventCommand.md)
#### Defined in
[src/types/core-modules.ts:130](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L130)
___
### Initializable
Ƭ **Initializable**<`T`\>: `T`
Type to annotate that something is initializable.
If T has an init method, this will be called.
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends [`Init`](interfaces/Init.md) |
#### Defined in
[src/types/ioc.ts:17](https://github.com/sern-handler/handler/blob/81cdde2/src/types/ioc.ts#L17)
___
### LogPayload
Ƭ **LogPayload**<`T`\>: `Object`
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | `unknown` |
#### Type declaration
| Name | Type |
| :------ | :------ |
| `message` | `T` |
#### Defined in
[src/core/contracts/logging.ts:11](https://github.com/sern-handler/handler/blob/81cdde2/src/core/contracts/logging.ts#L11)
___
### Payload
Ƭ **Payload**: { `module`: `AnyModule` ; `type`: [`Success`](enums/PayloadType.md#success) } \| { `module?`: `AnyModule` ; `reason`: `string` \| `Error` ; `type`: [`Failure`](enums/PayloadType.md#failure) } \| { `reason`: `string` ; `type`: [`Warning`](enums/PayloadType.md#warning) }
#### Defined in
[src/types/utility.ts:26](https://github.com/sern-handler/handler/blob/81cdde2/src/types/utility.ts#L26)
___
### PluginResult
Ƭ **PluginResult**: `Awaitable`<`VoidResult`\>
#### Defined in
[src/types/core-plugin.ts:51](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-plugin.ts#L51)
___
### SernOptionsData
Ƭ **SernOptionsData**: [`SernSubCommandData`](interfaces/SernSubCommandData.md) \| [`SernSubCommandGroupData`](interfaces/SernSubCommandGroupData.md) \| `APIApplicationCommandBasicOption` \| [`SernAutocompleteData`](interfaces/SernAutocompleteData.md)
Type that replaces autocomplete with [SernAutocompleteData](interfaces/SernAutocompleteData.md)
#### Defined in
[src/types/core-modules.ts:199](https://github.com/sern-handler/handler/blob/81cdde2/src/types/core-modules.ts#L199)
___
### Singleton
Ƭ **Singleton**<`T`\>: () => `T`
#### Type parameters
| Name |
| :------ |
| `T` |
#### Type declaration
▸ (): `T`
Type to annotate that something is a singleton.
T is created once and lazily.
##### Returns
`T`
#### Defined in
[src/types/ioc.ts:7](https://github.com/sern-handler/handler/blob/81cdde2/src/types/ioc.ts#L7)
___
### SlashOptions
Ƭ **SlashOptions**: `Omit`<`CommandInteractionOptionResolver`, ``"getMessage"`` \| ``"getFocused"``\>
#### Defined in
[src/types/utility.ts:14](https://github.com/sern-handler/handler/blob/81cdde2/src/types/utility.ts#L14)
___
### Transient
Ƭ **Transient**<`T`\>: () => () => `T`
#### Type parameters
| Name |
| :------ |
| `T` |
#### Type declaration
▸ (): () => `T`
Type to annotate that something is transient.
Every time this is called, a new object is created
##### Returns
`fn`
▸ (): `T`
##### Returns
`T`
#### Defined in
[src/types/ioc.ts:12](https://github.com/sern-handler/handler/blob/81cdde2/src/types/ioc.ts#L12)
## Functions
### CommandControlPlugin
▸ **CommandControlPlugin**<`I`\>(`execute`): [`Plugin`](interfaces/Plugin.md)<`unknown`[]\>
**`Since`**
2.5.0
@__PURE__
#### Type parameters
| Name | Type |
| :------ | :------ |
| `I` | extends [`CommandType`](enums/CommandType.md) |
#### Parameters
| Name | Type |
| :------ | :------ |
| `execute` | (...`args`: `CommandArgs`<`I`, [`Control`](enums/PluginType.md#control)\>) => [`PluginResult`](modules.md#pluginresult) |
#### Returns
[`Plugin`](interfaces/Plugin.md)<`unknown`[]\>
#### Defined in
[src/core/create-plugins.ts:36](https://github.com/sern-handler/handler/blob/81cdde2/src/core/create-plugins.ts#L36)
___
### CommandInitPlugin
▸ **CommandInitPlugin**<`I`\>(`execute`): [`Plugin`](interfaces/Plugin.md)<`unknown`[]\>
**`Since`**
2.5.0
@__PURE__
#### Type parameters
| Name | Type |
| :------ | :------ |
| `I` | extends [`CommandType`](enums/CommandType.md) |
#### Parameters
| Name | Type |
| :------ | :------ |
| `execute` | (...`args`: `CommandArgs`<`I`, [`Init`](enums/PluginType.md#init)\>) => [`PluginResult`](modules.md#pluginresult) |
#### Returns
[`Plugin`](interfaces/Plugin.md)<`unknown`[]\>
#### Defined in
[src/core/create-plugins.ts:27](https://github.com/sern-handler/handler/blob/81cdde2/src/core/create-plugins.ts#L27)
___
### DiscordEventControlPlugin
▸ **DiscordEventControlPlugin**<`T`\>(`name`, `execute`): [`Plugin`](interfaces/Plugin.md)<`unknown`[]\>
**`Since`**
2.5.0
**`Experimental`**
A specialized function for creating control plugins with discord.js ClientEvents.
Will probably be moved one day!
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends keyof `ClientEvents` |
#### Parameters
| Name | Type |
| :------ | :------ |
| `name` | `T` |
| `execute` | (...`args`: `ClientEvents`[`T`]) => [`PluginResult`](modules.md#pluginresult) |
#### Returns
[`Plugin`](interfaces/Plugin.md)<`unknown`[]\>
#### Defined in
[src/core/create-plugins.ts:57](https://github.com/sern-handler/handler/blob/81cdde2/src/core/create-plugins.ts#L57)
___
### EventControlPlugin
▸ **EventControlPlugin**<`I`\>(`execute`): [`Plugin`](interfaces/Plugin.md)<`unknown`[]\>
**`Since`**
2.5.0
@__PURE__
#### Type parameters
| Name | Type |
| :------ | :------ |
| `I` | extends [`EventType`](enums/EventType.md) |
#### Parameters
| Name | Type |
| :------ | :------ |
| `execute` | (...`args`: `EventArgs`<`I`, [`Control`](enums/PluginType.md#control)\>) => [`PluginResult`](modules.md#pluginresult) |
#### Returns
[`Plugin`](interfaces/Plugin.md)<`unknown`[]\>
#### Defined in
[src/core/create-plugins.ts:45](https://github.com/sern-handler/handler/blob/81cdde2/src/core/create-plugins.ts#L45)
___
### EventInitPlugin
▸ **EventInitPlugin**<`I`\>(`execute`): [`Plugin`](interfaces/Plugin.md)<`unknown`[]\>
**`Since`**
2.5.0
@__PURE__
#### Type parameters
| Name | Type |
| :------ | :------ |
| `I` | extends [`EventType`](enums/EventType.md) |
#### Parameters
| Name | Type |
| :------ | :------ |
| `execute` | (...`args`: `EventArgs`<`I`, [`Init`](enums/PluginType.md#init)\>) => [`PluginResult`](modules.md#pluginresult) |
#### Returns
[`Plugin`](interfaces/Plugin.md)<`unknown`[]\>
#### Defined in
[src/core/create-plugins.ts:18](https://github.com/sern-handler/handler/blob/81cdde2/src/core/create-plugins.ts#L18)
___
### 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.
**`Since`**
3.0.0
**`Example`**
```ts
const client = Service('@sern/client');
```
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends keyof `Dependencies` |
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `key` | `T` | a key that corresponds to a dependency registered. |
#### Returns
`NonNullable`<`UnpackFunction`<`Partial`<`Dependencies`\>[`T`]\>\>
#### Defined in
[src/core/ioc/dependency-injection.ts:37](https://github.com/sern-handler/handler/blob/81cdde2/src/core/ioc/dependency-injection.ts#L37)
___
### Services
▸ **Services**<`T`\>(`...keys`): `IntoDependencies`<`T`\>
**`Since`**
3.0.0
The plural version of [Service](modules.md#service)
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends keyof `Dependencies`[] |
#### Parameters
| Name | Type |
| :------ | :------ |
| `...keys` | [...T[]] |
#### Returns
`IntoDependencies`<`T`\>
array of dependencies, in the same order of keys provided
#### Defined in
[src/core/ioc/dependency-injection.ts:45](https://github.com/sern-handler/handler/blob/81cdde2/src/core/ioc/dependency-injection.ts#L45)
___
### commandModule
▸ **commandModule**(`mod`): [`CommandModule`](modules.md#commandmodule)
**`Since`**
1.0.0 The wrapper function to define command modules for sern
#### Parameters
| Name | Type |
| :------ | :------ |
| `mod` | `InputCommand` |
#### Returns
[`CommandModule`](modules.md#commandmodule)
#### Defined in
[src/core/modules.ts:25](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L25)
___
### discordEvent
▸ **discordEvent**<`T`\>(`mod`): [`EventModule`](modules.md#eventmodule)
Create event modules from discord.js client events,
This is an [eventModule](modules.md#eventmodule-1) for discord events,
where typings can be very bad.
**`Experimental`**
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends keyof `ClientEvents` |
#### Parameters
| Name | Type |
| :------ | :------ |
| `mod` | `Object` |
| `mod.execute` | (...`args`: `ClientEvents`[`T`]) => `unknown` |
| `mod.name` | `T` |
| `mod.plugins?` | [`AnyEventPlugin`](modules.md#anyeventplugin)[] |
#### Returns
[`EventModule`](modules.md#eventmodule)
#### Defined in
[src/core/modules.ts:53](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L53)
___
### eventModule
▸ **eventModule**(`mod`): [`EventModule`](modules.md#eventmodule)
**`Since`**
1.0.0
The wrapper function to define event modules for sern
#### Parameters
| Name | Type |
| :------ | :------ |
| `mod` | `InputEvent` |
#### Returns
[`EventModule`](modules.md#eventmodule)
#### Defined in
[src/core/modules.ts:38](https://github.com/sern-handler/handler/blob/81cdde2/src/core/modules.ts#L38)
___
### makeDependencies
▸ **makeDependencies**<`T`\>(`conf`): `Promise`<<V\>(...`keys`: [...V[]]) => `IntoDependencies`<`V`\>\>
**`Since`**
2.0.0
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends `Dependencies` |
#### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `conf` | `DependencyConfiguration` | a configuration for creating your project dependencies |
#### Returns
`Promise`<<V\>(...`keys`: [...V[]]) => `IntoDependencies`<`V`\>\>
#### Defined in
[src/core/ioc/base.ts:25](https://github.com/sern-handler/handler/blob/81cdde2/src/core/ioc/base.ts#L25)
___
### makePlugin
▸ **makePlugin**<`V`\>(`type`, `execute`): [`Plugin`](interfaces/Plugin.md)<`V`\>
#### Type parameters
| Name | Type |
| :------ | :------ |
| `V` | extends `unknown`[] |
#### Parameters
| Name | Type |
| :------ | :------ |
| `type` | [`PluginType`](enums/PluginType.md) |
| `execute` | (...`args`: `any`[]) => `any` |
#### Returns
[`Plugin`](interfaces/Plugin.md)<`V`\>
#### Defined in
[src/core/create-plugins.ts:5](https://github.com/sern-handler/handler/blob/81cdde2/src/core/create-plugins.ts#L5)
___
### single
▸ **single**<`T`\>(`cb`): () => `T`
@__PURE__
**`Since`**
2.0.0.
Creates a singleton object.
#### Type parameters
| Name |
| :------ |
| `T` |
#### Parameters
| Name | Type |
| :------ | :------ |
| `cb` | () => `T` |
#### Returns
`fn`
▸ (): `T`
##### Returns
`T`
#### Defined in
[src/core/ioc/dependency-injection.ts:12](https://github.com/sern-handler/handler/blob/81cdde2/src/core/ioc/dependency-injection.ts#L12)
___
### transient
▸ **transient**<`T`\>(`cb`): () => () => `T`
@__PURE__
**`Since`**
2.0.0
Creates a transient object
#### Type parameters
| Name |
| :------ |
| `T` |
#### Parameters
| Name | Type |
| :------ | :------ |
| `cb` | () => () => `T` |
#### Returns
`fn`
▸ (): () => `T`
##### Returns
`fn`
▸ (): `T`
##### Returns
`T`
#### Defined in
[src/core/ioc/dependency-injection.ts:22](https://github.com/sern-handler/handler/blob/81cdde2/src/core/ioc/dependency-injection.ts#L22)
___
### useContainerRaw
▸ **useContainerRaw**(): `CoreContainer`<`Partial`<`Dependencies`\>\>
Returns the underlying data structure holding all dependencies.
Exposes methods from iti
#### Returns
`CoreContainer`<`Partial`<`Dependencies`\>\>
#### Defined in
[src/core/ioc/base.ts:13](https://github.com/sern-handler/handler/blob/81cdde2/src/core/ioc/base.ts#L13)

View File

@@ -0,0 +1,62 @@
---
id: "Sern"
title: "Namespace: Sern"
sidebar_label: "Sern"
sidebar_position: 0
custom_edit_url: null
---
## Variables
### controller
`Const` **controller**: `Object`
**`Since`**
1.0.0
The object passed into every plugin to control a command's behavior
#### Type declaration
| Name | Type |
| :------ | :------ |
| `next` | () => `OkImpl`<`void`\> |
| `stop` | () => `ErrImpl`<`void`\> |
#### Defined in
[src/sern.ts:72](https://github.com/sern-handler/handler/blob/81cdde2/src/sern.ts#L72)
## Functions
### init
**init**(`maybeWrapper`): `void`
**`Since`**
1.0.0
**`Example`**
```ts title="src/index.ts"
Sern.init({
commands: 'dist/commands',
events: 'dist/events',
})
```
#### Parameters
| Name | Type |
| :------ | :------ |
| `maybeWrapper` | [`Wrapper`](../interfaces/Wrapper.md) \| ``"file"`` |
#### Returns
`void`
#### Defined in
[src/sern.ts:24](https://github.com/sern-handler/handler/blob/81cdde2/src/sern.ts#L24)

View File

@@ -0,0 +1,2 @@
label: "Namespaces"
position: 1

30
docs/cli/README.md Normal file
View File

@@ -0,0 +1,30 @@
# CLI
Publish commands to the API, install plugins, and use other tools provided by our cli.
The CLI is your pocketknife for discord bot development. It'll have all features necessary for developing and shipping to production.
```
Usage: sern [options] [command]
___ ___ _ __ _ __
/ __|/ _ \ '__| '_ \
\__ \ __/ | | | | |
|___/\___|_| |_| |_|
Welcome!
If you're new to sern, run npm create @sern/bot for an interactive setup to your new bot project!
If you have any ideas, suggestions, bug reports, kindly join our support server: https://sern.dev/discord
Options:
-v, --version output the version number
-h, --help display help for command
Commands:
init [options] Quickest way to scaffold a new project [DEPRECATED]
plugins [options] Install plugins from https://github.com/sern-handler/awesome-plugins
extra Easy way to add extra things in your sern project
commands Defacto way to manage your slash commands
help [command] display help for command
```

211
docs/cli/build.md Normal file
View File

@@ -0,0 +1,211 @@
```sh
Usage: sern build [options]
Build your bot
Options:
-f --format [fmt] The module system of your application. `cjs` or `esm` (default: "esm")
-m --mode [mode] the mode for sern to build in. `production` or `development` (default: "development")
-W --suppress-warnings suppress experimental warning
-p --project [filePath] build with this sern.build file
-h, --help display help for command
```
## Guiding Principles
When designing the `sern build` command, our aim was to make building bot applications as simple as possible for the majority of developers. The setup process has been streamlined, and most of the configuration details have been handled for you. Here are some key points to keep in mind:
1. **Minimal Configuration**: In the vast majority (99%) of use cases, developers do not need to configure the bot application building process. We believe that simplicity is key, so only a few decisions need to be made on the developer's end.
2. **Optimal Defaults**: We've chosen sensible defaults. This means you can get started without getting bogged down by complex, unneeded configurations.
3. **Finetuned for production bots**: Our CLI leverages an opinionated build solution powered by esbuild. This ensures that bots are built without issues and can be shipped easily.
## Experimental Features
Both the `sern build` and `sern publish` commands are marked as experimental. While they might not be completely stable, they are designed to work for the majority of users. We appreciate any feedback in helping us make these features even better.
## Features
The `sern build` command comes equipped with a range of features designed to enhance your development process. Here's a glimpse of what it offers:
- **esbuild Integration**: our CLI takes inspiration from the efficiency of SvelteKit, ensuring your bot application is built effectively and with type safety. Leverage the [esbuild plugin ecosystem](https://github.com/esbuild/community-plugins).
- **Zero Configuration**: Building your bot application without additional configuration. The CLI handles most of the setup for you.
- **Experimental Image Support**: We've introduced experimental support for top-level imports of PNG and JPG files, making it easier to include images in your bot application.
- **Compile Time Constants**: Customize your build with constants such as \_\_DEV\_\_, \_\_PROD\_\_, allowing you to tailor your application to different production stages.
- **Development and Production Modes**: The CLI supports both development and production modes, enabling you to tailor your bot application for different stages of development.
- **Type-safe `process.env`**: The CLI generates a type-safe `process.env`, reducing potential errors.
## Implicits
- command line arguments take precendence over sern.build configuration file
- default build format is ESM
- defineVersion = true
- __DEV__ AND __PROD__ constants are configured.
- only a [few tsconfig options](https://esbuild.github.io/content-types/#tsconfig-json) are respected.
### sern.build.js
- For any extra configuration you may need
- the cli was intentionally made to be installed globally, and we can't provide typings at a project level. If you need typings, here they are:
```ts
type BuildOptions = {
/**
* Define __VERSION__
* This option is a quick switch to defining the __VERSION__ constant which will be a string of the version provided in
* cwd's package.json
*/
defineVersion?: boolean
/**
* default = esm
*/
format?: 'cjs' | 'esm'
/**
* extra esbuild plugins to build with sern.
*/
esbuildPlugins?: esbuild.Plugin[]
/**
* https://esbuild.github.io/api/#drop-labels
**/
dropLabels?: string[]
/**
* https://esbuild.github.io/api/#define
**/
define?: Record<string, string>
/**
* Path to tsconfig
**/
tsconfig?: string;
/**
* default = 'development'
*/
mode: 'production' | 'development',
/**
* will search for env file. If none exists,
* default to .env.
*/
env?: string
}
```
## Usage
```
sern build
```
(that was easy)
## Adapting older projects
- Change your tsconfig.json to extend our generated one.
```json
{
// highlight-start
"extends": "./.sern/tsconfig.json",
// highlight-end
"compilerOptions" : {
//all of your old fields
}
}
```
## In depth
We use the `define` and `drop labels` api in C style macros to have easy development stage differences.
[Here](https://esbuild.github.io/api/#drop-labels) is the esbuild full API documentation
### drop labels
```sh
# mode is set to production
sern build
```
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
<Tabs>
<TabItem value="input" label="Input">
```ts
__DEV__: console.log('This is for production only')
__PROD__: console.log('This is for either mode')
```
</TabItem>
<TabItem value="sh" label="Running build for production">
```sh
# mode is set to production
sern build
```
</TabItem>
<TabItem value="output" label="Output">
```ts
__PROD__ console.log('This is for either mode')
```
</TabItem>
</Tabs>
### constants
sern builds with three default constants. \_\_DEV\_\_, \_\_PROD\_\_, \_\_VERSION\_\_.
<Tabs>
<TabItem value="input" label="Preprocess">
```sh
sern build
```
</TabItem>
<TabItem value="sh" label="Constants available and typesafe!">
```ts
if(__PROD__) {
console.log('Bot version: ' + __VERSION__)
}
```
</TabItem>
</Tabs>
Full esbuild documentation [here](https://esbuild.github.io/api/#define)
Add more to the `define` field in build options (only availible with a `sern.build` file at the moment.
### process.env
We generate your process.env with `dotenv` and generate typings for process.env. Less hassle!
<Tabs>
<TabItem value="input" label=".env">
```sh
DISCORD_TOKEN=<your token>
```
```ts
process.env.DISCORD_TOKEN // string | undefined (not typesafe :()
```
</TabItem>
<TabItem value="sh" label="sern build">
```sh
sern build
```
```ts
process.env.DISCORD_TOKEN // string (typesafe :))
```
</TabItem>
</Tabs>

11
docs/cli/extra.md Normal file
View File

@@ -0,0 +1,11 @@
```sh
Usage: sern extra [options]
Easy way to add extra things in your sern project
Options:
-h, --help display help for command
```
This command is pretty straightfoward. Install utilities into your application. Assumes you have a sern.config.json.

91
docs/cli/publish.md Normal file
View File

@@ -0,0 +1,91 @@
```sh
Usage: sern commands publish [options] [path]
New way to manage your slash commands
Arguments:
path path with respect to current working directory that will locate all published files
Options:
-i, --import [scriptPath...] Prerequire a script to load into publisher
-t, --token [token]
--appId [applicationId]
-h, --help display help for command
```
## Implicits
- Automatically reads a .env in the working directory. For seamless integration, your .env file should look like this:
```txt title=".env"
DISCORD_TOKEN=<YOUR_TOKEN>
APPLICATION_ID=<YOUR_APPLICATION_ID>
MODE=<DEV|PROD>
```
- Calls the discord API with the [PUT route](https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands). Wherever your commands directory is located, publish will override the existing application commands at Discord. Existing commands do not count towards the command limit creation daily.
You may pass these in as command line arguments as well. **CLI arguments take precedence.**
If you do not know how to obtain either of these credentials, [click here](https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token)
## Usage
![usage](../../static/img/Code_-_Insiders_2kTVzm0uIQ.gif)
## Features
- Automatically syncs api with your command base
- generates JSON file of output (**.sern/command-data-remote.json**)
- supports publishing direct esm typescript files
- commonjs users need to compile first and then run sern publish on the dist/ output
- prerequire scripts.
- supports a configuration that is the same as the original publish plugin.
Each command file can have an extra config that follows this typescript interface:
PermissionResolvable is a discord.js type, but it will accept anything that the discord API accepts
```ts
interface ValidPublishOptions {
guildIds: string[];
dmPermission: boolean;
defaultMemberPermissions: PermissionResolvable;
}
```
## Prerequiring
Is there a [service](../guide/walkthrough/services) that is required at the top level of a command?
- Create an ES6 script anywhere:
```ts title="scripts/prerequire.mjs"
import { makeDependencies, single } from '@sern/handler'
import { Client } from 'discord.js'
await makeDependencies({
root => root.add({ '@sern/client': single(() => new Client(...options) }))
})
await Service('@sern/client').login()
```
This will create a container for publishing. (as of 0.6.0, client is required or this will crash)
### Example: command published in guild
#### Script ran:
```
sern commands publish -i ./scripts/prerequire.mjs
```
```ts title=src/commands/ping.ts
import { commandModule, Service, CommandType } from '@sern/handler'
const client = Service('@sern/client');
export const config = {
guildIds: ["889026545715400705"]
}
export default commandModule( {
type: CommandType.Slash
description: `${client.user.username}'s ping`,
execute: (ctx) => {
ctx.reply('pong')
}
})
```

0
docs/guide/.nojekyll Normal file
View File

30
docs/guide/README.md Normal file
View File

@@ -0,0 +1,30 @@
# Introduction
Welcome to our official guide. This guide will go through all the core features of the framework.
- 💖 Thank you for choosing sern to be your framework!
- Teaching the discord.js library and / or Javascript / Typescript is out of scope of this project, so the documentation assumes you already know these elements.
- [discord.js](https://discord.js.org/#/)
- [javascript](https://nodejs.dev/en/learn/)
- [typescript](https://www.typescriptlang.org/docs/)
- discord.js v14 is the only supported library at the moment
## You will learn
* [sern's goal](walkthrough/goal.md)
* How to use sern with the [CLI](walkthrough/cli.md)
* [Your first command](walkthrough/first-command.md)
* [The Context class](walkthrough/first-command.md#context-class)
* [Autocomplete](walkthrough/autocomplete.md)
* [Services](walkthrough/services.md)
* [dependency injection](walkthrough/dependency-injection.md)
### Working with plugins
* [Plugins](walkthrough/plugins.md)
- [Init Plugins](walkthrough/plugins.md#command-plugins)
- [Control Plugins](walkthrough/plugins.md#event-plugins)
### Events
* [The SernEmitter class](walkthrough/sern-emitter.md)
* [Your first event](walkthrough/first-event.md)
### Good to know
* [sern.config.json](walkthrough/good-to-know.md)

Some files were not shown because too many files have changed in this diff Show More