205 Commits

Author SHA1 Message Date
Jacob Nguyen
3e3cc36ec8 Update error-handling.mdx 2025-01-18 13:32:32 -06:00
Jacob Nguyen
54d269375c Merge pull request #77 from sern-handler/jacoobes-patch-2
Update error-handling.mdx
2025-01-18 12:51:53 -06:00
Jacob Nguyen
663410eaed Update plugins.mdx 2025-01-18 12:51:42 -06:00
Jacob Nguyen
515d2ced78 Update error-handling.mdx 2025-01-18 12:49:19 -06:00
Jacob Nguyen
8e9d895d1a Update error-handling.mdx 2025-01-15 19:41:40 -06:00
Jacob Nguyen
5055daac9b fa
Some checks failed
Deploy to GitHub Pages / Deploy to GitHub Pages (push) Has been cancelled
2025-01-14 23:19:52 -06:00
Jacob Nguyen
1da3e57866 sdf 2025-01-14 23:14:36 -06:00
Jacob Nguyen
9d2c3f6582 Update error-handling.mdx
Some checks failed
Deploy to GitHub Pages / Deploy to GitHub Pages (push) Has been cancelled
2025-01-13 10:33:10 -06:00
Jacob Nguyen
d5cee30e4f Merge pull request #76 from sern-handler/error-handling-ref
Some checks are pending
Deploy to GitHub Pages / Deploy to GitHub Pages (push) Waiting to run
errrefguide
2025-01-12 22:43:37 -06:00
Jacob Nguyen
daabc51b93 b 2025-01-12 22:43:16 -06:00
Jacob Nguyen
3abe33b75d fk 2025-01-12 22:37:09 -06:00
Jacob Nguyen
cafecdc532 polish 2025-01-12 22:32:05 -06:00
Jacob Nguyen
b4284e4d1a errrefguide 2025-01-12 22:25:50 -06:00
Jacob Nguyen
21f70725bb Merge pull request #75 from sern-handler/jacoobes-patch-1
Update setup.ts
2025-01-12 21:53:32 -06:00
Jacob Nguyen
bdedc81993 Update setup.ts 2025-01-12 19:41:38 -06:00
Jacob Nguyen
c3c16be90f Update setup.ts 2025-01-12 12:42:49 -06:00
Duro
d16c8f7e64 fix: fix modules link 2024-10-01 16:40:21 -04:00
Jacob Nguyen
a8118c58dc Update modules.mdx 2024-10-01 12:55:40 -05:00
34864fecea fix: bulding in general 2024-07-27 01:41:53 +02:00
Jacob Nguyen
29d61f7b0e Merge pull request #72 from Peter-MJ-Parker/patch-4
tip for new users
2024-07-21 20:02:24 -05:00
Peter-MJ-Parker
9e17b952b5 tip for new users
I've seen where users ran the script in a new folder then forgot to cd into `project` folder twice to run project commands. So this is a nice friendly tip for the end user.
2024-07-21 19:13:11 -05:00
cca08b8812 chore: chaneg analytics endpoint 2024-07-20 13:07:50 +02:00
Jacob Nguyen
aaff2a0c49 Merge pull request #71 from LolzTheDev/patch-2
make tasks docs more user friendly
2024-07-19 20:19:25 -05:00
LolzTheDev
b016cf1665 fix tip 2024-07-19 20:15:51 -05:00
LolzTheDev
4542c9263d add task kill method 2024-07-19 19:36:12 -05:00
LolzTheDev
74ee21ffc6 make tasks more user friendly
fix up anything that is wrong pls lol 🙏
2024-07-19 19:32:17 -05:00
2bfe4bc6c1 ci: use @sernbot on lunaria 2024-07-20 00:31:10 +02:00
Jacob Nguyen
57fdb2ba6c Merge pull request #70 from Peter-MJ-Parker/patch-3
edit: params is for MessageComponents
2024-07-19 17:29:46 -05:00
Peter-MJ-Parker
28c2a3d29f edit: params is for MessageComponents
Just to note what the params is.
*params* are for message components dynamic custom ids. When you have a command that returns multiple message components like buttons or menus or modals and your customId starts with `id/arg`, you can use one commandModule rather than multiples to control what each one does.
2024-07-19 17:20:10 -05:00
9dcc8d587d feat: analytics 2024-07-19 22:04:27 +02:00
4f4a28e9d5 ci: workflow dispatch github pages 2024-07-19 15:47:25 +02:00
Jacob Nguyen
ddf443f51e Update tasks.mdx 2024-07-18 21:01:07 -05:00
Jacob Nguyen
d6a3ddc48f fix admonition 2024-07-18 16:54:44 -05:00
Jacob Nguyen
8d7d356bd5 Merge branch 'main' of https://github.com/sern-handler/website 2024-07-18 16:51:10 -05:00
Jacob Nguyen
15d6008ba3 more config 2024-07-18 16:50:58 -05:00
DuroCodes
3a3370b635 fix: change astro site in config 2024-07-18 17:30:12 -04:00
Jacob Nguyen
0ac2b02e24 an otehr try 2024-07-18 16:16:16 -05:00
Jacob Nguyen
6329c6802a deploy again 2024-07-18 16:13:59 -05:00
Jacob Nguyen
2d1f133bca Merge branch 'DuroCodes-main' 2024-07-18 16:05:11 -05:00
Jacob Nguyen
d25c1ed4ac merge 2024-07-18 16:04:46 -05:00
Jacob Nguyen
b4a95d374f Merge pull request #69 from LolzTheDev/patch-1
fix syntax mistake
2024-07-18 11:45:58 -05:00
LolzTheDev
fbd5688aa8 fix syntax mistake
unclosed bracket (`ownerOnly` takes a string array afaik)
2024-07-18 11:43:03 -05:00
DuroCodes
1687538a71 fix: fix capitalization of Event Modules in v4/reference/modules.mdx 2024-07-17 17:23:40 -04:00
DuroCodes
1f6bd9f315 fix: fix invalid links on config.mdx page 2024-07-17 15:15:19 -04:00
jacob
134ac19836 yeaaaaa 2024-07-17 00:12:35 -05:00
jacob
3fa02ec79a add config and tasks (almost done) 2024-07-17 00:09:49 -05:00
jacob
a1955894ee Again 2024-07-16 23:49:45 -05:00
jacob
1ee9099ede add more docs 2024-07-16 23:32:06 -05:00
jacob
d85822601d yea again 2024-07-01 21:27:52 -05:00
jacob
3ed7e3fefd add publish transition help 2024-07-01 21:19:41 -05:00
DuroCodes
85b93e01cf fix: make v4 sidebar preferred 2024-07-01 15:28:50 -04:00
DuroCodes
00e63c260f fix: fix railway-deploy blog post link 2024-06-29 12:42:20 -04:00
92fccd1e63 chore: remove getting started blog guide
it's just too outdated
2024-06-29 12:16:49 +02:00
DuroCodes
8e7dfd7a7e fix: fix lunaria 2024-06-27 22:30:07 -04:00
Jacob Nguyen
b5dc4f4cb1 update docs 2024-06-22 14:59:58 -05:00
DuroCodes
df7616482b fix: whoops forgot to change the postinstall script 2024-06-20 23:16:01 -04:00
DuroCodes
c4f0c16b36 fix:change setup.mjs back into a setup.ts since that wasnt the issue 2024-06-20 22:46:57 -04:00
DuroCodes
c1542d8346 fix: add tools to tsconfig ignore 2024-06-20 22:44:27 -04:00
DuroCodes
9077a640c0 fix: change setup.ts -> setup.mjs 2024-06-20 22:42:38 -04:00
DuroCodes
7ea8d0bcfe fix: fix cloning tools from git 2024-06-20 22:39:59 -04:00
DuroCodes
68ee39407b fix: fix delay and width on carousel 2024-06-16 17:15:28 -04:00
Jacob Nguyen
f6b3fd038b temp broken link until publisher is on website 2024-06-14 20:25:41 -05:00
DuroCodes
2349813860 refactor: remove useless class 2024-06-11 18:34:02 -04:00
DuroCodes
0deed60247 feat: make bot showcase shuffled 2024-06-11 18:32:25 -04:00
DuroCodes
30137eafaf feat: add shadcn + react and community showcase carousel 2024-06-11 18:28:11 -04:00
Jacob Nguyen
3dc5b74cbe slogan found 2024-06-11 12:58:48 -05:00
Jacob Nguyen
c93e38fe6c fix line placement 2024-06-11 11:04:50 -05:00
Jacob Nguyen
27d3feab67 add more to reference 2024-06-11 10:55:31 -05:00
DuroCodes
5678001351 refactor: refactor StarlightMultiSidebarSelect event listener 2024-06-11 00:02:09 -04:00
DuroCodes
966a5b5727 fix: remove unnecessary else 2024-06-11 00:00:11 -04:00
DuroCodes
3907687e2b fix: remove bunx degit ... so it builds 2024-06-10 23:59:15 -04:00
DuroCodes
e540a14dd9 fix: fix setup for tools documentation 2024-06-10 23:53:35 -04:00
DuroCodes
c13abec8e0 fix: await bun shell call for tools in setup.mjs 2024-06-10 23:50:17 -04:00
Jacob Nguyen
7309c321ea dsfds 2024-06-10 20:51:11 -05:00
Jacob Nguyen
95e79d3969 disclaimer for cli publish and more docs 2024-06-10 20:35:24 -05:00
Jacob Nguyen
e1a0d47153 fix new stuff 2024-06-08 00:48:54 -05:00
Jacob Nguyen
b9aa726564 update api for v4 changes 2024-06-08 00:37:39 -05:00
Jacob Nguyen
58509a86ce gen tools docs 2024-06-07 20:27:07 -05:00
DuroCodes
b2d44cf58e fix: remove APPLICATION_ID from clear CLI pages 2024-06-05 23:49:52 -04:00
DuroCodes
2a086abb09 fix: update typedoc plugin 2024-06-05 02:12:15 -04:00
Jacob Nguyen
85ecc72418 making website look better 2024-06-03 00:02:18 -05:00
Jacob Nguyen
2e769800dd doc update 2024-05-31 00:52:52 -05:00
Jacob Nguyen
b524fa7008 sdfsd 2024-05-27 16:01:45 -05:00
Jacob Nguyen
fb736be2d2 fix links 2024-05-27 15:24:32 -05:00
Jacob Nguyen
5abf123935 nice ref 2024-05-27 15:20:07 -05:00
DuroCodes
ee8d2b3960 fix: add sern-handler to tsconfig excludes 2024-05-27 15:58:06 -04:00
DuroCodes
05838646ca fix: don't remove .git 2024-05-27 15:57:37 -04:00
DuroCodes
591f7ba61f fix: change tsconfig.json to exclude sern-handler cloned repos 2024-05-27 15:49:07 -04:00
DuroCodes
9c193b14c8 fix: fix gitignore to not make submodules 2024-05-27 15:47:08 -04:00
DuroCodes
1d05d9a29b fix: remove sern-handler folders 2024-05-27 15:46:54 -04:00
DuroCodes
b33e3ddb8c fix: remove .git from cloned repos for typedoc 2024-05-27 15:38:57 -04:00
DuroCodes
0b28832000 feat: add v4 api docs 2024-05-27 15:32:33 -04:00
DuroCodes
ead095ba61 fix: fix link validation glob 2024-05-27 10:51:21 -04:00
DuroCodes
ae0f356f78 fix: update link validation for glob support 2024-05-27 10:02:43 -04:00
Jacob Nguyen
92435fd3cf add more reference 2024-05-27 01:23:44 -05:00
DuroCodes
01a5a70c3f fix: fix CLI on sidebar 2024-05-25 21:31:58 -04:00
DuroCodes
5ac909e1aa feat: add og image generation 2024-05-25 17:34:13 -04:00
jacob
79cbe92934 onemoreupdate 2024-05-25 15:50:03 -05:00
jacob
1a029fdc23 more consumable 2024-05-25 15:17:17 -05:00
jacob
184e56486e presence snippet 2024-05-25 15:11:01 -05:00
DuroCodes
761579a09c feat: add VALIDATE_LINKS env argument 2024-05-25 03:01:17 -04:00
DuroCodes
b3b98676c4 fix: fix link validation 2024-05-24 17:50:31 -04:00
DuroCodes
1c6c0f8ec5 feat: add link validation & fix broken/relative links 2024-05-24 17:31:00 -04:00
DuroCodes
8b177a8f40 feat: change sidebar to use dropdown rather than tabs 2024-05-24 16:52:21 -04:00
DuroCodes
e5efba21db feat: add icon to PackageManagers 2024-05-24 15:02:42 -04:00
DuroCodes
50c086e6ec style: rename component to match other overrides 2024-05-24 11:02:59 -04:00
Jacob Nguyen
a055d098eb modal/module example 2024-05-24 01:29:52 -05:00
DuroCodes
bec379b882 chore: update astro 2024-05-23 21:59:46 -04:00
DuroGFX
1c0ef3b273 fix: fix CLI sidebar section & add CLI to v4 2024-05-23 01:02:50 +00:00
Duro
e43df2f5a7 fix: fix sidebar for blog pages 2024-05-22 20:15:07 -04:00
Jacob Nguyen
812788e610 v4 docs update 2024-05-22 18:50:01 -05:00
DuroCodes
ad25263a7d fix: change pages to .mdx so lunaria doesn't track api docs 2024-05-14 21:07:39 -04:00
DuroCodes
6de5b4c7a6 fix: fix api docs path 2024-05-14 21:06:27 -04:00
DuroCodes
55715a2a84 fix: remove src/content/api api docs 2024-05-14 21:02:47 -04:00
DuroCodes
f43a51c7b1 feat: add i18n support 2024-05-14 20:53:47 -04:00
DuroCodes
441af2e4aa fix: fix maybeWrapper parameter for Sern#init page 2024-05-14 18:13:57 -04:00
DuroCodes
96e71610ad refactor: move typedoc script into setup.mjs 2024-05-14 17:12:42 -04:00
DuroCodes
deec96d45d feat: make important files highlighted when using FileTree 2024-05-14 12:47:50 -04:00
DuroCodes
136a8f4f43 fix: fix consts import in astro config 2024-05-14 12:45:48 -04:00
DuroCodes
bc59a4ae9b fix: change logo to png instead of svg, fix favicon svg to be an actual vector 2024-05-13 22:02:46 -04:00
DuroCodes
f581fb260d refactor: extract constants into consts.ts, add prettier tailwind plugin for class sorting 2024-05-13 20:03:29 -04:00
DuroCodes
fdf1d78c92 fix: re-add width to sidebar inputs 2024-05-13 19:42:00 -04:00
DuroCodes
09b55ae035 style: more tailwind reformatting 2024-05-13 14:16:02 -04:00
DuroCodes
397f028c9f refactor: sort tailwind classes 2024-05-13 14:09:08 -04:00
DuroCodes
128b32b261 fix: fix mobile sidebar hopefully? 2024-05-11 15:35:11 -04:00
DuroCodes
301e60a0ef fix: fix sidebar on mobile by adding size: 100%? 2024-05-11 15:20:08 -04:00
DuroCodes
f044bf3819 feat: add Generated badge to API docs 2024-05-11 15:18:40 -04:00
DuroCodes
93772f5b84 fix: add width to sidebar to hopefully fix mobile? 2024-05-11 15:13:06 -04:00
DuroCodes
a441e57439 feat: add tabs for v3/v4 2024-05-10 14:42:21 -04:00
DuroCodes
a2fc1f66c0 fix: fix mobile nav menu width 2024-05-10 13:34:00 -04:00
DuroCodes
39f5be584e feat: update CLI docs 2024-05-09 13:02:03 -04:00
DuroCodes
2513e3e233 fix: fix icon color in SiteTitle mobile navbar 2024-05-09 12:19:17 -04:00
DuroCodes
c83dbf2f94 fix: fix sern.config.json link in CLI page 2024-05-09 12:18:31 -04:00
DuroCodes
e6ffca3bc8 feat: add lastUpdated, use path aliases 2024-05-09 12:14:12 -04:00
DuroCodes
529e6fccf5 refactor: change how images are imported in markdown 2024-05-09 11:58:40 -04:00
DuroCodes
40a2e39fc8 feat: rewrite most of the docs pages 2024-05-08 23:58:28 -04:00
DuroCodes
b6c9174230 fix: fix Menu not having arrow on mobile 2024-05-08 21:51:47 -04:00
DuroCodes
b0f713b312 fix: fix images on prod build, add src path alias 2024-05-08 21:20:54 -04:00
Jacob Nguyen
46f0d12e87 Update cli.md 2024-05-08 19:45:05 -05:00
DuroCodes
ff5c732ecf fix: fix duplicate search results for blog 2024-05-08 19:13:35 -04:00
DuroCodes
c5a80836be refactor: move types into seperate file, add zodFetch 2024-05-08 13:37:10 -04:00
DuroCodes
6ff3328990 fix: remove useless + '' 2024-05-07 17:03:34 -04:00
DuroCodes
9780e9349b feat: add DISCORD_URL constant 2024-05-07 17:02:44 -04:00
DuroCodes
01164761a9 feat: add link/hover to sponsors card, add BASE_URL 2024-05-07 17:00:07 -04:00
DuroCodes
2529e1c9c2 fix: fix link & change "Docs" link to "goal" page instead of "New Project" 2024-05-07 16:48:19 -04:00
DuroCodes
fd4fd9ee03 feat: add 'edit page' to docs 2024-05-07 16:45:50 -04:00
DuroCodes
54c49c239a feat: move nav links (Plugins/Sponsors/Blog) to SiteTitle for Mobile 2024-05-07 16:42:24 -04:00
3955337bee Revert "starlight rewrite" (#65)
This reverts commit f6f60dee0d.
2024-05-07 16:25:00 +02:00
Duro
f6f60dee0d starlight rewrite (#64)
* feat: migrate to starlight

* fix: add .gitignore

* fix: delete node_modules directory

* chore: update lockfile

* fix: remove .DS_STORE files

* feat: add github pages workflow

* feat: add netlify.toml, remove unneeded import on sponsors page

* fix: fix netlify publish directory

* fix: add .nvmrc

* fix: add checking for typedoc file

* fix: fix github pages script `bun build` -> `bun run build`

* fix: fix publish_dir in github pages workflow

* feat: add custom Head file for open-graph

* fix: hopefully fix deploying

* fix: fix git repo path

* fix: maybe fix build?

* fix: maybe fix build idk at this point

* fix: this should fix typedoc but it's throwing errors for no reason

* fix: my disappointment is immeasurable and my day is ruined

* fix: make API docs collapsed by default

* fix: remove sern-handler before git clone

* fix: fix og:image for sern by adding sern-logo to public folder

* fix: fix image path i think

* fix: fix services tabs

* on push no branch (for testing)

* also add workflow dispatch

* move to automata pushing & change back the branch rule

* remove sern capitalization

---------

Co-authored-by: Izan Gil <66965250+SrIzan10@users.noreply.github.com>
2024-05-07 16:12:29 +02:00
5b6f7c4647 remove sern capitalization 2024-05-07 15:53:14 +02:00
5c998e8505 move to automata pushing & change back the branch rule 2024-05-07 07:50:20 +02:00
b03ff6a2be also add workflow dispatch 2024-05-07 07:41:37 +02:00
e217af622e on push no branch (for testing) 2024-05-07 07:40:19 +02:00
DuroCodes
90f1dd6d41 fix: fix services tabs 2024-05-06 23:41:30 -04:00
DuroCodes
bfee22f66d fix: fix image path i think 2024-05-06 23:34:07 -04:00
DuroCodes
efd1bb09a5 fix: fix og:image for sern by adding sern-logo to public folder 2024-05-06 23:27:48 -04:00
DuroCodes
af9e70c515 fix: remove sern-handler before git clone 2024-05-06 23:21:41 -04:00
DuroCodes
6d3b0163e4 fix: make API docs collapsed by default 2024-05-06 23:18:32 -04:00
DuroCodes
afc48eae3c fix: my disappointment is immeasurable and my day is ruined 2024-05-06 23:15:39 -04:00
DuroCodes
85341b03d6 fix: this should fix typedoc but it's throwing errors for no reason 2024-05-06 22:54:27 -04:00
DuroCodes
7e389c8efa fix: maybe fix build idk at this point 2024-05-06 22:49:30 -04:00
DuroCodes
d97855e5dd fix: maybe fix build? 2024-05-06 22:43:12 -04:00
DuroCodes
03aa453f63 fix: fix git repo path 2024-05-06 22:37:27 -04:00
DuroCodes
e25146788b fix: hopefully fix deploying 2024-05-06 22:36:23 -04:00
DuroCodes
4d00dabc55 feat: add custom Head file for open-graph 2024-05-06 21:31:03 -04:00
DuroCodes
2081a2d63a fix: fix publish_dir in github pages workflow 2024-05-06 21:28:30 -04:00
DuroCodes
5f574edd6f fix: fix github pages script bun build -> bun run build 2024-05-06 21:26:59 -04:00
DuroCodes
71feb7e9c3 fix: add checking for typedoc file 2024-05-06 21:26:17 -04:00
DuroCodes
a229f2cc6d fix: add .nvmrc 2024-05-06 21:16:59 -04:00
DuroCodes
ebf13ede37 fix: fix netlify publish directory 2024-05-06 21:12:53 -04:00
DuroCodes
c3cb994eae feat: add netlify.toml, remove unneeded import on sponsors page 2024-05-06 21:09:19 -04:00
DuroCodes
54943e37aa feat: add github pages workflow 2024-05-06 21:07:08 -04:00
DuroCodes
b29faf80ea fix: remove .DS_STORE files 2024-05-06 21:01:23 -04:00
DuroCodes
b850f7d25a chore: update lockfile 2024-05-06 17:18:18 -04:00
Duro
ee2066632e fix: delete node_modules directory 2024-05-06 17:17:40 -04:00
DuroCodes
5bae733dff fix: add .gitignore 2024-05-06 17:16:41 -04:00
DuroCodes
bb190f2d81 feat: migrate to starlight 2024-05-06 17:15:30 -04:00
sernbot
767acedea7 docs: Update API section 2024-05-05 19:29:58 +00:00
Jacob Nguyen
1c3a1c5587 Merge pull request #63 from DuroCodes/main
Plugin Card Aligning
2024-04-27 16:20:46 -05:00
DuroCodes
24e7497555 fix: fix plugin card aligning 2024-04-27 17:14:24 -04:00
Jacob Nguyen
63ba2ac1e0 Merge pull request #62 from sern-handler/feat/pluginPage
feat: plugin page
2024-04-27 13:48:37 -05:00
71f4a22c0c add plugin description to modal 2024-04-27 20:43:10 +02:00
db15c21617 limit description characters to 100 2024-04-27 20:40:01 +02:00
33932ee255 copilot leak 2024-04-27 20:23:11 +02:00
5d04413dbe wow such feature 2024-04-27 20:19:22 +02:00
Jacob Nguyen
b6c2a3c92e Merge pull request #57 from sern-handler/feat/sponsorpage
Sponsor page
2024-04-21 13:43:54 -05:00
aba602380d add simple loading icon 2024-04-18 21:02:21 +02:00
aebc4fd49c initial built from the ground up page done 2024-04-18 20:04:29 +02:00
Jacob Nguyen
48423d7a89 ya 2024-04-09 18:37:36 -05:00
Jacob Nguyen
83d3877102 Merge pull request #56 from caffeinatedcharlie/main
docs: correct the Discord redirect inside of new-project.md
2024-04-07 08:59:49 -05:00
caffeinatedcharlie
e2ffc93116 docs: correct the Discord redirect inside of new-project.md
the new-project.md Discord link is https://sern.dev.discord not https://sern.dev/discord
2024-04-07 09:36:05 +01:00
78be0a3faa fix: change package name because of automata monorepo stuff 2024-03-24 21:25:38 +01:00
Jacob Nguyen
208061040f docusaurus v3 (#55) 2024-03-15 17:39:32 +01:00
Jacob Nguyen
71735a778e Merge pull request #54 from DuroCodes/main
Add category files, fix some capitalization, and add new blog post
2024-03-15 11:09:12 -05:00
sern bot
23ed21fbf7 chore: update api documentation 2024-03-09 14:30:19 +00:00
DuroCodes
62ebeec1d9 fix: maybe fix sidebar? idk it works fine for me now 2024-02-24 13:19:19 -05:00
DuroCodes
7821e065e6 fix: update docgen config, lowercase "sern" 2024-02-24 12:50:24 -05:00
DuroCodes
bc9c900197 feat: add _category_.json files, add railway deploy post, change blogSidebarCount in docusaurus config, fix capitalization 2024-02-23 07:53:25 -05:00
Jacob Nguyen
d14ca62954 Merge pull request #46 from sern-handler/fix/publish
fix: add missing documentation
2024-02-12 12:56:43 -06:00
Jacob Nguyen
7dd24d8a6e Merge pull request #52 from sern-handler/feat/clear
clear
2024-01-27 23:46:18 -06:00
Jacob Nguyen
1e14ce2a76 Merge pull request #51 from DuroCodes/patch-1
fix: fix broken link on dependency injection page
2024-01-12 00:43:09 -06:00
Duro
6907748dbf fix: fix broken link on dependency injection page 2024-01-11 22:32:45 -05:00
jacob
6fb9c98a47 more info 2023-09-25 11:00:45 -05:00
jacob
c7a06a0779 more info 2023-09-25 11:00:06 -05:00
jacob
a48f96841a fix: add missing documentation 2023-09-24 18:36:48 -05:00
374 changed files with 14333 additions and 21964 deletions

View File

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

31
.github/workflows/github-pages.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
name: Deploy to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install Dependencies
run: bun install
- name: Build
run: bun run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.AUTOMATA_TOKEN }}
publish_dir: ./dist
user_name: sernbot
user_email: ${{ secrets.AUTOMATA_EMAIL }}

34
.github/workflows/lunaria.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: Lunaria
on:
pull_request_target:
types: [opened, synchronize]
branches: [main]
permissions:
contents: read
pull-requests: write
jobs:
lunaria-overview:
name: Generate Lunaria Overview
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install Dependencies
run: bun install
- name: Generate Lunaria Overview
uses: yanthomasdev/lunaria-action@main
with:
token: ${{ secrets.AUTOMATA_TOKEN }}

34
.gitignore vendored
View File

@@ -1,20 +1,24 @@
# Dependencies
/node_modules
# build output
dist/
# generated types
.astro/
# Production
/build
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
# dependencies
node_modules/
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# environment variables
.env
.env.production
# macOS-specific files
.DS_Store
sern-handler-*
/tools/

131
.idea/workspace.xml generated
View File

@@ -4,56 +4,8 @@
<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 default="true" id="53dd69d3-e01a-4656-b414-c727f5aa549a" name="Changes" comment="limit description characters to 100">
<change beforePath="$PROJECT_DIR$/src/pages/index.module.css" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/index.module.css" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -91,26 +43,35 @@
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 5
}</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 name="PropertiesComponent"><![CDATA[{
"keyToString": {
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
"Git.Branch.Popup.ShowAllRemotes": "true",
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"WebServerToolWindowFactoryState": "false",
"git-widget-placeholder": "feat/pluginPage",
"kotlin-language-version-configured": "true",
"last_opened_file_path": "C:/Users/jacob/OneDrive/Desktop/Projects/sern/website",
"node.js.detected.package.eslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"project.structure.last.edited": "Modules",
"project.structure.proportion": "0.0",
"project.structure.side.proportion": "0.0",
"ts.external.directory.path": "/home/srizan/Documents/Development/sern-website/node_modules/typescript/lib",
"vue.rearranger.settings.migration": "true"
}
}</component>
}]]></component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="C:\Users\jacob\IdeaProjects\website\static\img" />
@@ -182,6 +143,8 @@
<workItem from="1671119393024" duration="3889000" />
<workItem from="1673974979200" duration="2385000" />
<workItem from="1674757791435" duration="925000" />
<workItem from="1713448008567" duration="8323000" />
<workItem from="1714235989637" duration="2619000" />
</task>
<task id="LOCAL-00001" summary="feat: remove old index.html in static/">
<created>1660418841831</created>
@@ -372,7 +335,31 @@
<option name="project" value="LOCAL" />
<updated>1673976828238</updated>
</task>
<option name="localTasksCounter" value="28" />
<task id="LOCAL-00028" summary="initial built from the ground up page done">
<option name="closed" value="true" />
<created>1713463473768</created>
<option name="number" value="00028" />
<option name="presentableId" value="LOCAL-00028" />
<option name="project" value="LOCAL" />
<updated>1713463473768</updated>
</task>
<task id="LOCAL-00029" summary="copilot leak">
<option name="closed" value="true" />
<created>1714242192383</created>
<option name="number" value="00029" />
<option name="presentableId" value="LOCAL-00029" />
<option name="project" value="LOCAL" />
<updated>1714242192383</updated>
</task>
<task id="LOCAL-00030" summary="limit description characters to 100">
<option name="closed" value="true" />
<created>1714243202496</created>
<option name="number" value="00030" />
<option name="presentableId" value="LOCAL-00030" />
<option name="project" value="LOCAL" />
<updated>1714243202496</updated>
</task>
<option name="localTasksCounter" value="31" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@@ -390,10 +377,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="feat: remove old index.html in static/" />
<MESSAGE value="feat: edit action" />
<MESSAGE value="feat: delete needless assets/dir" />
<MESSAGE value="feat: action changes and edit link" />
<MESSAGE value="feat: add favicon" />
<MESSAGE value="fix: broken link" />
<MESSAGE value="chore: edit link so no new windows" />
@@ -415,6 +398,14 @@
<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" />
<MESSAGE value="initial built from the ground up page done" />
<MESSAGE value="wow such feature" />
<MESSAGE value="copilot leak" />
<MESSAGE value="limit description characters to 100" />
<option name="LAST_COMMIT_MESSAGE" value="limit description characters to 100" />
</component>
<component name="XSLT-Support.FileAssociations.UIState">
<expand />
<select />
</component>
</project>

2
.nvmrc
View File

@@ -1 +1 @@
lts/*
lts/*

12
.prettierrc.mjs Normal file
View File

@@ -0,0 +1,12 @@
/** @type {import("prettier").Config} */
export default {
plugins: ["prettier-plugin-astro", "prettier-plugin-tailwindcss"],
overrides: [
{
files: "*.astro",
options: {
parser: "astro",
},
},
],
};

Binary file not shown.

View File

@@ -1 +0,0 @@
nodeLinker: node-modules

View File

@@ -1,30 +0,0 @@
<!DOCTYPE html>
<html style="height:100%">
<head>
<meta name="viewport" charset="utf-8" content="width=device-width, initial-scale=1, shrink-to-fit=no" >
<link rel="icon" href="./assets/images/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 may be broken or invalid.</p>
<div class="button">
<h2>
<a href="http://sern-handler.js.org" title="Back to home" style="color: #444;">Back to homepage</a>
</h2>
</div>
</div></div></body></html>

21
LICENSE
View File

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

View File

@@ -1,3 +1,3 @@
# Website
# Website (v2)
sern's clean, modern and user-friendly web interface.
sern's clean, modern, and user-friendly web interface. (now built with [Starlight](https://starlight.astro.build/))

181
astro.config.mjs Normal file
View File

@@ -0,0 +1,181 @@
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import starlightBlog from "starlight-blog";
import tailwind from "@astrojs/tailwind";
import { createStarlightTypeDocPlugin } from "starlight-typedoc";
import lunaria from "@lunariajs/starlight";
import { GITHUB_URL, DISCORD_URL } from "./src/utils/consts";
import starlightLinksValidator from 'starlight-links-validator';
import react from "@astrojs/react";
const [typeDocV3, typeDocV3Sidebar] = createStarlightTypeDocPlugin();
const [typeDocV4, typeDocV4Sidebar] = createStarlightTypeDocPlugin();
// https://astro.build/config
export default defineConfig({
// TODO: Change this whenever site is deployed to `sern.dev`
site: 'https://sern.dev/',
integrations: [starlight({
title: "sern",
lastUpdated: true,
defaultLocale: "root",
locales: {
root: {
label: "English",
lang: "en"
},
es: {
label: "Español"
},
tr: {
label: "Türkçe"
}
},
social: {
github: GITHUB_URL,
discord: DISCORD_URL
},
editLink: {
baseUrl: GITHUB_URL + "/website/edit/main/"
},
components: {
Head: "~/overrides/Head.astro",
SiteTitle: "~/overrides/SiteTitle.astro",
ThemeSelect: "~/overrides/ThemeSelect.astro",
Sidebar: "~/overrides/Sidebar.astro",
FallbackContentNotice: "~/overrides/FallbackContentNotice.astro"
},
logo: {
src: "~/assets/logo/navbar-icon.png",
replacesTitle: true
},
customCss: ["~/styles/global.css"],
sidebar: [
{
label: "v4",
items: [{
...typeDocV4Sidebar,
badge: {
text: "Generated"
}
}, {
label: "CLI",
autogenerate: {
directory: "v4/cli"
}
}, {
label: "Reference",
autogenerate: {
directory: "v4/reference"
}
}, {
label: "Snippets",
autogenerate: {
directory: "v4/snippets"
}
}, {
label: "Transition",
autogenerate: {
directory: "v4/transition"
}
}, {
label: "Tools",
autogenerate: {
directory: "v4/tools"
}
}]
},
{
label: "v3",
items: [{
...typeDocV3Sidebar,
badge: {
text: "Generated"
}
}, {
label: "CLI",
autogenerate: {
directory: "v3/cli"
}
}, {
label: "Guide",
items: [{
label: "Getting Started",
autogenerate: {
directory: "v3/guide/getting-started"
}
}, {
label: "Walkthrough",
autogenerate: {
directory: "v3/guide/walkthrough"
}
}]
}]
},
],
head: [
!import.meta.env.DEV ? {
tag: 'script',
attrs: {
src: 'https://analytics.sern.dev/ua.js',
'data-website-id': 'db608ae9-3ae2-49ed-9f7c-3ba0d5abe1b6',
defer: true,
},
} : {
tag: 'meta',
attrs: {
name: 'isdev',
content: 'true',
},
},
],
plugins: [starlightBlog({
authors: {
jacoobes: {
name: "jacoobes",
title: "Head Dev",
url: "https://github.com/jacoobes",
picture: "https://github.com/jacoobes.png"
},
ethan: {
name: "Sr Izan",
title: "Head Dev",
url: "https://github.com/SrIzan10",
picture: "https://github.com/SrIzan10.png"
},
sern: {
name: "sern Team",
url: GITHUB_URL,
picture: "https://github.com/sernbot.png"
},
murtatrxx: {
name: "Murtatrxx",
title: "Head Dev",
url: "https://github.com/Murtatrxx",
picture: "https://github.com/Murtatrxx.png"
},
duro: {
name: "Duro",
title: "Developer",
url: "https://github.com/DuroCodes",
picture: "https://github.com/DuroCodes.png"
}
}
}), typeDocV3({
tsconfig: './sern-handler-v3/tsconfig.json',
entryPoints: ['./sern-handler-v3/src/index.ts'],
output: 'v3/api',
sidebar: {
collapsed: true
}
}), typeDocV4({
tsconfig: './sern-handler-v4/tsconfig.json',
entryPoints: ['./sern-handler-v4/src/index.ts'],
output: 'v4/api',
sidebar: {
collapsed: true
}
}), lunaria(), starlightLinksValidator({
exclude: ['/plugins', '?(../../../..?(/../..))/v{3,4}/api/**/*']
})]
}), tailwind(), react()]
});

View File

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

View File

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

View File

@@ -1,62 +0,0 @@
---
slug: getting-started
title: How to get started with sern!
authors: [Sr Izan]
tags: [guides]
---
## Hello everyone!
I'm Sr Izan, your fellow user and contributor.
Today I'm going to show you how to get started with sern and all its cool features.
### Step 1: Install the CLI.
Install the CLI:
```
npm i -g @sern/cli
```
and then run
```
sern init
```
:::tip
You can also run `sern init -y` if you want to use the default options.
:::
The CLI is written in Typescript and open-sourced on [Github](https://github.com/sern-handler/cli). (thanks [evo](https://github.com/EvolutionX-10)!)
### Step 2: Have some way to store secrets.
Normally you'd need a way to store secrets, and the best way to do that is by installing another package: `dotenv`
just `npm i dotenv` in the project folder and add `require('dotenv').config()` to your import section. Then, when you login, `process.env.TOKEN` (or however you have it named on your `.env` file) should do the trick.
:::caution
If you're using ESM, configure dotenv with `import 'dotenv/config'` instead of `require('dotenv').config()`.
:::
### And... that's it?
Yes, that's it. Here's a little FAQ to get you started. You can also join the [Discord](https://sern.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

@@ -1,31 +0,0 @@
---
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

@@ -1,19 +0,0 @@
jacoobes:
name: jacoobes
title: Head Dev
url: https://github.com/jacoobes
image_url: https://github.com/jacoobes.png
Sr Izan:
name: Sr Izan
title: 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

BIN
bun.lockb Executable file

Binary file not shown.

17
components.json Normal file
View File

@@ -0,0 +1,17 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.mjs",
"css": "src/styles/global.css",
"baseColor": "neutral",
"cssVariables": false,
"prefix": ""
},
"aliases": {
"components": "~/components",
"utils": "~/utils"
}
}

View File

@@ -1,202 +0,0 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer/themes/nightOwlLight');
const darkCodeTheme = require('prism-react-renderer/themes/oceanicNext');
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'sern - Handlers. Redefined.',
tagline: 'With the support of the community made plugins and a powerful CLI, it\'s more than just a handler.',
url: 'https://sern.dev',
baseUrl: '/',
onBrokenLinks: 'ignore',
onBrokenMarkdownLinks: 'warn',
favicon: '/img/favicon.ico', // this currently not working
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'sern-handler', // Usually your GitHub org/user name.
projectName: 'website', // Usually your repo name.
deploymentBranch: 'main',
trailingSlash: false,
// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en']
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl:
'https://github.com/sern-handler/website/edit/main/',
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
},
pages : {
path: 'src/pages',
routeBasePath: '/',
include: ['**/*.{js,jsx,ts,tsx,md,mdx}'],
exclude: [
'**/_*.{js,jsx,ts,tsx,md,mdx}',
'**/_*/**',
'**/*.test.{js,jsx,ts,tsx}',
'**/__tests__/**',
],
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: 'https://sern.dev/img/logo.png',
algolia: {
appId: 'AA9S5J9NYT',
apiKey: 'ccfe6abc4d12ac6f882565a9d0caafb1',
indexName: 'sern',
insights: true,
container: 'div',
debug: false,
contextualSearch: true,
externalUrlRegex: 'external\\.com|domain\\.com',
replaceSearchResultPathname: {
from: '/docs/api',
to: '/docs/api',
},
searchParameters: {},
searchPagePath: 'search',
},
navbar: {
title: 'Home',
logo: {
alt: 'logo logo',
src: 'img/favicon.ico',
},
items: [
{
type: 'doc',
docId: 'intro',
position: 'left',
label: 'Docs & Guide',
},
{to: '/blog', label: 'Blog', position: 'left'},
{
href: 'https://github.com/sern-handler',
label: 'GitHub',
position: 'right',
},
{
to: '/plugins',
label: 'Plugins',
position: 'left'
}
],
},
footer: {
style: 'dark',
links: [
{
title: 'Information',
items: [
{
label: 'Docs & Guide',
to: '/docs/intro',
},
],
},
{
title: 'Community',
items: [
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/sern-handler',
},
{
label: 'Discord',
href: 'https://discord.gg/DwbF5H5JgQ',
},
{
label : 'Open Collective',
href: 'https://opencollective.com/sern'
}
],
},
{
title: 'More',
items: [
{
label: 'Blog',
to: '/blog',
},
{
label: 'GitHub',
href: 'https://github.com/sern-handler',
},
],
},
],
copyright: `Built with ❤️ by the sern Handler team and its contributors`,
},
metadata : [
{ name: 'og:title', content: 'sern - Handlers. Redefined.' },
{ name: 'og:description', content: 'A modular, customizable, fast Discord.js framework to streamline bot development' },
{ name: 'og:url', content: 'https://sern.dev' },
{ name: 'og:type', content: 'website' },
{ name: 'twitter:site', content: '@sern-handler' },
{ property: 'og:image:alt', content: 'sernlogo' },
{ name: 'twitter:title', content: 'sern - Handlers. Redefined.' },
{ name: 'twitter:description', content: 'A modular, customizable, fast Discord.js framework to streamline bot development' },
{ name: 'keywords', content: 'discord, bot, handler, framework, documentation, sern'},
{ name: 'twitter:image', content: 'https://sern.dev/img/logo.png' },
{ name: 'twitter:url', content: 'https://sern.dev' },
{ property: 'og:image:height', content: '512' },
{ property: 'og:image:width', content: '1024' },
{ name: 'theme-color', content: '#F25186' }
],
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
plugins: [
[
'docusaurus-plugin-typedoc',
{
//if you're editing website, please change this to your local branch of sern to generate documentation
entryPoints: ['../sernHandlerV2/src/index.ts'],
tsconfig: '../sernHandlerV2/tsconfig.json',
},
],
[
"@dipakparmar/docusaurus-plugin-umami",
{
websiteID: "e82ff65c-b08f-47b5-8e74-5c31cbcec0ad",
analyticsDomain: "analytics.srizan.dev",
scriptName: 'ua.js',
dataAutoTrack: true,
dataDoNotTrack: true,
dataCache: true,
dataDomains: "sern.dev",
},
]
]
};
module.exports = config;

View File

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

View File

@@ -1,97 +0,0 @@
---
id: "CommandExecutable"
title: "Class: CommandExecutable<Type>"
sidebar_label: "CommandExecutable"
sidebar_position: 0
custom_edit_url: null
---
**`Deprecated`**
Will be removed in future
## Type parameters
| Name | Type |
| :------ | :------ |
| `Type` | extends [`CommandType`](../enums/CommandType.md) = [`CommandType`](../enums/CommandType.md) |
## Constructors
### constructor
**new CommandExecutable**<`Type`\>(): [`CommandExecutable`](CommandExecutable.md)<`Type`\>
#### Type parameters
| Name | Type |
| :------ | :------ |
| `Type` | extends [`CommandType`](../enums/CommandType.md) = [`CommandType`](../enums/CommandType.md) |
#### Returns
[`CommandExecutable`](CommandExecutable.md)<`Type`\>
## Properties
### plugins
**plugins**: [`AnyCommandPlugin`](../modules.md#anycommandplugin)[] = `[]`
#### Defined in
[src/core/modules.ts:80](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/modules.ts#L80)
___
### type
`Abstract` **type**: `Type`
#### Defined in
[src/core/modules.ts:79](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/modules.ts#L79)
___
### \_instance
`Static` `Private` **\_instance**: [`CommandModule`](../modules.md#commandmodule)
#### Defined in
[src/core/modules.ts:81](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/modules.ts#L81)
## Methods
### execute
**execute**(`...args`): `unknown`
#### Parameters
| Name | Type |
| :------ | :------ |
| `...args` | `CommandArgs`<`Type`, [`Control`](../enums/PluginType.md#control)\> |
#### Returns
`unknown`
#### Defined in
[src/core/modules.ts:92](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/modules.ts#L92)
___
### getInstance
**getInstance**(): [`CommandModule`](../modules.md#commandmodule)
#### Returns
[`CommandModule`](../modules.md#commandmodule)
#### Defined in
[src/core/modules.ts:83](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/modules.ts#L83)

View File

@@ -1,348 +0,0 @@
---
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
**new Context**(`ctx`): [`Context`](Context.md)
#### Parameters
| Name | Type |
| :------ | :------ |
| `ctx` | `Result`<`Message`<`boolean`\>, `ChatInputCommandInteraction`<`CacheType`\>\> |
#### Returns
[`Context`](Context.md)
#### Overrides
CoreContext\&lt;Message, ChatInputCommandInteraction\&gt;.constructor
#### Defined in
[src/core/structures/context.ts:29](https://github.com/sern-handler/handler/blob/9d5c6c7/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/9d5c6c7/src/core/structures/context.ts#L29)
## Accessors
### channel
`get` **channel**(): ``null`` \| `TextBasedChannel`
#### Returns
``null`` \| `TextBasedChannel`
#### Defined in
[src/core/structures/context.ts:39](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L39)
___
### channelId
• `get` **channelId**(): `string`
#### Returns
`string`
#### Defined in
[src/core/structures/context.ts:45](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L45)
___
### client
• `get` **client**(): `Client`<`boolean`\>
#### Returns
`Client`<`boolean`\>
#### Defined in
[src/core/structures/context.ts:91](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L91)
___
### createdTimestamp
• `get` **createdTimestamp**(): `number`
#### Returns
`number`
#### Defined in
[src/core/structures/context.ts:65](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L65)
___
### guild
• `get` **guild**(): ``null`` \| `Guild`
#### Returns
``null`` \| `Guild`
#### Defined in
[src/core/structures/context.ts:71](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L71)
___
### guildId
• `get` **guildId**(): ``null`` \| `string`
#### Returns
``null`` \| `string`
#### Defined in
[src/core/structures/context.ts:77](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L77)
___
### id
• `get` **id**(): `string`
#### Returns
`string`
#### Defined in
[src/core/structures/context.ts:33](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L33)
___
### inGuild
• `get` **inGuild**(): `boolean`
#### Returns
`boolean`
#### Defined in
[src/core/structures/context.ts:97](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L97)
___
### 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/9d5c6c7/src/core/structures/core-context.ts#L15)
___
### member
• `get` **member**(): ``null`` \| `GuildMember` \| `APIInteractionGuildMember`
#### Returns
``null`` \| `GuildMember` \| `APIInteractionGuildMember`
#### Defined in
[src/core/structures/context.ts:85](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L85)
___
### 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/9d5c6c7/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/9d5c6c7/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:55](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L55)
___
### userId
• `get` **userId**(): `string`
#### Returns
`string`
#### Defined in
[src/core/structures/context.ts:61](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L61)
## Methods
### isMessage
▸ **isMessage**(): this is CoreContext<Message<boolean\>, never\>
#### Returns
this is CoreContext<Message<boolean\>, never\>
#### Inherited from
CoreContext.isMessage
#### Defined in
[src/core/structures/core-context.ts:19](https://github.com/sern-handler/handler/blob/9d5c6c7/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/9d5c6c7/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:103](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L103)
___
### wrap
▸ **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:113](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L113)

View File

@@ -1,90 +0,0 @@
---
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 the defaults!
## Implements
- [`ErrorHandling`](../interfaces/ErrorHandling.md)
## Constructors
### constructor
**new DefaultErrorHandling**(): [`DefaultErrorHandling`](DefaultErrorHandling.md)
#### Returns
[`DefaultErrorHandling`](DefaultErrorHandling.md)
## Properties
### #keepAlive
`Private` **#keepAlive**: `number` = `5`
#### Defined in
[src/core/structures/services/error-handling.ts:13](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/services/error-handling.ts#L13)
## Methods
### crash
**crash**(`err`): `never`
#### Parameters
| Name | Type |
| :------ | :------ |
| `err` | `Error` |
#### Returns
`never`
**`Deprecated`**
Version 4 will remove this method
#### 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/9d5c6c7/src/core/structures/services/error-handling.ts#L9)
___
### updateAlive
**updateAlive**(`err`): `void`
A function that is called on every throw.
#### 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/9d5c6c7/src/core/structures/services/error-handling.ts#L15)

View File

@@ -1,136 +0,0 @@
---
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**(): [`DefaultLogging`](DefaultLogging.md)
#### Returns
[`DefaultLogging`](DefaultLogging.md)
## Methods
### date
**date**(): `Date`
#### Returns
`Date`
#### Defined in
[src/core/structures/services/logger.ts:9](https://github.com/sern-handler/handler/blob/9d5c6c7/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/9d5c6c7/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/9d5c6c7/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/9d5c6c7/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/9d5c6c7/src/core/structures/services/logger.ts#L22)

View File

@@ -1,193 +0,0 @@
---
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`): [`DefaultModuleManager`](DefaultModuleManager.md)
#### Parameters
| Name | Type |
| :------ | :------ |
| `moduleStore` | [`CoreModuleStore`](../interfaces/CoreModuleStore.md) |
#### Returns
[`DefaultModuleManager`](DefaultModuleManager.md)
#### Defined in
[src/core/structures/services/module-manager.ts:12](https://github.com/sern-handler/handler/blob/9d5c6c7/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/9d5c6c7/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:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/services/module-manager.ts#L35)
___
### 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:15](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/services/module-manager.ts#L15)
___
### 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:27](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/services/module-manager.ts#L27)
___
### 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:42](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/services/module-manager.ts#L42)
___
### 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:38](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/services/module-manager.ts#L38)
___
### 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:23](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/services/module-manager.ts#L23)

View File

@@ -1,97 +0,0 @@
---
id: "EventExecutable"
title: "Class: EventExecutable<Type>"
sidebar_label: "EventExecutable"
sidebar_position: 0
custom_edit_url: null
---
**`Deprecated`**
Will be removed in future
## Type parameters
| Name | Type |
| :------ | :------ |
| `Type` | extends [`EventType`](../enums/EventType.md) |
## Constructors
### constructor
**new EventExecutable**<`Type`\>(): [`EventExecutable`](EventExecutable.md)<`Type`\>
#### Type parameters
| Name | Type |
| :------ | :------ |
| `Type` | extends [`EventType`](../enums/EventType.md) |
#### Returns
[`EventExecutable`](EventExecutable.md)<`Type`\>
## Properties
### plugins
**plugins**: [`AnyEventPlugin`](../modules.md#anyeventplugin)[] = `[]`
#### Defined in
[src/core/modules.ts:101](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/modules.ts#L101)
___
### type
`Abstract` **type**: `Type`
#### Defined in
[src/core/modules.ts:100](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/modules.ts#L100)
___
### \_instance
`Static` `Private` **\_instance**: [`EventModule`](../modules.md#eventmodule)
#### Defined in
[src/core/modules.ts:103](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/modules.ts#L103)
## Methods
### execute
**execute**(`...args`): `unknown`
#### Parameters
| Name | Type |
| :------ | :------ |
| `...args` | `EventArgs`<`Type`, [`Control`](../enums/PluginType.md#control)\> |
#### Returns
`unknown`
#### Defined in
[src/core/modules.ts:112](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/modules.ts#L112)
___
### getInstance
**getInstance**(): [`EventModule`](../modules.md#eventmodule)
#### Returns
[`EventModule`](../modules.md#eventmodule)
#### Defined in
[src/core/modules.ts:104](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/modules.ts#L104)

View File

@@ -1,51 +0,0 @@
---
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**(): [`ModuleStore`](ModuleStore.md)
#### Returns
[`ModuleStore`](ModuleStore.md)
## 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/9d5c6c7/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/9d5c6c7/src/core/structures/module-store.ts#L10)

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@@ -1,43 +0,0 @@
---
id: "PayloadType"
title: "Enumeration: PayloadType"
sidebar_label: "PayloadType"
sidebar_position: 0
custom_edit_url: null
---
## Enumeration Members
### Failure
**Failure** = ``"failure"``
The PayloadType for a SernEmitter failure event
#### Defined in
[src/core/structures/enums.ts:98](https://github.com/sern-handler/handler/blob/9d5c6c7/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/9d5c6c7/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/9d5c6c7/src/core/structures/enums.ts#L102)

View File

@@ -1,104 +0,0 @@
---
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

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

View File

@@ -1,95 +0,0 @@
---
id: "index"
title: "@sern/handler"
sidebar_label: "Readme"
sidebar_position: 0
custom_edit_url: null
---
<div align="center">
<img src="https://raw.githubusercontent.com/sern-handler/.github/main/banner.png" width="900px" />
</div>
<h1 align="center">Handlers. Redefined.</h1>
<h4 align="center">A 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.
- Start quickly. Plug and play or customize to your liking.
- works with [bun](https://bun.sh/) and [node](https://nodejs.org/en) out the box!
- 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
[Start here!!](https://sern.dev/docs/guide/walkthrough/new-project)
## 👶 Basic Usage
<details><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><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>
## 🤖 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

@@ -1,55 +0,0 @@
---
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

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

View File

@@ -1,132 +0,0 @@
---
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:126](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L126)
___
### description
**description**: `string`
#### Overrides
Module.description
#### Defined in
[src/types/core-modules.ts:127](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L127)
___
### 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:129](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L129)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
___
### options
`Optional` **options**: [`SernOptionsData`](../modules.md#sernoptionsdata)[]
#### Defined in
[src/types/core-modules.ts:128](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L128)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
___
### type
**type**: [`Both`](../enums/CommandType.md#both)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:125](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L125)

View File

@@ -1,111 +0,0 @@
---
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:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
___
### 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:66](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L66)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
___
### type
**type**: [`Button`](../enums/CommandType.md#button)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:65](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L65)

View File

@@ -1,111 +0,0 @@
---
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:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
___
### 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:76](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L76)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
___
### type
**type**: [`ChannelSelect`](../enums/CommandType.md#channelselect)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:75](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L75)

View File

@@ -1,45 +0,0 @@
---
id: "CommandError.Response"
title: "Interface: Response"
sidebar_label: "Response"
custom_edit_url: null
---
[CommandError](../namespaces/CommandError.md).Response
## Properties
### body
`Optional` **body**: `ReplyOptions`
#### Defined in
[src/core/structures/command-error.ts:6](https://github.com/sern-handler/handler/blob/504cdee/src/core/structures/command-error.ts#L6)
___
### log
`Optional` **log**: `Object`
#### Type declaration
| Name | Type |
| :------ | :------ |
| `message` | `unknown` |
| `type` | keyof [`Logging`](Logging.md)<`unknown`\> |
#### Defined in
[src/core/structures/command-error.ts:7](https://github.com/sern-handler/handler/blob/504cdee/src/core/structures/command-error.ts#L7)
___
### type
**type**: ``"fail"`` \| ``"continue"``
#### Defined in
[src/core/structures/command-error.ts:5](https://github.com/sern-handler/handler/blob/504cdee/src/core/structures/command-error.ts#L5)

View File

@@ -1,127 +0,0 @@
---
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:151](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L151)
___
### 1024
**1024**: [`ChannelSelectCommand`](ChannelSelectCommand.md)
#### Defined in
[src/types/core-modules.ts:159](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L159)
___
### 128
**128**: [`UserSelectCommand`](UserSelectCommand.md)
#### Defined in
[src/types/core-modules.ts:161](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L161)
___
### 16
**16**: [`ButtonCommand`](ButtonCommand.md)
#### Defined in
[src/types/core-modules.ts:156](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L156)
___
### 2
**2**: [`SlashCommand`](SlashCommand.md)
#### Defined in
[src/types/core-modules.ts:152](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L152)
___
### 256
**256**: [`RoleSelectCommand`](RoleSelectCommand.md)
#### Defined in
[src/types/core-modules.ts:158](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L158)
___
### 3
**3**: [`BothCommand`](BothCommand.md)
#### Defined in
[src/types/core-modules.ts:153](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L153)
___
### 32
**32**: [`StringSelectCommand`](StringSelectCommand.md)
#### Defined in
[src/types/core-modules.ts:157](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L157)
___
### 4
**4**: [`ContextMenuUser`](ContextMenuUser.md)
#### Defined in
[src/types/core-modules.ts:155](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L155)
___
### 512
**512**: [`MentionableSelectCommand`](MentionableSelectCommand.md)
#### Defined in
[src/types/core-modules.ts:160](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L160)
___
### 64
**64**: [`ModalSubmitCommand`](ModalSubmitCommand.md)
#### Defined in
[src/types/core-modules.ts:162](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L162)
___
### 8
**8**: [`ContextMenuMsg`](ContextMenuMsg.md)
#### Defined in
[src/types/core-modules.ts:154](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L154)

View File

@@ -1,72 +0,0 @@
---
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

@@ -1,111 +0,0 @@
---
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:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
___
### 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:61](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L61)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
___
### type
**type**: [`CtxMsg`](../enums/CommandType.md#ctxmsg)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:60](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L60)

View File

@@ -1,111 +0,0 @@
---
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:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
___
### 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:56](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L56)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
___
### type
**type**: [`CtxUser`](../enums/CommandType.md#ctxuser)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:55](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L55)

View File

@@ -1,47 +0,0 @@
---
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/9d5c6c7/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/9d5c6c7/src/types/core-plugin.ts#L72)

View File

@@ -1,43 +0,0 @@
---
id: "Controller"
title: "Interface: Controller"
sidebar_label: "Controller"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### next
**next**: () => `Ok`<`void`\>
#### Type declaration
▸ (): `Ok`<`void`\>
##### Returns
`Ok`<`void`\>
#### Defined in
[src/types/core-plugin.ts:59](https://github.com/sern-handler/handler/blob/9d5c6c7/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/9d5c6c7/src/types/core-plugin.ts#L60)

View File

@@ -1,115 +0,0 @@
---
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/9d5c6c7/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/9d5c6c7/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/9d5c6c7/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/9d5c6c7/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/9d5c6c7/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/9d5c6c7/src/types/ioc.ts#L31)

View File

@@ -1,33 +0,0 @@
---
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/9d5c6c7/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/9d5c6c7/src/core/contracts/module-store.ts#L8)

View File

@@ -1,67 +0,0 @@
---
id: "Dependencies"
title: "Interface: Dependencies"
sidebar_label: "Dependencies"
sidebar_position: 0
custom_edit_url: null
---
## Properties
### @sern/client
**@sern/client**: [`Singleton`](../modules.md#singleton)<`__module`\>
#### Defined in
[src/types/handler.ts: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

@@ -1,47 +0,0 @@
---
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

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

View File

@@ -1,113 +0,0 @@
---
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:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
___
### name
`Optional` **name**: `T`
#### Overrides
Module.name
#### Defined in
[src/types/core-modules.ts:107](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L107)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
___
### type
**type**: [`Discord`](../enums/EventType.md#discord)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:108](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L108)
## Methods
### execute
**execute**(`...args`): `unknown`
#### Parameters
| Name | Type |
| :------ | :------ |
| `...args` | `ClientEvents`[`T`] |
#### Returns
`unknown`
#### Overrides
Module.execute
#### Defined in
[src/types/core-modules.ts:109](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L109)

View File

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

View File

@@ -1,24 +0,0 @@
---
id: "Disposable"
title: "Interface: Disposable"
sidebar_label: "Disposable"
sidebar_position: 0
custom_edit_url: null
---
Represents a Disposable contract.
Let dependencies implement this to dispose and cleanup.
## Methods
### dispose
**dispose**(): `unknown`
#### Returns
`unknown`
#### Defined in
[src/core/contracts/disposable.ts:8](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/disposable.ts#L8)

View File

@@ -1,70 +0,0 @@
---
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/9d5c6c7/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/9d5c6c7/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/9d5c6c7/src/core/contracts/emitter.ts#L5)

View File

@@ -1,61 +0,0 @@
---
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)
## Methods
### crash
**crash**(`err`): `never`
#### Parameters
| Name | Type |
| :------ | :------ |
| `err` | `Error` |
#### Returns
`never`
**`Deprecated`**
Version 4 will remove this method
#### Defined in
[src/core/contracts/error-handling.ts:11](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/error-handling.ts#L11)
___
### updateAlive
**updateAlive**(`error`): `void`
A function that is called on every throw.
#### Parameters
| Name | Type |
| :------ | :------ |
| `error` | `Error` |
#### Returns
`void`
#### Defined in
[src/core/contracts/error-handling.ts:16](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/error-handling.ts#L16)

View File

@@ -1,37 +0,0 @@
---
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:167](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L167)
___
### 2
**2**: [`SernEventCommand`](SernEventCommand.md)<keyof [`SernEventsMapping`](SernEventsMapping.md)\>
#### Defined in
[src/types/core-modules.ts:166](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L166)
___
### 3
**3**: [`ExternalEventCommand`](ExternalEventCommand.md)
#### Defined in
[src/types/core-modules.ts:168](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L168)

View File

@@ -1,72 +0,0 @@
---
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

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

View File

@@ -1,117 +0,0 @@
---
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:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
___
### emitter
**emitter**: keyof `Dependencies`
#### Defined in
[src/types/core-modules.ts:49](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L49)
___
### name
`Optional` **name**: `string`
#### Overrides
Module.name
#### Defined in
[src/types/core-modules.ts:48](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L48)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
___
### type
**type**: [`External`](../enums/EventType.md#external)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:50](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L50)
## Methods
### execute
**execute**(`...args`): `unknown`
#### Parameters
| Name | Type |
| :------ | :------ |
| `...args` | `unknown`[] |
#### Returns
`unknown`
#### Overrides
Module.execute
#### Defined in
[src/types/core-modules.ts:51](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L51)

View File

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

View File

@@ -1,24 +0,0 @@
---
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/9d5c6c7/src/core/contracts/init.ts#L8)

View File

@@ -1,33 +0,0 @@
---
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

@@ -1,47 +0,0 @@
---
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/9d5c6c7/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/9d5c6c7/src/types/core-plugin.ts#L68)

View File

@@ -1,101 +0,0 @@
---
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/9d5c6c7/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/9d5c6c7/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/9d5c6c7/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/9d5c6c7/src/core/contracts/logging.ts#L6)

View File

@@ -1,111 +0,0 @@
---
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:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
___
### 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:86](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L86)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
___
### type
**type**: [`MentionableSelect`](../enums/CommandType.md#mentionableselect)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:85](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L85)

View File

@@ -1,111 +0,0 @@
---
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:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
___
### 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:96](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L96)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
___
### type
**type**: [`Modal`](../enums/CommandType.md#modal)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:95](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L95)

View File

@@ -1,115 +0,0 @@
---
id: "Module"
title: "Interface: Module"
sidebar_label: "Module"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- **`Module`**
↳ [`TextCommand`](TextCommand.md)
↳ [`SlashCommand`](SlashCommand.md)
↳ [`BothCommand`](BothCommand.md)
↳ [`ContextMenuUser`](ContextMenuUser.md)
↳ [`ContextMenuMsg`](ContextMenuMsg.md)
↳ [`ButtonCommand`](ButtonCommand.md)
↳ [`StringSelectCommand`](StringSelectCommand.md)
↳ [`ChannelSelectCommand`](ChannelSelectCommand.md)
↳ [`RoleSelectCommand`](RoleSelectCommand.md)
↳ [`MentionableSelectCommand`](MentionableSelectCommand.md)
↳ [`UserSelectCommand`](UserSelectCommand.md)
↳ [`ModalSubmitCommand`](ModalSubmitCommand.md)
↳ [`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

@@ -1,153 +0,0 @@
---
id: "ModuleManager"
title: "Interface: ModuleManager"
sidebar_label: "ModuleManager"
sidebar_position: 0
custom_edit_url: null
---
**`Since`**
2.0.0
- direct access to the module manager will be removed in version 4
## Hierarchy
- `MetadataAccess`
**`ModuleManager`**
## 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:19](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/module-manager.ts#L19)
___
### 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:23](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/module-manager.ts#L23)
___
### getMetadata
**getMetadata**(`m`): `undefined` \| `CommandMeta`
#### Parameters
| Name | Type |
| :------ | :------ |
| `m` | `Module` |
#### Returns
`undefined` \| `CommandMeta`
#### Inherited from
MetadataAccess.getMetadata
#### Defined in
[src/core/contracts/module-manager.ts:10](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/module-manager.ts#L10)
___
### getPublishableCommands
**getPublishableCommands**(): `Promise`<[`CommandModule`](../modules.md#commandmodule)[]\>
#### Returns
`Promise`<[`CommandModule`](../modules.md#commandmodule)[]\>
#### Defined in
[src/core/contracts/module-manager.ts:22](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/module-manager.ts#L22)
___
### set
**set**(`id`, `path`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `id` | `string` |
| `path` | `string` |
#### Returns
`void`
#### Defined in
[src/core/contracts/module-manager.ts:21](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/module-manager.ts#L21)
___
### setMetadata
**setMetadata**(`m`, `c`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `m` | `Module` |
| `c` | `CommandMeta` |
#### Returns
`void`
#### Inherited from
MetadataAccess.setMetadata
#### Defined in
[src/core/contracts/module-manager.ts:11](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/module-manager.ts#L11)

View File

@@ -1,47 +0,0 @@
---
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/9d5c6c7/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/9d5c6c7/src/types/core-plugin.ts#L63)

View File

@@ -1,82 +0,0 @@
---
id: "Presence.Result"
title: "Interface: Result"
sidebar_label: "Result"
custom_edit_url: null
---
[Presence](../namespaces/Presence.md).Result
## Properties
### activities
`Optional` **activities**: `ActivitiesOptions`[]
#### Defined in
[src/core/presences.ts:11](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L11)
___
### afk
`Optional` **afk**: `boolean`
#### Defined in
[src/core/presences.ts:10](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L10)
___
### onRepeat
`Optional` **onRepeat**: (`previous`: [`Result`](Presence.Result.md)) => [`Result`](Presence.Result.md)
#### Type declaration
▸ (`previous`): [`Result`](Presence.Result.md)
##### Parameters
| Name | Type |
| :------ | :------ |
| `previous` | [`Result`](Presence.Result.md) |
##### Returns
[`Result`](Presence.Result.md)
#### Defined in
[src/core/presences.ts:14](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L14)
___
### repeat
`Optional` **repeat**: `number` \| [[`Emitter`](Emitter.md), `string`]
#### Defined in
[src/core/presences.ts:13](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L13)
___
### shardId
`Optional` **shardId**: `number`[]
#### Defined in
[src/core/presences.ts:12](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L12)
___
### status
`Optional` **status**: `Status`
#### Defined in
[src/core/presences.ts:9](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L9)

View File

@@ -1,111 +0,0 @@
---
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:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
___
### 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:81](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L81)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
___
### type
**type**: [`RoleSelect`](../enums/CommandType.md#roleselect)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:80](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L80)

View File

@@ -1,113 +0,0 @@
---
id: "SernAutocompleteData"
title: "Interface: SernAutocompleteData"
sidebar_label: "SernAutocompleteData"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `Omit`<`BaseApplicationCommandOptionsData`, ``"autocomplete"``\>
**`SernAutocompleteData`**
## Properties
### autocomplete
**autocomplete**: ``true``
#### Defined in
[src/types/core-modules.ts:173](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L173)
___
### command
• **command**: `AutocompleteCommand`
#### Defined in
[src/types/core-modules.ts:178](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L178)
___
### description
• **description**: `string`
#### Inherited from
Omit.description
#### Defined in
node_modules/discord.js/typings/index.d.ts:4493
___
### 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:4494
___
### name
• **name**: `string`
#### Inherited from
Omit.name
#### Defined in
node_modules/discord.js/typings/index.d.ts:4491
___
### 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:4492
___
### required
• `Optional` **required**: `boolean`
#### Inherited from
Omit.required
#### Defined in
node_modules/discord.js/typings/index.d.ts:4495
___
### type
• **type**: `String` \| `Integer` \| `Number`
#### Defined in
[src/types/core-modules.ts:174](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L174)

View File

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

View File

@@ -1,113 +0,0 @@
---
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:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
___
### name
`Optional` **name**: `T`
#### Overrides
Module.name
#### Defined in
[src/types/core-modules.ts:43](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L43)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
___
### type
**type**: [`Sern`](../enums/EventType.md#sern)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:44](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L44)
## 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:45](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L45)

View File

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

View File

@@ -1,57 +0,0 @@
---
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/9d5c6c7/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/9d5c6c7/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/9d5c6c7/src/types/utility.ts#L19)
___
### modulesLoaded
**modulesLoaded**: [undefined?]
#### Defined in
[src/types/utility.ts:23](https://github.com/sern-handler/handler/blob/9d5c6c7/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/9d5c6c7/src/types/utility.ts#L22)

View File

@@ -1,107 +0,0 @@
---
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:210](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L210)
___
### 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:209](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L209)

View File

@@ -1,117 +0,0 @@
---
id: "SernSubCommandGroupData"
title: "Interface: SernSubCommandGroupData"
sidebar_label: "SernSubCommandGroupData"
sidebar_position: 0
custom_edit_url: null
---
## Hierarchy
- `BaseApplicationCommandOptionsData`
**`SernSubCommandGroupData`**
## Properties
### autocomplete
`Optional` **autocomplete**: `undefined`
#### Inherited from
BaseApplicationCommandOptionsData.autocomplete
#### Defined in
node_modules/discord.js/typings/index.d.ts:4496
___
### description
**description**: `string`
#### Inherited from
BaseApplicationCommandOptionsData.description
#### Defined in
node_modules/discord.js/typings/index.d.ts:4493
___
### 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:4494
___
### name
• **name**: `string`
#### Inherited from
BaseApplicationCommandOptionsData.name
#### Defined in
node_modules/discord.js/typings/index.d.ts:4491
___
### 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:4492
___
### options
• `Optional` **options**: [`SernSubCommandData`](SernSubCommandData.md)[]
#### Defined in
[src/types/core-modules.ts:215](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L215)
___
### required
• `Optional` **required**: `boolean`
#### Inherited from
BaseApplicationCommandOptionsData.required
#### Defined in
node_modules/discord.js/typings/index.d.ts:4495
___
### type
• **type**: `SubcommandGroup`
#### Defined in
[src/types/core-modules.ts:214](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L214)

View File

@@ -1,122 +0,0 @@
---
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:119](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L119)
___
### 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:121](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L121)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
___
### options
`Optional` **options**: [`SernOptionsData`](../modules.md#sernoptionsdata)[]
#### Defined in
[src/types/core-modules.ts:120](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L120)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
___
### type
**type**: [`Slash`](../enums/CommandType.md#slash)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:118](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L118)

View File

@@ -1,111 +0,0 @@
---
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:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
___
### 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:71](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L71)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
___
### type
**type**: [`StringSelect`](../enums/CommandType.md#stringselect)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:70](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L70)

View File

@@ -1,122 +0,0 @@
---
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:113](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L113)
___
### description
`Optional` **description**: `string`
#### Inherited from
Module.description
#### Defined in
[src/types/core-modules.ts:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
___
### 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:114](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L114)
___
### name
• `Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
___
### onEvent
• **onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
___
### plugins
• **plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
___
### type
• **type**: [`Text`](../enums/CommandType.md#text)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:112](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L112)

View File

@@ -1,111 +0,0 @@
---
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:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
___
### 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:91](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L91)
___
### name
`Optional` **name**: `string`
#### Inherited from
Module.name
#### Defined in
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
___
### onEvent
**onEvent**: [`ControlPlugin`](ControlPlugin.md)<`any`[]\>[]
#### Inherited from
Module.onEvent
#### Defined in
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
___
### plugins
**plugins**: [`InitPlugin`](InitPlugin.md)<`any`[]\>[]
#### Inherited from
Module.plugins
#### Defined in
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
___
### type
**type**: [`UserSelect`](../enums/CommandType.md#userselect)
#### Overrides
Module.type
#### Defined in
[src/types/core-modules.ts:90](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L90)

View File

@@ -1,69 +0,0 @@
---
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:9](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core.ts#L9)
___
### containerConfig
`Optional` **containerConfig**: `Object`
#### Type declaration
| Name | Type |
| :------ | :------ |
| `get` | (...`keys`: keyof `Dependencies`[]) => `unknown`[] |
#### Defined in
[src/types/core.ts:20](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core.ts#L20)
___
### defaultPrefix
`Optional` **defaultPrefix**: `string`
#### Defined in
[src/types/core.ts:10](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core.ts#L10)
___
### events
`Optional` **events**: `string`
#### Defined in
[src/types/core.ts:11](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core.ts#L11)
___
### mode
`Optional` **mode**: `string`
Overload to enable mode in case developer does not use a .env file.
**`Deprecated`**
- https://github.com/sern-handler/handler/pull/325
#### Defined in
[src/types/core.ts:16](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core.ts#L16)

View File

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

View File

@@ -1,756 +0,0 @@
---
id: "modules"
title: "@sern/handler"
sidebar_label: "Exports"
sidebar_position: 0.5
custom_edit_url: null
---
## Namespaces
- [Presence](namespaces/Presence.md)
- [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)
- [Disposable](interfaces/Disposable.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)
## 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/9d5c6c7/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/9d5c6c7/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/9d5c6c7/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:133](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L133)
___
### EventModule
Ƭ **EventModule**: [`DiscordEventCommand`](interfaces/DiscordEventCommand.md) \| [`SernEventCommand`](interfaces/SernEventCommand.md) \| [`ExternalEventCommand`](interfaces/ExternalEventCommand.md)
#### Defined in
[src/types/core-modules.ts:132](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L132)
___
### 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/9d5c6c7/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/9d5c6c7/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/9d5c6c7/src/types/utility.ts#L26)
___
### PluginResult
Ƭ **PluginResult**: `Awaitable`<`VoidResult`\>
#### Defined in
[src/types/core-plugin.ts:51](https://github.com/sern-handler/handler/blob/9d5c6c7/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:201](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L201)
___
### 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/9d5c6c7/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/9d5c6c7/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/9d5c6c7/src/types/ioc.ts#L12)
## 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/core/create-plugins.ts:69](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/create-plugins.ts#L69)
## Functions
### CommandControlPlugin
▸ **CommandControlPlugin**<`I`\>(`execute`): [`Plugin`](interfaces/Plugin.md)<`unknown`[]\>
#### 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`[]\>
**`Since`**
2.5.0
@__PURE__
#### Defined in
[src/core/create-plugins.ts:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/create-plugins.ts#L37)
___
### CommandInitPlugin
▸ **CommandInitPlugin**<`I`\>(`execute`): [`Plugin`](interfaces/Plugin.md)<`unknown`[]\>
#### 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`[]\>
**`Since`**
2.5.0
@__PURE__
#### Defined in
[src/core/create-plugins.ts:28](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/create-plugins.ts#L28)
___
### DiscordEventControlPlugin
▸ **DiscordEventControlPlugin**<`T`\>(`name`, `execute`): [`Plugin`](interfaces/Plugin.md)<`unknown`[]\>
#### 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`[]\>
**`Since`**
2.5.0
**`Experimental`**
A specialized function for creating control plugins with discord.js ClientEvents.
Will probably be moved one day!
#### Defined in
[src/core/create-plugins.ts:58](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/create-plugins.ts#L58)
___
### EventControlPlugin
▸ **EventControlPlugin**<`I`\>(`execute`): [`Plugin`](interfaces/Plugin.md)<`unknown`[]\>
#### 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`[]\>
**`Since`**
2.5.0
@__PURE__
#### Defined in
[src/core/create-plugins.ts:46](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/create-plugins.ts#L46)
___
### EventInitPlugin
▸ **EventInitPlugin**<`I`\>(`execute`): [`Plugin`](interfaces/Plugin.md)<`unknown`[]\>
#### 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`[]\>
**`Since`**
2.5.0
@__PURE__
#### Defined in
[src/core/create-plugins.ts:19](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/create-plugins.ts#L19)
___
### 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.
#### 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`]\>\>
**`Since`**
3.0.0
**`Example`**
```ts
const client = Service('@sern/client');
```
#### Defined in
[src/core/ioc/dependency-injection.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/ioc/dependency-injection.ts#L36)
___
### Services
▸ **Services**<`T`\>(`...keys`): `IntoDependencies`<`T`\>
#### 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
**`Since`**
3.0.0
The plural version of [Service](modules.md#service)
#### Defined in
[src/core/ioc/dependency-injection.ts:44](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/ioc/dependency-injection.ts#L44)
___
### commandModule
▸ **commandModule**(`mod`): [`CommandModule`](modules.md#commandmodule)
#### Parameters
| Name | Type |
| :------ | :------ |
| `mod` | `InputCommand` |
#### Returns
[`CommandModule`](modules.md#commandmodule)
**`Since`**
1.0.0 The wrapper function to define command modules for sern
#### Defined in
[src/core/modules.ts:25](https://github.com/sern-handler/handler/blob/9d5c6c7/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.
#### 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)
**`Experimental`**
#### Defined in
[src/core/modules.ts:53](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/modules.ts#L53)
___
### eventModule
▸ **eventModule**(`mod`): [`EventModule`](modules.md#eventmodule)
#### Parameters
| Name | Type |
| :------ | :------ |
| `mod` | `InputEvent` |
#### Returns
[`EventModule`](modules.md#eventmodule)
**`Since`**
1.0.0
The wrapper function to define event modules for sern
#### Defined in
[src/core/modules.ts:38](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/modules.ts#L38)
___
### makeDependencies
▸ **makeDependencies**<`T`\>(`conf`): `Promise`<<V\>(...`keys`: [...V[]]) => `IntoDependencies`<`V`\>\>
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends `Dependencies` |
#### Parameters
| Name | Type |
| :------ | :------ |
| `conf` | `ValidDependencyConfig` |
#### Returns
`Promise`<<V\>(...`keys`: [...V[]]) => `IntoDependencies`<`V`\>\>
#### Defined in
[src/core/ioc/base.ts:90](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/ioc/base.ts#L90)
___
### 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:6](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/create-plugins.ts#L6)
___
### single
▸ **single**<`T`\>(`cb`): () => `T`
@__PURE__
#### Type parameters
| Name |
| :------ |
| `T` |
#### Parameters
| Name | Type |
| :------ | :------ |
| `cb` | () => `T` |
#### Returns
`fn`
▸ (): `T`
##### Returns
`T`
**`Since`**
2.0.0.
Creates a singleton object.
#### Defined in
[src/core/ioc/dependency-injection.ts:11](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/ioc/dependency-injection.ts#L11)
___
### transient
▸ **transient**<`T`\>(`cb`): () => () => `T`
@__PURE__
#### Type parameters
| Name |
| :------ |
| `T` |
#### Parameters
| Name | Type |
| :------ | :------ |
| `cb` | () => () => `T` |
#### Returns
`fn`
▸ (): () => `T`
##### Returns
`fn`
▸ (): `T`
##### Returns
`T`
**`Since`**
2.0.0
Creates a transient object
#### Defined in
[src/core/ioc/dependency-injection.ts:21](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/ioc/dependency-injection.ts#L21)
___
### useContainerRaw
▸ **useContainerRaw**(): `CoreContainer`<`Partial`<`Dependencies`\>\>
#### Returns
`CoreContainer`<`Partial`<`Dependencies`\>\>
**`Deprecated`**
Returns the underlying data structure holding all dependencies.
Exposes methods from iti
Use the Service API. The container should be readonly
#### Defined in
[src/core/ioc/base.ts:18](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/ioc/base.ts#L18)

View File

@@ -1,31 +0,0 @@
---
id: "CommandError"
title: "Namespace: CommandError"
sidebar_label: "CommandError"
sidebar_position: 0
custom_edit_url: null
---
## Interfaces
- [Response](../interfaces/CommandError.Response.md)
## Functions
### of
**of**(): `Object`
#### Returns
`Object`
| Name | Type |
| :------ | :------ |
| `log` | <T\>(`type`: keyof [`Logging`](../interfaces/Logging.md)<`unknown`\>, `message`: `T`) => `Record`<`PropertyKey`, `unknown`\> |
| `reply` | (`bodyContent`: `ReplyOptions`) => `Record`<`PropertyKey`, `unknown`\> |
| `status` | (`p`: ``"fail"`` \| ``"continue"``) => `Record`<`PropertyKey`, `unknown`\> |
#### Defined in
[src/core/structures/command-error.ts:10](https://github.com/sern-handler/handler/blob/504cdee/src/core/structures/command-error.ts#L10)

View File

@@ -1,93 +0,0 @@
---
id: "Presence"
title: "Namespace: Presence"
sidebar_label: "Presence"
sidebar_position: 0
custom_edit_url: null
---
## Interfaces
- [Result](../interfaces/Presence.Result.md)
## Type Aliases
### Config
Ƭ **Config**<`T`\>: `Object`
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends keyof `Dependencies`[] |
#### Type declaration
| Name | Type |
| :------ | :------ |
| `execute` | (...`v`: `IntoDependencies`<`T`\>) => [`Result`](../interfaces/Presence.Result.md) |
| `inject?` | [...T] |
#### Defined in
[src/core/presences.ts:17](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L17)
## Functions
### module
**module**<`T`\>(`conf`): [`Config`](Presence.md#config)<`T`\>
A small wrapper to provide type inference.
Create a Presence module which **MUST** be put in a file called presence.(language-extension)
adjacent to the file where **Sern.init** is CALLED.
#### Type parameters
| Name | Type |
| :------ | :------ |
| `T` | extends keyof `Dependencies`[] |
#### Parameters
| Name | Type |
| :------ | :------ |
| `conf` | [`Config`](Presence.md#config)<`T`\> |
#### Returns
[`Config`](Presence.md#config)<`T`\>
#### Defined in
[src/core/presences.ts:28](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L28)
___
### of
**of**(`root`): `Object`
Create a Presence body which can be either:
- once, the presence is activated only once.
- repeated, per cycle or event, the presence can be changed.
#### Parameters
| Name | Type |
| :------ | :------ |
| `root` | `Omit`<[`Result`](../interfaces/Presence.Result.md), ``"repeat"`` \| ``"onRepeat"``\> |
#### Returns
`Object`
| Name | Type |
| :------ | :------ |
| `once` | () => `Omit`<[`Result`](../interfaces/Presence.Result.md), ``"repeat"`` \| ``"onRepeat"``\> |
| `repeated` | (`onRepeat`: `PresenceReduce`, `repeat`: `number` \| [[`Emitter`](../interfaces/Emitter.md), `string`]) => \{ `activities?`: `ActivitiesOptions`[] ; `afk?`: `boolean` ; `onRepeat`: `PresenceReduce` ; `repeat`: `number` \| [[`Emitter`](../interfaces/Emitter.md), `string`] ; `shardId?`: `number`[] ; `status?`: `Status` } |
#### Defined in
[src/core/presences.ts:39](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L39)

View File

@@ -1,40 +0,0 @@
---
id: "Sern"
title: "Namespace: Sern"
sidebar_label: "Sern"
sidebar_position: 0
custom_edit_url: null
---
## Functions
### init
**init**(`maybeWrapper`): `void`
#### Parameters
| Name | Type |
| :------ | :------ |
| `maybeWrapper` | [`Wrapper`](../interfaces/Wrapper.md) \| ``"file"`` |
#### Returns
`void`
**`Since`**
1.0.0
**`Example`**
```ts title="src/index.ts"
Sern.init({
commands: 'dist/commands',
events: 'dist/events',
})
```
#### Defined in
[src/sern.ts:27](https://github.com/sern-handler/handler/blob/9d5c6c7/src/sern.ts#L27)

View File

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

View File

@@ -1,211 +0,0 @@
```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>

View File

@@ -1,28 +0,0 @@
```sh
Usage: sern commands clear [options]
Clear and reset commands-data-remote.json and the api
Options:
-y, --yes Say yes to all prompts
-e, --env [path] Supply a path to a .env
-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>
NODE_ENV=<development|production>
```
- Calls the discord API with the [PUT route](https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands) with an EMPTY array, essentially setting all registered commands to nothing.
- Optionally override an .env path as a command line argument 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)
- Automatically confirm with the **-y** flag.
## Features
- Clears all application data and sern-commands-data.json

View File

@@ -1,11 +0,0 @@
```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.

View File

@@ -1,92 +0,0 @@
```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>
NODE_ENV=<production|development>
```
- 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, Service } from '@sern/handler'
import { Client } from 'discord.js'
await makeDependencies({
build: (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')
}
})
```

View File

View File

@@ -1,30 +0,0 @@
# Introduction
Welcome to our official guide. This guide will go through all the core features of the framework.
- 💖 Thank you for choosing sern to be your framework!
- Teaching the discord.js library and / or Javascript / Typescript is out of scope of this project, so the documentation assumes you already know these elements.
- [discord.js](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)

View File

@@ -1,11 +0,0 @@
# Choosing an IDE
Choosing an IDE is a matter of personal preference. They make programming easier. The following are some
suggestions for choosing an IDE:
* [Visual Studio Code](https://code.visualstudio.com)
* we have an [snippet extension](https://marketplace.visualstudio.com/items?itemName=SrIzan.sern-snippets) to help automate development :)
* [Sublime Text](https://www.sublimetext.com/)
* [NotePad++](https://notepad-plus-plus.org/)
* [nvim](https://neovim.io/) (chad)

View File

@@ -1,14 +0,0 @@
# Preparing to Code
After installing an IDE, you need to install node.
[Click to download the LTS version of node right here](https://nodejs.org/en/download/).
After you downloaded node you will need:
#### [Discord token](https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token)
CONTINUE 🤓

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