mirror of
https://github.com/sern-handler/website
synced 2026-06-06 17:26:50 +00:00
Compare commits
18 Commits
feat/tutor
...
feat/spons
| Author | SHA1 | Date | |
|---|---|---|---|
| aba602380d | |||
| aebc4fd49c | |||
|
|
48423d7a89 | ||
|
|
83d3877102 | ||
|
|
e2ffc93116 | ||
| 78be0a3faa | |||
|
|
208061040f | ||
|
|
71735a778e | ||
|
|
23ed21fbf7 | ||
|
|
62ebeec1d9 | ||
|
|
7821e065e6 | ||
|
|
bc9c900197 | ||
|
|
d14ca62954 | ||
|
|
7dd24d8a6e | ||
|
|
c9d8ef511a | ||
|
|
6fb9c98a47 | ||
|
|
c7a06a0779 | ||
|
|
a48f96841a |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -14,7 +14,7 @@
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
.yarn/install-state.gz
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
22
.idea/inspectionProfiles/Project_Default.xml
generated
22
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -1,22 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="HtmlUnknownTag" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="myValues">
|
||||
<value>
|
||||
<list size="7">
|
||||
<item index="0" class="java.lang.String" itemvalue="nobr" />
|
||||
<item index="1" class="java.lang.String" itemvalue="noembed" />
|
||||
<item index="2" class="java.lang.String" itemvalue="comment" />
|
||||
<item index="3" class="java.lang.String" itemvalue="noscript" />
|
||||
<item index="4" class="java.lang.String" itemvalue="embed" />
|
||||
<item index="5" class="java.lang.String" itemvalue="script" />
|
||||
<item index="6" class="java.lang.String" itemvalue="herotitle_font" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
<option name="myCustomValuesEnabled" value="true" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="HtmlUnknownTarget" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
</profile>
|
||||
</component>
|
||||
177
.idea/workspace.xml
generated
177
.idea/workspace.xml
generated
@@ -4,7 +4,10 @@
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="53dd69d3-e01a-4656-b414-c727f5aa549a" name="Changes" comment="two dirs back" />
|
||||
<list default="true" id="53dd69d3-e01a-4656-b414-c727f5aa549a" name="Changes" comment="initial built from the ground up page done">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/components/Sponsors/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/Sponsors/index.js" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
@@ -13,14 +16,6 @@
|
||||
<component name="ComposerSettings">
|
||||
<execution />
|
||||
</component>
|
||||
<component name="FileTemplateManagerImpl">
|
||||
<option name="RECENT_TEMPLATES">
|
||||
<list>
|
||||
<option value="CSS File" />
|
||||
<option value="JavaScript File" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="Git.Merge.Settings">
|
||||
<option name="BRANCH" value="master" />
|
||||
</component>
|
||||
@@ -35,16 +30,10 @@
|
||||
</option>
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="GitHubPullRequestSearchHistory">{
|
||||
"lastFilter": {
|
||||
"state": "OPEN",
|
||||
"assignee": "SrIzan10"
|
||||
}
|
||||
}</component>
|
||||
<component name="GithubPullRequestsUISettings">
|
||||
<option name="selectedUrlAndAccountId">
|
||||
<UrlAndAccount>
|
||||
<option name="accountId" value="338eb51f-f02f-4dc6-997b-a87ba611c308" />
|
||||
<option name="accountId" value="1fedf39a-45aa-449b-9d1d-6f25985f42b4" />
|
||||
<option name="url" value="https://github.com/sern-handler/website.git" />
|
||||
</UrlAndAccount>
|
||||
</option>
|
||||
@@ -55,51 +44,37 @@
|
||||
<component name="MarkdownSettingsMigration">
|
||||
<option name="stateVersion" value="1" />
|
||||
</component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"associatedIndex": 7
|
||||
}</component>
|
||||
<component name="ProjectColorInfo"><![CDATA[{
|
||||
"associatedIndex": 5
|
||||
}]]></component>
|
||||
<component name="ProjectId" id="2DJXFY4dwukGLOzXi05b6lHCkuk" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||
"Git.Branch.Popup.ShowAllRemotes": "true",
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||
"WebServerToolWindowFactoryState": "false",
|
||||
"git-widget-placeholder": "feat/tutorial",
|
||||
"ignore.virus.scanning.warn.message": "true",
|
||||
"last_opened_file_path": "C:/Users/USER/Desktop/Development/mainwebsite",
|
||||
"list.type.of.created.stylesheet": "CSS",
|
||||
"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",
|
||||
"settings.editor.selected.configurable": "preferences.pluginManager",
|
||||
"ts.external.directory.path": "E:\\IntelliJ IDEA 2022.1.1\\plugins\\JavaScriptLanguage\\jsLanguageServicesImpl\\external",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
<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/sponsorpage",
|
||||
"kotlin-language-version-configured": "true",
|
||||
"last_opened_file_path": "C:/Users/jacob/OneDrive/Desktop/Projects/sern/website",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"project.structure.last.edited": "Modules",
|
||||
"project.structure.proportion": "0.0",
|
||||
"project.structure.side.proportion": "0.0",
|
||||
"ts.external.directory.path": "/home/srizan/Documents/Development/sern-website/node_modules/typescript/lib",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}</component>
|
||||
<component name="ReactDesignerToolWindowState">
|
||||
<option name="myId2Visible">
|
||||
<map>
|
||||
<entry key="com.haulmont.rcb.reactComponents" value="false" />
|
||||
<entry key="com.haulmont.rcb.reactInspector" value="false" />
|
||||
<entry key="com.haulmont.rcb.storybook" value="false" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
}]]></component>
|
||||
<component name="RecentsManager">
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="C:\Users\USER\Desktop\Development\sern-website\docs\tutorial\en\intro" />
|
||||
<recent name="C:\Users\USER\Desktop\Development\sern-website\docs\tutorial\en" />
|
||||
<recent name="C:\Users\jacob\IdeaProjects\website\static\img" />
|
||||
</key>
|
||||
</component>
|
||||
@@ -169,15 +144,7 @@
|
||||
<workItem from="1671119393024" duration="3889000" />
|
||||
<workItem from="1673974979200" duration="2385000" />
|
||||
<workItem from="1674757791435" duration="925000" />
|
||||
<workItem from="1693943174979" duration="3494000" />
|
||||
<workItem from="1693998900601" duration="4854000" />
|
||||
<workItem from="1694013887941" duration="680000" />
|
||||
<workItem from="1694014634755" duration="3452000" />
|
||||
<workItem from="1694086921138" duration="3532000" />
|
||||
<workItem from="1694095607446" duration="2640000" />
|
||||
<workItem from="1694170854677" duration="225000" />
|
||||
<workItem from="1694463335421" duration="56000" />
|
||||
<workItem from="1694533500197" duration="2188000" />
|
||||
<workItem from="1713448008567" duration="8323000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="feat: remove old index.html in static/">
|
||||
<created>1660418841831</created>
|
||||
@@ -368,71 +335,15 @@
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1673976828238</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00028" summary="fix: some grammar errors and dir structure">
|
||||
<task id="LOCAL-00028" summary="initial built from the ground up page done">
|
||||
<option name="closed" value="true" />
|
||||
<created>1693943258104</created>
|
||||
<created>1713463473768</created>
|
||||
<option name="number" value="00028" />
|
||||
<option name="presentableId" value="LOCAL-00028" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1693943258104</updated>
|
||||
<updated>1713463473768</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00029" summary="chore: move file structure">
|
||||
<option name="closed" value="true" />
|
||||
<created>1693943441448</created>
|
||||
<option name="number" value="00029" />
|
||||
<option name="presentableId" value="LOCAL-00029" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1693943441448</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00030" summary="rephrasing a bit and ropox introduction invasion">
|
||||
<option name="closed" value="true" />
|
||||
<created>1693944545011</created>
|
||||
<option name="number" value="00030" />
|
||||
<option name="presentableId" value="LOCAL-00030" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1693944545011</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00031" summary="add introduction for me (im egoist)">
|
||||
<option name="closed" value="true" />
|
||||
<created>1693999127245</created>
|
||||
<option name="number" value="00031" />
|
||||
<option name="presentableId" value="LOCAL-00031" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1693999127245</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00032" summary="move to mdx">
|
||||
<option name="closed" value="true" />
|
||||
<created>1693999615376</created>
|
||||
<option name="number" value="00032" />
|
||||
<option name="presentableId" value="LOCAL-00032" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1693999615376</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00033" summary="add title">
|
||||
<option name="closed" value="true" />
|
||||
<created>1693999895960</created>
|
||||
<option name="number" value="00033" />
|
||||
<option name="presentableId" value="LOCAL-00033" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1693999895960</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00034" summary="feedback system">
|
||||
<option name="closed" value="true" />
|
||||
<created>1694534513180</created>
|
||||
<option name="number" value="00034" />
|
||||
<option name="presentableId" value="LOCAL-00034" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1694534513180</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00035" summary="two dirs back">
|
||||
<option name="closed" value="true" />
|
||||
<created>1694535688773</created>
|
||||
<option name="number" value="00035" />
|
||||
<option name="presentableId" value="LOCAL-00035" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1694535688773</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="36" />
|
||||
<option name="localTasksCounter" value="29" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
@@ -450,6 +361,13 @@
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="feat: edit action" />
|
||||
<MESSAGE value="feat: delete needless assets/dir" />
|
||||
<MESSAGE value="feat: action changes and edit link" />
|
||||
<MESSAGE value="feat: add favicon" />
|
||||
<MESSAGE value="fix: broken link" />
|
||||
<MESSAGE value="chore: edit link so no new windows" />
|
||||
<MESSAGE value="chore: fix typo" />
|
||||
<MESSAGE value="feat: adding width attr" />
|
||||
<MESSAGE value="feat: adding blogs" />
|
||||
<MESSAGE value="feat: blogwork" />
|
||||
@@ -467,14 +385,11 @@
|
||||
<MESSAGE value="feat: update documentation and clarify documentation" />
|
||||
<MESSAGE value="fix: links" />
|
||||
<MESSAGE value="docs: add new plugins docs" />
|
||||
<MESSAGE value="fix: some grammar errors and dir structure" />
|
||||
<MESSAGE value="chore: move file structure" />
|
||||
<MESSAGE value="rephrasing a bit and ropox introduction invasion" />
|
||||
<MESSAGE value="add introduction for me (im egoist)" />
|
||||
<MESSAGE value="move to mdx" />
|
||||
<MESSAGE value="add title" />
|
||||
<MESSAGE value="feedback system" />
|
||||
<MESSAGE value="two dirs back" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="two dirs back" />
|
||||
<MESSAGE value="initial built from the ground up page done" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="initial built from the ground up page done" />
|
||||
</component>
|
||||
<component name="XSLT-Support.FileAssociations.UIState">
|
||||
<expand />
|
||||
<select />
|
||||
</component>
|
||||
</project>
|
||||
@@ -13,7 +13,7 @@ You see, on today's standards, having a simple logo is essential. Our logo align
|
||||
We were chilling, you know, cooking sern handler v3, sern gui, `npm create @sern/bot` and serncord when we thought about changing the logo to a sleek design with less colors.
|
||||
And here we are!
|
||||
|
||||
# Who did our new branding? {#ropox-thing}
|
||||
# Who did our new branding?
|
||||
|
||||
[Ropox](https://github.com/Murtatrxx)!
|
||||
Bro's the GOAT. This website is maintained by him, the domain costs are funded by him and also he started brainstorming how the logo would be on paper:
|
||||
|
||||
36
blog/2024-02-23-mdx-blog-post.md
Normal file
36
blog/2024-02-23-mdx-blog-post.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
slug: railway-deploy
|
||||
title: Deploying sern with Railway
|
||||
authors: [Duro]
|
||||
tags: [guides]
|
||||
---
|
||||
|
||||
In this guide, I'll be showing you how to deploy your sern bot with [Railway](https://railway.app/).
|
||||
|
||||
This guide assumes you have a sern bot already set up and ready to deploy. If you don't, you can follow the [Getting Started](/blog/getting-started) guide to set up your bot.
|
||||
|
||||
## GitHub Repository
|
||||
|
||||
The first thing you'll need to deploy your bot is a GitHub repository for your bot. If you don't have one, you can create one by following the [GitHub guide](https://docs.github.com/en/get-started/quickstart/create-a-repo).
|
||||
|
||||
Once you have your repository set up, you can push your bot's code to the repository, and you're ready to deploy using Railway.
|
||||
|
||||
## Railway Setup
|
||||
|
||||
After you have your bot's code in a GitHub repository, you'll need to create an account on Railway. You can sign up using your GitHub account at [railway.app](https://railway.app/).
|
||||
|
||||
Once you've created your account, navigate to the [dashboard](https://railway.app/dashboard) and click the "New Project" button. Click the "Deploy from GitHub repo" button, and select your bot's repository.
|
||||
|
||||
Once you've selected your repository, click the "Add Variables" button to add your bot's environment variables. You'll need your environment variables from your `.env` file to add to Railway. (You can also add these later if you want.)
|
||||
|
||||
## Deploy
|
||||
|
||||
Once you've added your environment variables, click the "Deploy" button, and Railway will start deploying your bot. Once the deployment is complete, you'll be able to see your bot's URL and logs.
|
||||
|
||||
:::note
|
||||
Make sure you add your environment variables, and your node start script is correct in your `package.json` file.
|
||||
|
||||
If you have any issues deploying your bot, you can check the logs for any errors.
|
||||
:::
|
||||
|
||||
That's it! Your bot is now deployed and running on Railway. If you have any issues or questions, feel free to ask in the [sern Discord server](https://sern.dev/discord).
|
||||
@@ -17,3 +17,8 @@ Murtatrxx:
|
||||
title: Developer
|
||||
url: https://github.com/Murtatrxx
|
||||
image_url: https://github.com/Murtatrxx.png
|
||||
Duro:
|
||||
name: Duro
|
||||
title: Developer
|
||||
url: https://github.com/DuroCodes
|
||||
image_url: https://github.com/DuroCodes.png
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// @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');
|
||||
const lightCodeTheme = require('prism-react-renderer').themes.nightOwlLight;
|
||||
const darkCodeTheme = require('prism-react-renderer').themes.oceanicNext;
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
@@ -27,6 +27,9 @@ const config = {
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en']
|
||||
},
|
||||
markdown: {
|
||||
format: 'detect'
|
||||
},
|
||||
presets: [
|
||||
[
|
||||
@@ -44,8 +47,9 @@ const config = {
|
||||
// Remove this to remove the "edit this page" links.
|
||||
editUrl:
|
||||
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
||||
blogSidebarCount: 'ALL',
|
||||
},
|
||||
pages : {
|
||||
pages: {
|
||||
path: 'src/pages',
|
||||
routeBasePath: '/',
|
||||
include: ['**/*.{js,jsx,ts,tsx,md,mdx}'],
|
||||
@@ -66,23 +70,23 @@ const config = {
|
||||
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',
|
||||
},
|
||||
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: {
|
||||
@@ -96,7 +100,7 @@ const config = {
|
||||
position: 'left',
|
||||
label: 'Docs & Guide',
|
||||
},
|
||||
{to: '/blog', label: 'Blog', position: 'left'},
|
||||
{ to: '/blog', label: 'Blog', position: 'left' },
|
||||
{
|
||||
href: 'https://github.com/sern-handler',
|
||||
label: 'GitHub',
|
||||
@@ -133,7 +137,7 @@ const config = {
|
||||
href: 'https://discord.gg/DwbF5H5JgQ',
|
||||
},
|
||||
{
|
||||
label : 'Open Collective',
|
||||
label: 'Open Collective',
|
||||
href: 'https://opencollective.com/sern'
|
||||
}
|
||||
],
|
||||
@@ -146,7 +150,7 @@ const config = {
|
||||
to: '/blog',
|
||||
},
|
||||
{
|
||||
label: 'GitHub',
|
||||
label: 'GitHub',
|
||||
href: 'https://github.com/sern-handler',
|
||||
},
|
||||
],
|
||||
@@ -154,16 +158,16 @@ const config = {
|
||||
],
|
||||
copyright: `Built with ❤️ by the sern Handler team and its contributors`,
|
||||
},
|
||||
metadata : [
|
||||
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' },
|
||||
{ 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: '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' },
|
||||
|
||||
@@ -40,7 +40,7 @@ CoreContext\<Message, ChatInputCommandInteraction\>.constructor
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:29](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L29)
|
||||
[src/core/structures/context.ts:29](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/context.ts#L29)
|
||||
|
||||
## Properties
|
||||
|
||||
@@ -54,7 +54,7 @@ CoreContext.ctx
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:29](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L29)
|
||||
[src/core/structures/context.ts:29](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/context.ts#L29)
|
||||
|
||||
## Accessors
|
||||
|
||||
@@ -68,7 +68,7 @@ CoreContext.ctx
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:39](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L39)
|
||||
[src/core/structures/context.ts:39](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/context.ts#L39)
|
||||
|
||||
___
|
||||
|
||||
@@ -82,7 +82,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:45](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L45)
|
||||
[src/core/structures/context.ts:45](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/context.ts#L45)
|
||||
|
||||
___
|
||||
|
||||
@@ -96,7 +96,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:91](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L91)
|
||||
[src/core/structures/context.ts:91](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/context.ts#L91)
|
||||
|
||||
___
|
||||
|
||||
@@ -110,7 +110,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:65](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L65)
|
||||
[src/core/structures/context.ts:65](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/context.ts#L65)
|
||||
|
||||
___
|
||||
|
||||
@@ -124,7 +124,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:71](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L71)
|
||||
[src/core/structures/context.ts:71](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/context.ts#L71)
|
||||
|
||||
___
|
||||
|
||||
@@ -138,7 +138,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:77](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L77)
|
||||
[src/core/structures/context.ts:77](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/context.ts#L77)
|
||||
|
||||
___
|
||||
|
||||
@@ -152,7 +152,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:33](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L33)
|
||||
[src/core/structures/context.ts:33](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/context.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -166,7 +166,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:97](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L97)
|
||||
[src/core/structures/context.ts:97](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/context.ts#L97)
|
||||
|
||||
___
|
||||
|
||||
@@ -184,7 +184,7 @@ 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)
|
||||
[src/core/structures/core-context.ts:15](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/core-context.ts#L15)
|
||||
|
||||
___
|
||||
|
||||
@@ -198,7 +198,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:85](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L85)
|
||||
[src/core/structures/context.ts:85](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/context.ts#L85)
|
||||
|
||||
___
|
||||
|
||||
@@ -216,7 +216,7 @@ 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)
|
||||
[src/core/structures/core-context.ts:12](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/core-context.ts#L12)
|
||||
|
||||
___
|
||||
|
||||
@@ -234,7 +234,7 @@ CoreContext.options
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:26](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L26)
|
||||
[src/core/structures/context.ts:26](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/context.ts#L26)
|
||||
|
||||
___
|
||||
|
||||
@@ -251,7 +251,7 @@ else, interaction.user
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:55](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L55)
|
||||
[src/core/structures/context.ts:55](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/context.ts#L55)
|
||||
|
||||
___
|
||||
|
||||
@@ -265,7 +265,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:61](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L61)
|
||||
[src/core/structures/context.ts:61](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/context.ts#L61)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -283,7 +283,7 @@ 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)
|
||||
[src/core/structures/core-context.ts:19](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/core-context.ts#L19)
|
||||
|
||||
___
|
||||
|
||||
@@ -301,7 +301,7 @@ 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)
|
||||
[src/core/structures/core-context.ts:23](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/core-context.ts#L23)
|
||||
|
||||
___
|
||||
|
||||
@@ -321,7 +321,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:103](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L103)
|
||||
[src/core/structures/context.ts:103](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/context.ts#L103)
|
||||
|
||||
___
|
||||
|
||||
@@ -345,4 +345,4 @@ CoreContext.wrap
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/context.ts:113](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/context.ts#L113)
|
||||
[src/core/structures/context.ts:113](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/context.ts#L113)
|
||||
|
||||
@@ -33,7 +33,7 @@ Version 4.0.0 will internalize this api. Please refrain from using the defaults!
|
||||
|
||||
#### 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)
|
||||
[src/core/structures/services/error-handling.ts:13](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/services/error-handling.ts#L13)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -61,7 +61,7 @@ Version 4 will remove this method
|
||||
|
||||
#### 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)
|
||||
[src/core/structures/services/error-handling.ts:9](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/services/error-handling.ts#L9)
|
||||
|
||||
___
|
||||
|
||||
@@ -87,4 +87,4 @@ A function that is called on every throw.
|
||||
|
||||
#### 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)
|
||||
[src/core/structures/services/error-handling.ts:15](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/services/error-handling.ts#L15)
|
||||
|
||||
@@ -37,7 +37,7 @@ Version 4.0.0 will internalize this api. Please refrain from using ModuleStore!
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/services/logger.ts:9](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/services/logger.ts#L9)
|
||||
[src/core/structures/services/logger.ts:9](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/services/logger.ts#L9)
|
||||
|
||||
___
|
||||
|
||||
@@ -61,7 +61,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/services/logger.ts:10](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/services/logger.ts#L10)
|
||||
[src/core/structures/services/logger.ts:10](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/services/logger.ts#L10)
|
||||
|
||||
___
|
||||
|
||||
@@ -85,7 +85,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/services/logger.ts:14](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/services/logger.ts#L14)
|
||||
[src/core/structures/services/logger.ts:14](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/services/logger.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
@@ -109,7 +109,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/services/logger.ts:18](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/services/logger.ts#L18)
|
||||
[src/core/structures/services/logger.ts:18](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/services/logger.ts#L18)
|
||||
|
||||
___
|
||||
|
||||
@@ -133,4 +133,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/services/logger.ts:22](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/services/logger.ts#L22)
|
||||
[src/core/structures/services/logger.ts:22](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/services/logger.ts#L22)
|
||||
|
||||
@@ -33,7 +33,7 @@ Version 4.0.0 will internalize this api. Please refrain from using DefaultModule
|
||||
|
||||
#### 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)
|
||||
[src/core/structures/services/module-manager.ts:11](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/services/module-manager.ts#L11)
|
||||
|
||||
## Properties
|
||||
|
||||
@@ -43,13 +43,13 @@ Version 4.0.0 will internalize this api. Please refrain from using DefaultModule
|
||||
|
||||
#### 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)
|
||||
[src/core/structures/services/module-manager.ts:11](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/services/module-manager.ts#L11)
|
||||
|
||||
## Methods
|
||||
|
||||
### get
|
||||
|
||||
▸ **get**(`id`): `undefined` \| `string`
|
||||
▸ **get**(`id`): `undefined` \| `Module`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -59,7 +59,7 @@ Version 4.0.0 will internalize this api. Please refrain from using DefaultModule
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| `string`
|
||||
`undefined` \| `Module`
|
||||
|
||||
#### Implementation of
|
||||
|
||||
@@ -67,13 +67,13 @@ Version 4.0.0 will internalize this api. Please refrain from using DefaultModule
|
||||
|
||||
#### 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)
|
||||
[src/core/structures/services/module-manager.ts:34](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/services/module-manager.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
### getByNameCommandType
|
||||
|
||||
▸ **getByNameCommandType**<`T`\>(`name`, `commandType`): `undefined` \| `Promise`<[`CommandModuleDefs`](../interfaces/CommandModuleDefs.md)[`T`]\>
|
||||
▸ **getByNameCommandType**<`T`\>(`name`, `commandType`): `undefined` \| [`CommandModuleDefs`](../interfaces/CommandModuleDefs.md)[`T`]
|
||||
|
||||
#### Type parameters
|
||||
|
||||
@@ -90,7 +90,7 @@ ___
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| `Promise`<[`CommandModuleDefs`](../interfaces/CommandModuleDefs.md)[`T`]\>
|
||||
`undefined` \| [`CommandModuleDefs`](../interfaces/CommandModuleDefs.md)[`T`]
|
||||
|
||||
#### Implementation of
|
||||
|
||||
@@ -98,7 +98,7 @@ ___
|
||||
|
||||
#### 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)
|
||||
[src/core/structures/services/module-manager.ts:14](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/services/module-manager.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
@@ -122,17 +122,19 @@ ___
|
||||
|
||||
#### 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)
|
||||
[src/core/structures/services/module-manager.ts:26](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/services/module-manager.ts#L26)
|
||||
|
||||
___
|
||||
|
||||
### getPublishableCommands
|
||||
|
||||
▸ **getPublishableCommands**(): `Promise`<[`CommandModule`](../modules.md#commandmodule)[]\>
|
||||
▸ **getPublishableCommands**(): [`CommandModule`](../modules.md#commandmodule)[]
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`CommandModule`](../modules.md#commandmodule)[]\>
|
||||
[`CommandModule`](../modules.md#commandmodule)[]
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
#### Implementation of
|
||||
|
||||
@@ -140,7 +142,7 @@ ___
|
||||
|
||||
#### 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)
|
||||
[src/core/structures/services/module-manager.ts:41](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/services/module-manager.ts#L41)
|
||||
|
||||
___
|
||||
|
||||
@@ -153,7 +155,7 @@ ___
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `id` | `string` |
|
||||
| `path` | `string` |
|
||||
| `path` | [`CommandModule`](../modules.md#commandmodule) |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -165,7 +167,7 @@ ___
|
||||
|
||||
#### 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)
|
||||
[src/core/structures/services/module-manager.ts:37](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/services/module-manager.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
@@ -190,4 +192,4 @@ ___
|
||||
|
||||
#### 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)
|
||||
[src/core/structures/services/module-manager.ts:22](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/services/module-manager.ts#L22)
|
||||
|
||||
@@ -6,12 +6,6 @@ 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
|
||||
@@ -26,15 +20,11 @@ Represents a core module store that stores IDs mapped to file paths.
|
||||
|
||||
### commands
|
||||
|
||||
• **commands**: `Map`<`string`, `string`\>
|
||||
|
||||
#### Implementation of
|
||||
|
||||
[CoreModuleStore](../interfaces/CoreModuleStore.md).[commands](../interfaces/CoreModuleStore.md#commands)
|
||||
• **commands**: `Map`<`string`, `Module`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/module-store.ts:11](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/module-store.ts#L11)
|
||||
[src/core/structures/module-store.ts:10](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/module-store.ts#L10)
|
||||
|
||||
___
|
||||
|
||||
@@ -42,10 +32,6 @@ ___
|
||||
|
||||
• **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)
|
||||
[src/core/structures/module-store.ts:9](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/module-store.ts#L9)
|
||||
|
||||
@@ -32,7 +32,7 @@ export default commandModule({
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/enums.ts:20](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/enums.ts#L20)
|
||||
[src/core/structures/enums.ts:20](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L20)
|
||||
|
||||
___
|
||||
|
||||
@@ -42,7 +42,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/enums.ts:23](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/enums.ts#L23)
|
||||
[src/core/structures/enums.ts:23](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L23)
|
||||
|
||||
___
|
||||
|
||||
@@ -52,7 +52,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/enums.ts:29](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/enums.ts#L29)
|
||||
[src/core/structures/enums.ts:29](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L29)
|
||||
|
||||
___
|
||||
|
||||
@@ -62,7 +62,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/enums.ts:22](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/enums.ts#L22)
|
||||
[src/core/structures/enums.ts:22](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L22)
|
||||
|
||||
___
|
||||
|
||||
@@ -72,7 +72,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/enums.ts:21](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/enums.ts#L21)
|
||||
[src/core/structures/enums.ts:21](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L21)
|
||||
|
||||
___
|
||||
|
||||
@@ -82,7 +82,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/enums.ts:28](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/enums.ts#L28)
|
||||
[src/core/structures/enums.ts:28](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L28)
|
||||
|
||||
___
|
||||
|
||||
@@ -92,7 +92,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/enums.ts:25](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/enums.ts#L25)
|
||||
[src/core/structures/enums.ts:25](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L25)
|
||||
|
||||
___
|
||||
|
||||
@@ -102,7 +102,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/enums.ts:27](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/enums.ts#L27)
|
||||
[src/core/structures/enums.ts:27](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L27)
|
||||
|
||||
___
|
||||
|
||||
@@ -112,7 +112,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/enums.ts:19](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/enums.ts#L19)
|
||||
[src/core/structures/enums.ts:19](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L19)
|
||||
|
||||
___
|
||||
|
||||
@@ -122,7 +122,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/enums.ts:24](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/enums.ts#L24)
|
||||
[src/core/structures/enums.ts:24](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L24)
|
||||
|
||||
___
|
||||
|
||||
@@ -132,7 +132,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/enums.ts:18](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/enums.ts#L18)
|
||||
[src/core/structures/enums.ts:18](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L18)
|
||||
|
||||
___
|
||||
|
||||
@@ -142,4 +142,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/enums.ts:26](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/enums.ts#L26)
|
||||
[src/core/structures/enums.ts:26](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L26)
|
||||
|
||||
@@ -31,7 +31,7 @@ The EventType for handling discord events
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/enums.ts:51](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/enums.ts#L51)
|
||||
[src/core/structures/enums.ts:51](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L51)
|
||||
|
||||
___
|
||||
|
||||
@@ -44,7 +44,7 @@ Could be for example, `process` events, database events
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/enums.ts:60](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/enums.ts#L60)
|
||||
[src/core/structures/enums.ts:60](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L60)
|
||||
|
||||
___
|
||||
|
||||
@@ -56,4 +56,4 @@ The EventType for handling sern events
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/enums.ts:55](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/enums.ts#L55)
|
||||
[src/core/structures/enums.ts:55](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L55)
|
||||
|
||||
@@ -16,7 +16,7 @@ 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)
|
||||
[src/core/structures/enums.ts:98](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L98)
|
||||
|
||||
___
|
||||
|
||||
@@ -28,7 +28,7 @@ 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)
|
||||
[src/core/structures/enums.ts:94](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L94)
|
||||
|
||||
___
|
||||
|
||||
@@ -40,4 +40,4 @@ 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)
|
||||
[src/core/structures/enums.ts:102](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L102)
|
||||
|
||||
@@ -30,7 +30,7 @@ The PluginType for EventPlugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/enums.ts:85](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/enums.ts#L85)
|
||||
[src/core/structures/enums.ts:85](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L85)
|
||||
|
||||
___
|
||||
|
||||
@@ -42,4 +42,4 @@ The PluginType for InitPlugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/structures/enums.ts:81](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/structures/enums.ts#L81)
|
||||
[src/core/structures/enums.ts:81](https://github.com/sern-handler/handler/blob/2106522/src/core/structures/enums.ts#L81)
|
||||
|
||||
@@ -50,26 +50,6 @@ export default commandModule({
|
||||
});
|
||||
```
|
||||
</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).
|
||||
@@ -79,7 +59,8 @@ export default commandModule({
|
||||
- [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.
|
||||
|
||||
- [Man Nomic](https://github.com/jacoobes/man-nomic), A simple information bot to provide information to the nomic-ai discord community.
|
||||
- [Linear-Discord](https://github.com/sern-handler/linear-discord) Display and manage a linear dashboard.
|
||||
## 💻 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.
|
||||
|
||||
@@ -20,7 +20,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:126](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L126)
|
||||
[src/types/core-modules.ts:125](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L125)
|
||||
|
||||
___
|
||||
|
||||
@@ -34,7 +34,7 @@ Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:127](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L127)
|
||||
[src/types/core-modules.ts:126](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L126)
|
||||
|
||||
___
|
||||
|
||||
@@ -63,7 +63,7 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:129](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L129)
|
||||
[src/types/core-modules.ts:128](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L128)
|
||||
|
||||
___
|
||||
|
||||
@@ -77,7 +77,7 @@ Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -91,7 +91,7 @@ Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -101,7 +101,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:128](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L128)
|
||||
[src/types/core-modules.ts:127](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L127)
|
||||
|
||||
___
|
||||
|
||||
@@ -115,7 +115,7 @@ Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -129,4 +129,4 @@ Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:125](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L125)
|
||||
[src/types/core-modules.ts:124](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L124)
|
||||
|
||||
@@ -24,7 +24,7 @@ Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
@@ -52,7 +52,7 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:66](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L66)
|
||||
[src/types/core-modules.ts:65](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L65)
|
||||
|
||||
___
|
||||
|
||||
@@ -66,7 +66,7 @@ Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -80,7 +80,7 @@ Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -94,7 +94,7 @@ Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -108,4 +108,4 @@ Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:65](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L65)
|
||||
[src/types/core-modules.ts:64](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L64)
|
||||
|
||||
@@ -24,7 +24,7 @@ Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
@@ -52,7 +52,7 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:76](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L76)
|
||||
[src/types/core-modules.ts:75](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L75)
|
||||
|
||||
___
|
||||
|
||||
@@ -66,7 +66,7 @@ Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -80,7 +80,7 @@ Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -94,7 +94,7 @@ Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -108,4 +108,4 @@ Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:75](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L75)
|
||||
[src/types/core-modules.ts:74](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L74)
|
||||
|
||||
@@ -14,7 +14,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:151](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L151)
|
||||
[src/types/core-modules.ts:150](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L150)
|
||||
|
||||
___
|
||||
|
||||
@@ -24,7 +24,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:159](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L159)
|
||||
[src/types/core-modules.ts:158](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L158)
|
||||
|
||||
___
|
||||
|
||||
@@ -34,7 +34,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:161](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L161)
|
||||
[src/types/core-modules.ts:160](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L160)
|
||||
|
||||
___
|
||||
|
||||
@@ -44,7 +44,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:156](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L156)
|
||||
[src/types/core-modules.ts:155](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L155)
|
||||
|
||||
___
|
||||
|
||||
@@ -54,7 +54,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:152](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L152)
|
||||
[src/types/core-modules.ts:151](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L151)
|
||||
|
||||
___
|
||||
|
||||
@@ -64,7 +64,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:158](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L158)
|
||||
[src/types/core-modules.ts:157](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L157)
|
||||
|
||||
___
|
||||
|
||||
@@ -74,7 +74,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:153](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L153)
|
||||
[src/types/core-modules.ts:152](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L152)
|
||||
|
||||
___
|
||||
|
||||
@@ -84,7 +84,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:157](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L157)
|
||||
[src/types/core-modules.ts:156](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L156)
|
||||
|
||||
___
|
||||
|
||||
@@ -94,7 +94,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:155](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L155)
|
||||
[src/types/core-modules.ts:154](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L154)
|
||||
|
||||
___
|
||||
|
||||
@@ -104,7 +104,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:160](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L160)
|
||||
[src/types/core-modules.ts:159](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L159)
|
||||
|
||||
___
|
||||
|
||||
@@ -114,7 +114,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:162](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L162)
|
||||
[src/types/core-modules.ts:161](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L161)
|
||||
|
||||
___
|
||||
|
||||
@@ -124,4 +124,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:154](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L154)
|
||||
[src/types/core-modules.ts:153](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L153)
|
||||
|
||||
@@ -24,7 +24,7 @@ Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
@@ -52,7 +52,7 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:61](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L61)
|
||||
[src/types/core-modules.ts:60](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L60)
|
||||
|
||||
___
|
||||
|
||||
@@ -66,7 +66,7 @@ Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -80,7 +80,7 @@ Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -94,7 +94,7 @@ Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -108,4 +108,4 @@ Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:60](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L60)
|
||||
[src/types/core-modules.ts:59](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L59)
|
||||
|
||||
@@ -24,7 +24,7 @@ Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
@@ -52,7 +52,7 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:56](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L56)
|
||||
[src/types/core-modules.ts:55](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L55)
|
||||
|
||||
___
|
||||
|
||||
@@ -66,7 +66,7 @@ Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -80,7 +80,7 @@ Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -94,7 +94,7 @@ Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -108,4 +108,4 @@ Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:55](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L55)
|
||||
[src/types/core-modules.ts:54](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L54)
|
||||
|
||||
@@ -34,7 +34,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-plugin.ts:73](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-plugin.ts#L73)
|
||||
[src/types/core-plugin.ts:73](https://github.com/sern-handler/handler/blob/2106522/src/types/core-plugin.ts#L73)
|
||||
|
||||
___
|
||||
|
||||
@@ -44,4 +44,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-plugin.ts:72](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-plugin.ts#L72)
|
||||
[src/types/core-plugin.ts:72](https://github.com/sern-handler/handler/blob/2106522/src/types/core-plugin.ts#L72)
|
||||
|
||||
@@ -22,7 +22,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-plugin.ts:59](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-plugin.ts#L59)
|
||||
[src/types/core-plugin.ts:59](https://github.com/sern-handler/handler/blob/2106522/src/types/core-plugin.ts#L59)
|
||||
|
||||
___
|
||||
|
||||
@@ -40,4 +40,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-plugin.ts:60](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-plugin.ts#L60)
|
||||
[src/types/core-plugin.ts:60](https://github.com/sern-handler/handler/blob/2106522/src/types/core-plugin.ts#L60)
|
||||
|
||||
@@ -22,7 +22,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/ioc.ts:28](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/ioc.ts#L28)
|
||||
[src/types/ioc.ts:28](https://github.com/sern-handler/handler/blob/2106522/src/types/ioc.ts#L28)
|
||||
|
||||
___
|
||||
|
||||
@@ -40,7 +40,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/ioc.ts:30](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/ioc.ts#L30)
|
||||
[src/types/ioc.ts:29](https://github.com/sern-handler/handler/blob/2106522/src/types/ioc.ts#L29)
|
||||
|
||||
___
|
||||
|
||||
@@ -58,7 +58,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/ioc.ts:33](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/ioc.ts#L33)
|
||||
[src/types/ioc.ts:36](https://github.com/sern-handler/handler/blob/2106522/src/types/ioc.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
@@ -76,7 +76,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/ioc.ts:29](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/ioc.ts#L29)
|
||||
[src/types/ioc.ts:37](https://github.com/sern-handler/handler/blob/2106522/src/types/ioc.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
@@ -94,7 +94,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/ioc.ts:32](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/ioc.ts#L32)
|
||||
[src/types/ioc.ts:35](https://github.com/sern-handler/handler/blob/2106522/src/types/ioc.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -110,6 +110,10 @@ ___
|
||||
|
||||
[`CoreModuleStore`](CoreModuleStore.md)
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
Will be removed and turned internal
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/ioc.ts:31](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/ioc.ts#L31)
|
||||
[src/types/ioc.ts:34](https://github.com/sern-handler/handler/blob/2106522/src/types/ioc.ts#L34)
|
||||
|
||||
@@ -8,19 +8,15 @@ 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`\>
|
||||
• **commands**: `Map`<`string`, `Module`\>
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/module-store.ts:7](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/module-store.ts#L7)
|
||||
[src/core/contracts/module-store.ts:7](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/module-store.ts#L7)
|
||||
|
||||
___
|
||||
|
||||
@@ -30,4 +26,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/module-store.ts:8](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/module-store.ts#L8)
|
||||
[src/core/contracts/module-store.ts:8](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/module-store.ts#L8)
|
||||
|
||||
@@ -30,7 +30,7 @@ Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
@@ -44,7 +44,7 @@ Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:107](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L107)
|
||||
[src/types/core-modules.ts:106](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L106)
|
||||
|
||||
___
|
||||
|
||||
@@ -58,7 +58,7 @@ Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -72,7 +72,7 @@ Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -86,7 +86,7 @@ Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:108](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L108)
|
||||
[src/types/core-modules.ts:107](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L107)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -110,4 +110,4 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:109](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L109)
|
||||
[src/types/core-modules.ts:108](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L108)
|
||||
|
||||
@@ -21,4 +21,4 @@ Let dependencies implement this to dispose and cleanup.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/disposable.ts:8](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/disposable.ts#L8)
|
||||
[src/core/contracts/hooks.ts:15](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/hooks.ts#L15)
|
||||
|
||||
@@ -25,7 +25,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/emitter.ts:4](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/emitter.ts#L4)
|
||||
[src/core/contracts/emitter.ts:6](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/emitter.ts#L6)
|
||||
|
||||
___
|
||||
|
||||
@@ -46,7 +46,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/emitter.ts:6](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/emitter.ts#L6)
|
||||
[src/core/contracts/emitter.ts:8](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/emitter.ts#L8)
|
||||
|
||||
___
|
||||
|
||||
@@ -67,4 +67,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/emitter.ts:5](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/emitter.ts#L5)
|
||||
[src/core/contracts/emitter.ts:7](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/emitter.ts#L7)
|
||||
|
||||
@@ -36,7 +36,7 @@ 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)
|
||||
[src/core/contracts/error-handling.ts:9](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/error-handling.ts#L9)
|
||||
|
||||
___
|
||||
|
||||
@@ -58,4 +58,4 @@ A function that is called on every throw.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/error-handling.ts:16](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/error-handling.ts#L16)
|
||||
[src/core/contracts/error-handling.ts:14](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/error-handling.ts#L14)
|
||||
|
||||
@@ -14,7 +14,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:167](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L167)
|
||||
[src/types/core-modules.ts:166](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L166)
|
||||
|
||||
___
|
||||
|
||||
@@ -24,7 +24,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:166](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L166)
|
||||
[src/types/core-modules.ts:165](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L165)
|
||||
|
||||
___
|
||||
|
||||
@@ -34,4 +34,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:168](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L168)
|
||||
[src/types/core-modules.ts:167](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L167)
|
||||
|
||||
@@ -24,7 +24,7 @@ Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
@@ -34,7 +34,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:49](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L49)
|
||||
[src/types/core-modules.ts:48](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L48)
|
||||
|
||||
___
|
||||
|
||||
@@ -48,7 +48,7 @@ Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:48](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L48)
|
||||
[src/types/core-modules.ts:47](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L47)
|
||||
|
||||
___
|
||||
|
||||
@@ -62,7 +62,7 @@ Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -76,7 +76,7 @@ Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -90,7 +90,7 @@ Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:50](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L50)
|
||||
[src/types/core-modules.ts:49](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L49)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -114,4 +114,4 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:51](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L51)
|
||||
[src/types/core-modules.ts:50](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L50)
|
||||
|
||||
@@ -21,4 +21,4 @@ Let dependencies implement this to initiate some logic.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/init.ts:8](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/init.ts#L8)
|
||||
[src/core/contracts/hooks.ts:7](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/hooks.ts#L7)
|
||||
|
||||
@@ -34,7 +34,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-plugin.ts:69](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-plugin.ts#L69)
|
||||
[src/types/core-plugin.ts:69](https://github.com/sern-handler/handler/blob/2106522/src/types/core-plugin.ts#L69)
|
||||
|
||||
___
|
||||
|
||||
@@ -44,4 +44,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-plugin.ts:68](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-plugin.ts#L68)
|
||||
[src/types/core-plugin.ts:68](https://github.com/sern-handler/handler/blob/2106522/src/types/core-plugin.ts#L68)
|
||||
|
||||
@@ -38,7 +38,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/logging.ts:8](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/logging.ts#L8)
|
||||
[src/core/contracts/logging.ts:8](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/logging.ts#L8)
|
||||
|
||||
___
|
||||
|
||||
@@ -58,7 +58,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/logging.ts:5](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/logging.ts#L5)
|
||||
[src/core/contracts/logging.ts:5](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/logging.ts#L5)
|
||||
|
||||
___
|
||||
|
||||
@@ -78,7 +78,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/logging.ts:7](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/logging.ts#L7)
|
||||
[src/core/contracts/logging.ts:7](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/logging.ts#L7)
|
||||
|
||||
___
|
||||
|
||||
@@ -98,4 +98,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/logging.ts:6](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/logging.ts#L6)
|
||||
[src/core/contracts/logging.ts:6](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/logging.ts#L6)
|
||||
|
||||
@@ -24,7 +24,7 @@ Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
@@ -52,7 +52,7 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:86](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L86)
|
||||
[src/types/core-modules.ts:85](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L85)
|
||||
|
||||
___
|
||||
|
||||
@@ -66,7 +66,7 @@ Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -80,7 +80,7 @@ Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -94,7 +94,7 @@ Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -108,4 +108,4 @@ Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:85](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L85)
|
||||
[src/types/core-modules.ts:84](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L84)
|
||||
|
||||
@@ -24,7 +24,7 @@ Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
@@ -52,7 +52,7 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:96](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L96)
|
||||
[src/types/core-modules.ts:95](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L95)
|
||||
|
||||
___
|
||||
|
||||
@@ -66,7 +66,7 @@ Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -80,7 +80,7 @@ Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -94,7 +94,7 @@ Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -108,4 +108,4 @@ Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:95](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L95)
|
||||
[src/types/core-modules.ts:94](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L94)
|
||||
|
||||
@@ -25,7 +25,7 @@ custom_edit_url: null
|
||||
|
||||
### get
|
||||
|
||||
▸ **get**(`id`): `undefined` \| `string`
|
||||
▸ **get**(`id`): `undefined` \| `Module`
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -35,17 +35,17 @@ custom_edit_url: null
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| `string`
|
||||
`undefined` \| `Module`
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/module-manager.ts:19](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/module-manager.ts#L19)
|
||||
[src/core/contracts/module-manager.ts:19](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/module-manager.ts#L19)
|
||||
|
||||
___
|
||||
|
||||
### getByNameCommandType
|
||||
|
||||
▸ **getByNameCommandType**<`T`\>(`name`, `commandType`): `undefined` \| `Promise`<[`CommandModuleDefs`](CommandModuleDefs.md)[`T`]\>
|
||||
▸ **getByNameCommandType**<`T`\>(`name`, `commandType`): `undefined` \| [`CommandModuleDefs`](CommandModuleDefs.md)[`T`]
|
||||
|
||||
#### Type parameters
|
||||
|
||||
@@ -62,11 +62,11 @@ ___
|
||||
|
||||
#### Returns
|
||||
|
||||
`undefined` \| `Promise`<[`CommandModuleDefs`](CommandModuleDefs.md)[`T`]\>
|
||||
`undefined` \| [`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)
|
||||
[src/core/contracts/module-manager.ts:30](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/module-manager.ts#L30)
|
||||
|
||||
___
|
||||
|
||||
@@ -90,21 +90,23 @@ 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)
|
||||
[src/core/contracts/module-manager.ts:10](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/module-manager.ts#L10)
|
||||
|
||||
___
|
||||
|
||||
### getPublishableCommands
|
||||
|
||||
▸ **getPublishableCommands**(): `Promise`<[`CommandModule`](../modules.md#commandmodule)[]\>
|
||||
▸ **getPublishableCommands**(): [`CommandModule`](../modules.md#commandmodule)[]
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`<[`CommandModule`](../modules.md#commandmodule)[]\>
|
||||
[`CommandModule`](../modules.md#commandmodule)[]
|
||||
|
||||
**`Deprecated`**
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/module-manager.ts:22](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/module-manager.ts#L22)
|
||||
[src/core/contracts/module-manager.ts:25](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/module-manager.ts#L25)
|
||||
|
||||
___
|
||||
|
||||
@@ -117,7 +119,7 @@ ___
|
||||
| Name | Type |
|
||||
| :------ | :------ |
|
||||
| `id` | `string` |
|
||||
| `path` | `string` |
|
||||
| `path` | `Module` |
|
||||
|
||||
#### Returns
|
||||
|
||||
@@ -125,7 +127,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/module-manager.ts:21](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/module-manager.ts#L21)
|
||||
[src/core/contracts/module-manager.ts:21](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/module-manager.ts#L21)
|
||||
|
||||
___
|
||||
|
||||
@@ -150,4 +152,4 @@ 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)
|
||||
[src/core/contracts/module-manager.ts:11](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/module-manager.ts#L11)
|
||||
|
||||
@@ -34,7 +34,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-plugin.ts:64](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-plugin.ts#L64)
|
||||
[src/types/core-plugin.ts:64](https://github.com/sern-handler/handler/blob/2106522/src/types/core-plugin.ts#L64)
|
||||
|
||||
___
|
||||
|
||||
@@ -44,4 +44,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-plugin.ts:63](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-plugin.ts#L63)
|
||||
[src/types/core-plugin.ts:63](https://github.com/sern-handler/handler/blob/2106522/src/types/core-plugin.ts#L63)
|
||||
|
||||
@@ -15,7 +15,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/presences.ts:11](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L11)
|
||||
[src/core/presences.ts:11](https://github.com/sern-handler/handler/blob/2106522/src/core/presences.ts#L11)
|
||||
|
||||
___
|
||||
|
||||
@@ -25,7 +25,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/presences.ts:10](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L10)
|
||||
[src/core/presences.ts:10](https://github.com/sern-handler/handler/blob/2106522/src/core/presences.ts#L10)
|
||||
|
||||
___
|
||||
|
||||
@@ -49,7 +49,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/presences.ts:14](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L14)
|
||||
[src/core/presences.ts:14](https://github.com/sern-handler/handler/blob/2106522/src/core/presences.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
@@ -59,7 +59,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/presences.ts:13](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L13)
|
||||
[src/core/presences.ts:13](https://github.com/sern-handler/handler/blob/2106522/src/core/presences.ts#L13)
|
||||
|
||||
___
|
||||
|
||||
@@ -69,7 +69,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/presences.ts:12](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L12)
|
||||
[src/core/presences.ts:12](https://github.com/sern-handler/handler/blob/2106522/src/core/presences.ts#L12)
|
||||
|
||||
___
|
||||
|
||||
@@ -79,4 +79,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/presences.ts:9](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L9)
|
||||
[src/core/presences.ts:9](https://github.com/sern-handler/handler/blob/2106522/src/core/presences.ts#L9)
|
||||
|
||||
@@ -24,7 +24,7 @@ Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
@@ -52,7 +52,7 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:81](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L81)
|
||||
[src/types/core-modules.ts:80](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L80)
|
||||
|
||||
___
|
||||
|
||||
@@ -66,7 +66,7 @@ Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -80,7 +80,7 @@ Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -94,7 +94,7 @@ Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -108,4 +108,4 @@ Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:80](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L80)
|
||||
[src/types/core-modules.ts:79](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L79)
|
||||
|
||||
@@ -20,7 +20,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:173](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L173)
|
||||
[src/types/core-modules.ts:172](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L172)
|
||||
|
||||
___
|
||||
|
||||
@@ -30,7 +30,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:178](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L178)
|
||||
[src/types/core-modules.ts:177](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L177)
|
||||
|
||||
___
|
||||
|
||||
@@ -110,4 +110,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:174](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L174)
|
||||
[src/types/core-modules.ts:173](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L173)
|
||||
|
||||
@@ -30,7 +30,7 @@ Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
@@ -44,7 +44,7 @@ Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:43](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L43)
|
||||
[src/types/core-modules.ts:42](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L42)
|
||||
|
||||
___
|
||||
|
||||
@@ -58,7 +58,7 @@ Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -72,7 +72,7 @@ Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -86,7 +86,7 @@ Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:44](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L44)
|
||||
[src/types/core-modules.ts:43](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L43)
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -110,4 +110,4 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:45](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L45)
|
||||
[src/types/core-modules.ts:44](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L44)
|
||||
|
||||
@@ -14,7 +14,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/utility.ts:21](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/utility.ts#L21)
|
||||
[src/types/utility.ts:21](https://github.com/sern-handler/handler/blob/2106522/src/types/utility.ts#L21)
|
||||
|
||||
___
|
||||
|
||||
@@ -24,7 +24,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/utility.ts:20](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/utility.ts#L20)
|
||||
[src/types/utility.ts:20](https://github.com/sern-handler/handler/blob/2106522/src/types/utility.ts#L20)
|
||||
|
||||
___
|
||||
|
||||
@@ -34,7 +34,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/utility.ts:19](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/utility.ts#L19)
|
||||
[src/types/utility.ts:19](https://github.com/sern-handler/handler/blob/2106522/src/types/utility.ts#L19)
|
||||
|
||||
___
|
||||
|
||||
@@ -44,7 +44,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/utility.ts:23](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/utility.ts#L23)
|
||||
[src/types/utility.ts:23](https://github.com/sern-handler/handler/blob/2106522/src/types/utility.ts#L23)
|
||||
|
||||
___
|
||||
|
||||
@@ -54,4 +54,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/utility.ts:22](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/utility.ts#L22)
|
||||
[src/types/utility.ts:22](https://github.com/sern-handler/handler/blob/2106522/src/types/utility.ts#L22)
|
||||
|
||||
@@ -76,7 +76,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:210](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L210)
|
||||
[src/types/core-modules.ts:209](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L209)
|
||||
|
||||
___
|
||||
|
||||
@@ -104,4 +104,4 @@ APIApplicationCommandOptionBase.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:209](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L209)
|
||||
[src/types/core-modules.ts:208](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L208)
|
||||
|
||||
@@ -90,7 +90,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:215](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L215)
|
||||
[src/types/core-modules.ts:214](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L214)
|
||||
|
||||
___
|
||||
|
||||
@@ -114,4 +114,4 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:214](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L214)
|
||||
[src/types/core-modules.ts:213](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L213)
|
||||
|
||||
@@ -24,7 +24,7 @@ Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:119](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L119)
|
||||
[src/types/core-modules.ts:118](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L118)
|
||||
|
||||
___
|
||||
|
||||
@@ -53,7 +53,7 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:121](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L121)
|
||||
[src/types/core-modules.ts:120](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L120)
|
||||
|
||||
___
|
||||
|
||||
@@ -67,7 +67,7 @@ Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -81,7 +81,7 @@ Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -91,7 +91,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:120](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L120)
|
||||
[src/types/core-modules.ts:119](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L119)
|
||||
|
||||
___
|
||||
|
||||
@@ -105,7 +105,7 @@ Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -119,4 +119,4 @@ Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:118](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L118)
|
||||
[src/types/core-modules.ts:117](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L117)
|
||||
|
||||
@@ -24,7 +24,7 @@ Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
@@ -52,7 +52,7 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:71](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L71)
|
||||
[src/types/core-modules.ts:70](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L70)
|
||||
|
||||
___
|
||||
|
||||
@@ -66,7 +66,7 @@ Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -80,7 +80,7 @@ Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -94,7 +94,7 @@ Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -108,4 +108,4 @@ Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:70](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L70)
|
||||
[src/types/core-modules.ts:69](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L69)
|
||||
|
||||
@@ -20,7 +20,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:113](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L113)
|
||||
[src/types/core-modules.ts:112](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L112)
|
||||
|
||||
___
|
||||
|
||||
@@ -34,7 +34,7 @@ Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
@@ -63,7 +63,7 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:114](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L114)
|
||||
[src/types/core-modules.ts:113](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L113)
|
||||
|
||||
___
|
||||
|
||||
@@ -77,7 +77,7 @@ Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -91,7 +91,7 @@ Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -105,7 +105,7 @@ Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -119,4 +119,4 @@ Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:112](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L112)
|
||||
[src/types/core-modules.ts:111](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L111)
|
||||
|
||||
@@ -24,7 +24,7 @@ Module.description
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L37)
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L36)
|
||||
|
||||
___
|
||||
|
||||
@@ -52,7 +52,7 @@ Module.execute
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:91](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L91)
|
||||
[src/types/core-modules.ts:90](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L90)
|
||||
|
||||
___
|
||||
|
||||
@@ -66,7 +66,7 @@ Module.name
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L34)
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L33)
|
||||
|
||||
___
|
||||
|
||||
@@ -80,7 +80,7 @@ Module.onEvent
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L35)
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L34)
|
||||
|
||||
___
|
||||
|
||||
@@ -94,7 +94,7 @@ Module.plugins
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L36)
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L35)
|
||||
|
||||
___
|
||||
|
||||
@@ -108,4 +108,4 @@ Module.type
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:90](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L90)
|
||||
[src/types/core-modules.ts:89](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L89)
|
||||
|
||||
@@ -14,7 +14,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core.ts:9](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core.ts#L9)
|
||||
[src/types/core.ts:9](https://github.com/sern-handler/handler/blob/2106522/src/types/core.ts#L9)
|
||||
|
||||
___
|
||||
|
||||
@@ -30,7 +30,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core.ts:20](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core.ts#L20)
|
||||
[src/types/core.ts:20](https://github.com/sern-handler/handler/blob/2106522/src/types/core.ts#L20)
|
||||
|
||||
___
|
||||
|
||||
@@ -40,7 +40,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core.ts:10](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core.ts#L10)
|
||||
[src/types/core.ts:10](https://github.com/sern-handler/handler/blob/2106522/src/types/core.ts#L10)
|
||||
|
||||
___
|
||||
|
||||
@@ -50,7 +50,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core.ts:11](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core.ts#L11)
|
||||
[src/types/core.ts:11](https://github.com/sern-handler/handler/blob/2106522/src/types/core.ts#L11)
|
||||
|
||||
___
|
||||
|
||||
@@ -66,4 +66,4 @@ Overload to enable mode in case developer does not use a .env file.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core.ts:16](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core.ts#L16)
|
||||
[src/types/core.ts:16](https://github.com/sern-handler/handler/blob/2106522/src/types/core.ts#L16)
|
||||
|
||||
@@ -20,14 +20,11 @@ custom_edit_url: null
|
||||
|
||||
## 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
|
||||
|
||||
@@ -74,7 +71,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-plugin.ts:76](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-plugin.ts#L76)
|
||||
[src/types/core-plugin.ts:76](https://github.com/sern-handler/handler/blob/2106522/src/types/core-plugin.ts#L76)
|
||||
|
||||
___
|
||||
|
||||
@@ -84,7 +81,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-plugin.ts:77](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-plugin.ts#L77)
|
||||
[src/types/core-plugin.ts:77](https://github.com/sern-handler/handler/blob/2106522/src/types/core-plugin.ts#L77)
|
||||
|
||||
___
|
||||
|
||||
@@ -94,7 +91,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/utility.ts:16](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/utility.ts#L16)
|
||||
[src/types/utility.ts:16](https://github.com/sern-handler/handler/blob/2106522/src/types/utility.ts#L16)
|
||||
|
||||
___
|
||||
|
||||
@@ -104,7 +101,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:133](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L133)
|
||||
[src/types/core-modules.ts:132](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L132)
|
||||
|
||||
___
|
||||
|
||||
@@ -114,7 +111,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:132](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L132)
|
||||
[src/types/core-modules.ts:131](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L131)
|
||||
|
||||
___
|
||||
|
||||
@@ -133,7 +130,7 @@ If T has an init method, this will be called.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/ioc.ts:17](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/ioc.ts#L17)
|
||||
[src/types/ioc.ts:17](https://github.com/sern-handler/handler/blob/2106522/src/types/ioc.ts#L17)
|
||||
|
||||
___
|
||||
|
||||
@@ -155,7 +152,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/contracts/logging.ts:11](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/contracts/logging.ts#L11)
|
||||
[src/core/contracts/logging.ts:11](https://github.com/sern-handler/handler/blob/2106522/src/core/contracts/logging.ts#L11)
|
||||
|
||||
___
|
||||
|
||||
@@ -165,7 +162,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/utility.ts:26](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/utility.ts#L26)
|
||||
[src/types/utility.ts:26](https://github.com/sern-handler/handler/blob/2106522/src/types/utility.ts#L26)
|
||||
|
||||
___
|
||||
|
||||
@@ -175,7 +172,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-plugin.ts:51](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-plugin.ts#L51)
|
||||
[src/types/core-plugin.ts:51](https://github.com/sern-handler/handler/blob/2106522/src/types/core-plugin.ts#L51)
|
||||
|
||||
___
|
||||
|
||||
@@ -187,7 +184,7 @@ Type that replaces autocomplete with [SernAutocompleteData](interfaces/SernAutoc
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/core-modules.ts:201](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/core-modules.ts#L201)
|
||||
[src/types/core-modules.ts:200](https://github.com/sern-handler/handler/blob/2106522/src/types/core-modules.ts#L200)
|
||||
|
||||
___
|
||||
|
||||
@@ -214,7 +211,7 @@ T is created once and lazily.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/ioc.ts:7](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/ioc.ts#L7)
|
||||
[src/types/ioc.ts:7](https://github.com/sern-handler/handler/blob/2106522/src/types/ioc.ts#L7)
|
||||
|
||||
___
|
||||
|
||||
@@ -224,7 +221,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/utility.ts:14](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/utility.ts#L14)
|
||||
[src/types/utility.ts:14](https://github.com/sern-handler/handler/blob/2106522/src/types/utility.ts#L14)
|
||||
|
||||
___
|
||||
|
||||
@@ -257,7 +254,7 @@ Every time this is called, a new object is created
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/types/ioc.ts:12](https://github.com/sern-handler/handler/blob/9d5c6c7/src/types/ioc.ts#L12)
|
||||
[src/types/ioc.ts:12](https://github.com/sern-handler/handler/blob/2106522/src/types/ioc.ts#L12)
|
||||
|
||||
## Variables
|
||||
|
||||
@@ -279,7 +276,7 @@ The object passed into every plugin to control a command's behavior
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/create-plugins.ts:69](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/create-plugins.ts#L69)
|
||||
[src/core/create-plugins.ts:69](https://github.com/sern-handler/handler/blob/2106522/src/core/create-plugins.ts#L69)
|
||||
|
||||
## Functions
|
||||
|
||||
@@ -310,7 +307,7 @@ The object passed into every plugin to control a command's behavior
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/create-plugins.ts:37](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/create-plugins.ts#L37)
|
||||
[src/core/create-plugins.ts:37](https://github.com/sern-handler/handler/blob/2106522/src/core/create-plugins.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
@@ -341,7 +338,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/create-plugins.ts:28](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/create-plugins.ts#L28)
|
||||
[src/core/create-plugins.ts:28](https://github.com/sern-handler/handler/blob/2106522/src/core/create-plugins.ts#L28)
|
||||
|
||||
___
|
||||
|
||||
@@ -377,7 +374,7 @@ 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)
|
||||
[src/core/create-plugins.ts:58](https://github.com/sern-handler/handler/blob/2106522/src/core/create-plugins.ts#L58)
|
||||
|
||||
___
|
||||
|
||||
@@ -408,7 +405,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/create-plugins.ts:46](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/create-plugins.ts#L46)
|
||||
[src/core/create-plugins.ts:46](https://github.com/sern-handler/handler/blob/2106522/src/core/create-plugins.ts#L46)
|
||||
|
||||
___
|
||||
|
||||
@@ -439,7 +436,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/create-plugins.ts:19](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/create-plugins.ts#L19)
|
||||
[src/core/create-plugins.ts:19](https://github.com/sern-handler/handler/blob/2106522/src/core/create-plugins.ts#L19)
|
||||
|
||||
___
|
||||
|
||||
@@ -450,6 +447,7 @@ ___
|
||||
The new Service api, a cleaner alternative to useContainer
|
||||
To obtain intellisense, ensure a .d.ts file exists in the root of compilation.
|
||||
Usually our scaffolding tool takes care of this.
|
||||
Note: this method only works AFTER your container has been initiated
|
||||
|
||||
#### Type parameters
|
||||
|
||||
@@ -479,7 +477,7 @@ 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)
|
||||
[src/core/ioc/dependency-injection.ts:37](https://github.com/sern-handler/handler/blob/2106522/src/core/ioc/dependency-injection.ts#L37)
|
||||
|
||||
___
|
||||
|
||||
@@ -512,7 +510,7 @@ 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)
|
||||
[src/core/ioc/dependency-injection.ts:47](https://github.com/sern-handler/handler/blob/2106522/src/core/ioc/dependency-injection.ts#L47)
|
||||
|
||||
___
|
||||
|
||||
@@ -536,7 +534,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/modules.ts:25](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/modules.ts#L25)
|
||||
[src/core/modules.ts:19](https://github.com/sern-handler/handler/blob/2106522/src/core/modules.ts#L19)
|
||||
|
||||
___
|
||||
|
||||
@@ -571,7 +569,7 @@ where typings can be very bad.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/modules.ts:53](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/modules.ts#L53)
|
||||
[src/core/modules.ts:47](https://github.com/sern-handler/handler/blob/2106522/src/core/modules.ts#L47)
|
||||
|
||||
___
|
||||
|
||||
@@ -596,7 +594,7 @@ 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)
|
||||
[src/core/modules.ts:32](https://github.com/sern-handler/handler/blob/2106522/src/core/modules.ts#L32)
|
||||
|
||||
___
|
||||
|
||||
@@ -622,7 +620,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/ioc/base.ts:90](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/ioc/base.ts#L90)
|
||||
[src/core/ioc/base.ts:144](https://github.com/sern-handler/handler/blob/2106522/src/core/ioc/base.ts#L144)
|
||||
|
||||
___
|
||||
|
||||
@@ -649,7 +647,7 @@ ___
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/create-plugins.ts:6](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/create-plugins.ts#L6)
|
||||
[src/core/create-plugins.ts:6](https://github.com/sern-handler/handler/blob/2106522/src/core/create-plugins.ts#L6)
|
||||
|
||||
___
|
||||
|
||||
@@ -688,7 +686,7 @@ 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)
|
||||
[src/core/ioc/dependency-injection.ts:11](https://github.com/sern-handler/handler/blob/2106522/src/core/ioc/dependency-injection.ts#L11)
|
||||
|
||||
___
|
||||
|
||||
@@ -733,24 +731,4 @@ 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)
|
||||
[src/core/ioc/dependency-injection.ts:21](https://github.com/sern-handler/handler/blob/2106522/src/core/ioc/dependency-injection.ts#L21)
|
||||
|
||||
@@ -31,7 +31,7 @@ custom_edit_url: null
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/presences.ts:17](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L17)
|
||||
[src/core/presences.ts:17](https://github.com/sern-handler/handler/blob/2106522/src/core/presences.ts#L17)
|
||||
|
||||
## Functions
|
||||
|
||||
@@ -61,7 +61,7 @@ adjacent to the file where **Sern.init** is CALLED.
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/presences.ts:28](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L28)
|
||||
[src/core/presences.ts:28](https://github.com/sern-handler/handler/blob/2106522/src/core/presences.ts#L28)
|
||||
|
||||
___
|
||||
|
||||
@@ -90,4 +90,4 @@ Create a Presence body which can be either:
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/core/presences.ts:39](https://github.com/sern-handler/handler/blob/9d5c6c7/src/core/presences.ts#L39)
|
||||
[src/core/presences.ts:37](https://github.com/sern-handler/handler/blob/2106522/src/core/presences.ts#L37)
|
||||
|
||||
@@ -37,4 +37,4 @@ Sern.init({
|
||||
|
||||
#### Defined in
|
||||
|
||||
[src/sern.ts:27](https://github.com/sern-handler/handler/blob/9d5c6c7/src/sern.ts#L27)
|
||||
[src/sern.ts:26](https://github.com/sern-handler/handler/blob/2106522/src/sern.ts#L26)
|
||||
|
||||
28
docs/cli/clear.md
Normal file
28
docs/cli/clear.md
Normal file
@@ -0,0 +1,28 @@
|
||||
```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
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ Options:
|
||||
```txt title=".env"
|
||||
DISCORD_TOKEN=<YOUR_TOKEN>
|
||||
APPLICATION_ID=<YOUR_APPLICATION_ID>
|
||||
MODE=<DEV|PROD>
|
||||
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.
|
||||
|
||||
@@ -33,22 +33,32 @@ If you do not know how to obtain either of these credentials, [click here](https
|
||||
- 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
|
||||
- commonjs + javascript 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
|
||||
|
||||
Each command file can have an extra config that follows `ValidPublishOptions`:
|
||||
## Config
|
||||
```ts
|
||||
interface ValidPublishOptions {
|
||||
guildIds: string[];
|
||||
dmPermission: boolean;
|
||||
defaultMemberPermissions: PermissionResolvable;
|
||||
}
|
||||
|
||||
type ValidMemberPermissions =
|
||||
| PermissionFlagBits //discord.js enum
|
||||
| PermissionFlagBits[] //array of discord.js enum
|
||||
| string //must be a stringified number
|
||||
| bigint
|
||||
|
||||
interface PublishConfig {
|
||||
guildIds?: string[];
|
||||
dmPermission?: boolean;
|
||||
defaultMemberPermissions: ValidMemberPermissions;
|
||||
}
|
||||
type ValidPublishOptions =
|
||||
| PublishConfig
|
||||
| (absPath: string, module: CommandModule) => PublishConfig
|
||||
```
|
||||
In other words, you can export a function or object.
|
||||
|
||||
## Prerequiring
|
||||
Is there a [service](../guide/walkthrough/services) that is required at the top level of a command?
|
||||
- Create an ES6 script anywhere:
|
||||
|
||||
1
docs/guide/getting-started/_category_.yml
Normal file
1
docs/guide/getting-started/_category_.yml
Normal file
@@ -0,0 +1 @@
|
||||
label: Getting Started
|
||||
1
docs/guide/walkthrough/_category_.yml
Normal file
1
docs/guide/walkthrough/_category_.yml
Normal file
@@ -0,0 +1 @@
|
||||
label: Walkthrough
|
||||
@@ -1,6 +1,9 @@
|
||||
---
|
||||
sidebar_position: 7
|
||||
---
|
||||
|
||||
# Dependency Injection
|
||||
|
||||
:::warning
|
||||
This contains version 2 code. Please view [transitioning to v3](./transition)
|
||||
:::
|
||||
|
||||
@@ -9,4 +9,4 @@ npm create @sern/bot
|
||||
```
|
||||
and follow the interactive prompts.
|
||||
|
||||
if somehow you need help, feel free to ask [here](https://sern.dev.discord)
|
||||
if somehow you need help, feel free to ask [here](https://sern.dev/discord)
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
|
||||
# transition from v2 to v3
|
||||
# Transition from v2 to v3
|
||||
|
||||
```diff title="src/index.ts"
|
||||
- Sern.makeDependencies({ build: () => {} })
|
||||
|
||||
@@ -4,8 +4,8 @@ sidebar_position: 0
|
||||
|
||||
# Welcome!
|
||||
|
||||
:::tip
|
||||
Please read the [transition](../docs/guide/walkthrough/transition.md) page if you are moving from version 2 to version 3.
|
||||
:::warning
|
||||
Please read the [transition](./transition) page if you are moving from version 2 to version 3.
|
||||
:::
|
||||
|
||||
## Content
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
---
|
||||
title: Overview
|
||||
sidebar_position: 1
|
||||
---
|
||||
import GuideFeedback from "../../../../src/components/GuideFeedback";
|
||||
|
||||
# Guide Overview
|
||||
Welcome to the sern Discord Bot Development Guide! 🚀
|
||||
|
||||
## What You'll Learn
|
||||
In this comprehensive guide, we'll take you on a journey from the basics to the advanced concepts of creating and deploying your own Discord bot using the sern framework. Whether you're a beginner or have some coding experience, we've designed this guide to be inclusive and accessible to all.
|
||||
|
||||
## Guide Structure
|
||||
Our guide is structured to take you step by step through the process of building a Discord bot with sern. Here's an overview of what you can expect:
|
||||
|
||||
- **Who are we?** Meet the sern team behind sern.
|
||||
|
||||
- **What is sern and what problems does it solve?**
|
||||
Understand why sern, what is it and what does it solve.
|
||||
|
||||
- **Preparing** Set up your development environment.
|
||||
|
||||
- **Setting up the project** Learn about libraries and tools like @sern/handler and discord.js.
|
||||
|
||||
- **Setting Up the Bot** Register your bot, obtain necessary credentials, and set it up.
|
||||
|
||||
- **sern Overview** Dive into the core concepts of sern and its components.
|
||||
|
||||
- **Example Projects** Build practical Discord bots with sern.
|
||||
|
||||
- **Integration with Databases** Learn what is a database, which is the right one for you. And how to use them in your bot.
|
||||
|
||||
- **Ship Your Code To GitHub** Learn about Git, GitHub CLI, and version control systems & how to use them.
|
||||
|
||||
- **Deploy** Discover hosting options, scaling with AWS Fargate, and more.
|
||||
|
||||
- **Other Steps** Explore additional topics like comparing sern to other solutions and planning for future growth.
|
||||
|
||||
- **Conclusion** Reflect on what you've learned and your next steps in Discord bot development and sern.
|
||||
|
||||
We're excited to embark on this journey with you. Each section is designed to build upon the previous one, so feel free to follow along step by step or jump to the topics that interest you the most. By the end of this guide, you'll have the skills and knowledge to create, deploy, and manage your own Discord bot using sern.
|
||||
|
||||
---
|
||||
<GuideFeedback />
|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
title: What is sern?
|
||||
sidebar_position: 3
|
||||
---
|
||||
import GuideFeedback from "../../../../src/components/GuideFeedback";
|
||||
|
||||
We're a discord bot framework. The lack of tooling in the discord.js community is apparent, and is also monolithic. You can make bots easily and concisely with our suite of tools. We're also a community. Please join [here](https://sern.dev/discord)!
|
||||
|
||||
### Problem
|
||||
|
||||
- **no beginner friendly handler**
|
||||
- **bad practices in discord.js guide**
|
||||
- **lack of wholesome community in discord.js**
|
||||
- **lack of modularity**
|
||||
|
||||
sern tries to solve all these problems. This tutorial is for anyone and everyone, beginners and advanced alike.
|
||||
|
||||
## Solution
|
||||
|
||||
- our handlers are modular and efficient.
|
||||
- from my personal experience, the community feels pretentious and mean.
|
||||
- discord.js discord chat feels pretentious and unwelcome to beginners.
|
||||
- From community plugins to container, swap out tooling and things with ease.
|
||||
|
||||
---
|
||||
<GuideFeedback />
|
||||
@@ -1,33 +0,0 @@
|
||||
---
|
||||
title: Who are we?
|
||||
sidebar_position: 2
|
||||
---
|
||||
import GuideFeedback from "../../../../src/components/GuideFeedback";
|
||||
|
||||
Who are we?
|
||||
Meet the passionate minds behind sern, working tirelessly to make your Discord bot development experience exceptional. Whether we're coding, designing, or building infrastructure, our common goal is to provide you the neccecities and bring your bot ideas to life.
|
||||
|
||||
# serendipity {#seren}
|
||||
Hi.
|
||||
I believe in making complicated things simpler and am an OSS contributor. OSS for life. This handler has been my baby for a long time now.
|
||||
My favorite programming language is clojure
|
||||
|
||||
# EvolutionX {#evo}
|
||||
You can call me Evo, I'm the automation lover of the team. discord.js was my turning point into programming and I've been hooked ever since. I'm a full stack developer and I love to learn new things. I'm also a huge fan of open source and I'm always looking for ways to contribute to the community.
|
||||
sern is close to my heart and I'm proud to be a part of it. Let's make some awesome bots together!
|
||||
|
||||
# Sr Izan {#ethan}
|
||||
|
||||
Hey! I'm Ethan, the only guy on the development team who is european, and the only one who commits on all repos except for the handler.
|
||||
|
||||
Nice to meet you and I hope you enjoy this guide as much as we enjoyed making it!
|
||||
|
||||
# ropox {#ropox}
|
||||
Hey there, I'm ropox! 👋
|
||||
|
||||
I'm not just a programmer; I'm one of the passionate maintainers of the sern framework. My mission is to demystify Discord bot development and ensure it's accessible to everyone. But that's not all – I wear multiple hats, including design (i designed the logo) and infrastructure
|
||||
|
||||
some say [I'm the coolest of all](/blog/newlogo#ropox-thing)
|
||||
|
||||
---
|
||||
<GuideFeedback />
|
||||
@@ -1,18 +0,0 @@
|
||||
---
|
||||
title: Choosing a package manager
|
||||
---
|
||||
import GuideFeedback from "../../../../src/components/GuideFeedback";
|
||||
|
||||
<!-- Rephrasing and title done by Ethan -->
|
||||
|
||||
A package manager is like a helper for your programs. It brings all the tools for your projects and makes sure they fit and work well together. It's like having someone organize things so you can work without problems.
|
||||
|
||||
The most used ones are:
|
||||
- [npm](https://www.npmjs.com)
|
||||
- [Yarn](https://yarnpkg.com)
|
||||
- [pnpm](https://pnpm.io/)
|
||||
|
||||
For this tutorial, we'll be using **[NPM](https://www.npmjs.com)**, to keep it simple.
|
||||
|
||||
---
|
||||
<GuideFeedback />
|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
title: npm create @sern/bot
|
||||
sidebar_position: 1
|
||||
---
|
||||
import GuideFeedback from "../../../../src/components/GuideFeedback";
|
||||
|
||||
Alright, you've got everything set up. Now it's time to create your bot!
|
||||
|
||||
## The backstory
|
||||
|
||||
In the initial days of sern, we used to create our bots with the `sern init` command in the CLI.
|
||||
This command was an easy way to set up a sern project in ten, even five minutes!
|
||||
|
||||
But now there's a new, cooler and faster sheriff in town: the [`npm create @sern/bot`](https://github.com/sern-handler/create-bot) command.
|
||||
This was an alternative to the old command, which got deprecated in favor of this tool in no time.
|
||||
|
||||
## The GUI
|
||||
|
||||
Currently WIP by me, sern GUI will be a graphical frontend to sern CLI and the npm create command.
|
||||
Follow development on the [Github repo](https://github.com/sern-handler/gui).
|
||||
|
||||
See you on the next chapter where we'll use the already discussed command to set up your bot!
|
||||
|
||||
---
|
||||
Written by [Sr Izan](../intro/who-are-we#ethan)
|
||||
<GuideFeedback />
|
||||
@@ -1,31 +0,0 @@
|
||||
---
|
||||
title: Creating your sern bot
|
||||
sidebar_position: 1
|
||||
---
|
||||
import GuideFeedback from "../../../../src/components/GuideFeedback";
|
||||
|
||||
Creating a bot with sern is a piece of cake, trust me!
|
||||
As discussed in [the npm create command chapter](../setting-up-project/npm-create), we're going to be using that awesome tool to set sern up.
|
||||
So, what are we waiting for? Let's get started!
|
||||
|
||||
Open up a terminal in your ~~failed~~ projects directory. Then, type the following command:
|
||||
```sh
|
||||
npm create @sern/bot
|
||||
```
|
||||
After installing the package, prompts will show up on your terminal. Neat!
|
||||
|
||||
## Prompt walkthrough
|
||||
|
||||
First, choose a template. In this guide, select the please select the `Javascript with sern cli & ESM` option when prompted.
|
||||
|
||||
Then, choose a project name. This one should be lowercase with dashes and/or underscores (aka `kebab-case` or `snake_case`).
|
||||
|
||||
In the package manager prompt, select [NPM](../preparing/package-manager)
|
||||
|
||||
|
||||
And you're done... with that. See you in the next chapter, where you'll get your discord bot token!
|
||||
|
||||
---
|
||||
Written by [Sr Izan](../intro/who-are-we#ethan)
|
||||
Get the [source code](https://github.com/sern-handler/tutorial-bot/tree/setting-up-bot/creating-bot)!
|
||||
<GuideFeedback />
|
||||
@@ -1,124 +0,0 @@
|
||||
---
|
||||
title: Create your Discord Application
|
||||
sidebar_position: 2
|
||||
---
|
||||
import GuideFeedback from "../../../../src/components/GuideFeedback";
|
||||
|
||||
Welcome back!
|
||||
|
||||
Before we do anything, we need to edit some code in our bot to make it read the Discord token safely and securely.
|
||||
|
||||
Create a blank `.env` file in the root of your project directory (the directory where your `package.json` file is located)
|
||||
|
||||
```
|
||||
.
|
||||
├── .env
|
||||
├── .env.example
|
||||
├── .sern
|
||||
├── generated
|
||||
├── .gitignore
|
||||
├── .npmignore
|
||||
├── README.md
|
||||
├── package.json
|
||||
├── sern.config.json
|
||||
├── jsconfig.json
|
||||
├── src
|
||||
│ ├── commands
|
||||
│ │ └── ping.js
|
||||
│ ├── dependencies.d.ts
|
||||
│ └── index.js
|
||||
└── package-lock.json
|
||||
```
|
||||
|
||||
## Setting up your Discord Application
|
||||
Notice the `.env.example` file? Let's open it.
|
||||
```sh
|
||||
DISCORD_TOKEN=YOUR_DISCORD_TOKEN
|
||||
APPLICATION_ID=YOUR_DISCORD_BOT_USER_ID
|
||||
NODE_ENV=<production OR development>
|
||||
```
|
||||
We need to fill this out, but in another file.
|
||||
- Create a file `.env` next to `.env.example`
|
||||
- Copy `.env.example` contents into `.env`, we'll fill this out now.
|
||||
|
||||
### Discord Token
|
||||
You have your bot (almost) ready to go, but first we need a bot token.
|
||||
|
||||
- Go to Discord Developer's homepage (you can type [discord.dev](https://discord.dev) in your browser and then click on "Applications" on the sidebar)
|
||||
|
||||
- Click on "New Application" in the top right.
|
||||
|
||||
Then, fill in your application's name:
|
||||

|
||||
|
||||
- Click on "Bot" in the sidebar, then the "Reset Token" button and copy the token. The token should look something like this:
|
||||
```
|
||||
MTE1MjM2MDczNzczMDE5OTU2Mg.GUWUsy.dXAoO6NI1Cy3OV7IA-BTGcyzLS28-9tECNcVOg
|
||||
```
|
||||
|
||||
- Scroll down and enable the `Message Content Intent` and `Server Members Intent` so text commands work and discord.js doesn't error out.
|
||||
|
||||
- Replace `YOUR_DISCORD_TOKEN` with your actual discord token:
|
||||
```
|
||||
DISCORD_TOKEN=MTE1MjM2MDczNzczMDE5OTU2Mg.GUWUsy.dXAoO6NI1Cy3OV7IA-BTGcyzLS28-9tECNcVOg
|
||||
```
|
||||
### APPLICATION_ID
|
||||
- Go to "General Information" and find your "APPLICATION ID". Copy That!
|
||||
- Place it into your .env file.
|
||||
- In future versions of sern, this may not be needed, but bear with me.
|
||||
```
|
||||
APPLICATION_ID=12345632432423987432987
|
||||
```
|
||||
|
||||
### Mode
|
||||
With sern, there are two stages, development and production. Production is when we ship it to a hosting server and development is
|
||||
for ...developing. Let's set our NODE_ENV to development. For a more formal explanation, read [this](https://nodejs.org/en/learn/getting-started/nodejs-the-difference-between-development-and-production)
|
||||
|
||||
```
|
||||
NODE_ENV=development
|
||||
```
|
||||
|
||||
### Final
|
||||
Your `.env` file should looks something like this.
|
||||
```
|
||||
DISCORD_TOKEN=MTE1MjM2MDczNzczMDE5OTU2Mg.GUWUsy.dXAoO6NI1Cy3OV7IA-BTGcyzLS28-9tECNcVOg
|
||||
APPLICATION_ID=12345632432423987432987
|
||||
NODE_ENV=development
|
||||
```
|
||||
|
||||
:::danger
|
||||
Please do NOT commit this file! It basically contains the bot's password and, even though Discord will notice and create another token, other services will most probably not have that privilege!
|
||||
To fix this, create a `.gitignore` file and add an entry for `.env` [and `node_modules` while we're there](https://i.redd.it/tfugj4n3l6ez.png).
|
||||
:::
|
||||
|
||||
## Inviting your bot to a Discord server.
|
||||
|
||||
This is the last stretch!
|
||||
|
||||
On the sidebar of the Discord Developer Portal, click `OAuth2` and then on `URL Generator`.
|
||||
On scopes, tick only `bot`:
|
||||

|
||||
Then on `Bot permissions` tick `Send Messages` and `Read Message History`. If you need others for your specific use-case, add them here.
|
||||

|
||||
|
||||
Finally, scroll down, copy the generated URL, paste it on the address bar and invite your bot as usual.
|
||||
|
||||
## Starting the bot
|
||||
Since we use slash commands, we need to let Discord know we want to use their user interface.
|
||||
- Run `npm run commands:publish`
|
||||
|
||||
:::info
|
||||
This script uses our command line utility, [publish](https://sern.dev/docs/cli/publish).
|
||||
:::
|
||||
|
||||
There's an npm script that's called `start`, so we're going to be running that.
|
||||
Execute in your terminal:
|
||||
```
|
||||
npm start
|
||||
```
|
||||
And your bot should start up in no time! **Congrats!**
|
||||
|
||||
---
|
||||
Written by [Sr Izan](../intro/who-are-we#ethan)
|
||||
Get the [source code](https://github.com/sern-handler/tutorial-bot/tree/setting-up-bot/creating-discord-app)!
|
||||
<GuideFeedback />
|
||||
@@ -1,44 +0,0 @@
|
||||
---
|
||||
title: command
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
import GuideFeedback from "../../../../src/components/GuideFeedback";
|
||||
|
||||
# Commands
|
||||
|
||||
## Example command
|
||||
- View the command **ping.js** in `src/commands`.
|
||||
- Make a new file next to **ping.js** called **rps.js**
|
||||
- Copy **ping.js** contents into **rps.js**.
|
||||
We base **rps.js** from **ping.js**
|
||||
|
||||
:::tip
|
||||
The name of your command will be the name of your file.
|
||||
:::
|
||||
|
||||
Each slash command will follow this similar structure.
|
||||
In this tutorial, maybe you were smart enough to guess, but we'll be making rock paper scissors!
|
||||
|
||||
## New command, rock paper scissors
|
||||
- Instead of **CommandType.Both**, `type` property should be **CommandType.Slash**
|
||||
- This is to keep it simple. You'll see later, but slash commands work well with message components.
|
||||
- Give it a description.
|
||||
- run `npm run commands:publish`
|
||||
|
||||
**Your command should be usable on discord now!**
|
||||
|
||||
### Result
|
||||
Your command should now look something along the lines of this:
|
||||
```js title=./commands/rps.js
|
||||
export default commandModule({
|
||||
type: CommandType.Slash,
|
||||
description: "I do rps.",
|
||||
execute: async (ctx) => {
|
||||
await ctx.reply("Pwease wait. dis command in pwogwess"); // 👻
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
---
|
||||
<GuideFeedback />
|
||||
@@ -1,104 +0,0 @@
|
||||
---
|
||||
title: Logic
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
import GuideFeedback from "../../../../src/components/GuideFeedback";
|
||||
|
||||
## Game rules
|
||||
- Two players max.
|
||||
- Each player can choose rock, paper scissors
|
||||
- Scissors beats paper, paper beats rock, rock beats scissors
|
||||
|
||||
Get the option selected, adding this to the top of your **execute** function:
|
||||
```js
|
||||
const opponent = ctx.options.getUser("opponent");
|
||||
```
|
||||
:::warning
|
||||
Since we are in a Slash command, the above is valid. If we were to interoperate between Text Commands and Slash Commands,
|
||||
we'd have to check if the current [Context](https://sern.dev/docs/api/classes/Context) is the correct type.
|
||||
:::
|
||||
|
||||
We need to ensure we're not playing against **an invalid user**. Invalid users are those that
|
||||
- are bots **or**
|
||||
- ourselves.
|
||||
|
||||
Create helper function **isInvalidUser** which returns a boolean satisfying the conditions above.
|
||||
|
||||
```js
|
||||
const isInvalidUser = (user) => {
|
||||
return user.id === "182326315813306368" || user.bot;
|
||||
}
|
||||
```
|
||||
:::tip
|
||||
You can easily access anyone's user id by [enabling dev mode](https://beebom.com/how-enable-disable-developer-mode-discord).
|
||||
:::
|
||||
|
||||
Cool, now let's call it, preventing invalid users from being opponents. Put the code snippet before any of the UI logic:
|
||||
```js title="tictactoe, execute function"
|
||||
if(isInvalidUser(opponent)) {
|
||||
return;
|
||||
}
|
||||
```
|
||||
We **return**, or **stop** execution of the function if the condition `isInvalidUser` is true.
|
||||
:::info
|
||||
A step further would be extracting `isInvalidUser` into a separate plugin, if multiple commands share this same logic.
|
||||
:::
|
||||
Before we go any further, let's test. Start up the bot again.
|
||||
- Try running `/rps` with a bot.
|
||||
- What happens?
|
||||
- It may be beneficial to give the user some feedback instead of a **return**.
|
||||
- Try running `/rps` with yourself
|
||||
- What happens?
|
||||
- It may be beneficial to give the user some feedback instead of a **return**.
|
||||
- Try running `/rps` in a DM channel with the bot itself.
|
||||
- What happens?
|
||||
|
||||
Great! notice how in a DM channel, the command is entirely **useless**.
|
||||
Let's use our **channelType** plugin to ensure this doesn't happen.
|
||||
- Add the **plugins** field to your commandModule, adding the channelType plugin.
|
||||
```js
|
||||
plugins: [channelType( )]
|
||||
```
|
||||
- Call it with the right parameters.
|
||||
- All plugins come with documentation in the same file
|
||||
- In our case, we need to supply an array of ChannelTypes, and an optional message.
|
||||
```js
|
||||
plugins: [channelType([ChannelType.GuildText], "You cannot execute this command here.")]
|
||||
```
|
||||
:::info
|
||||
You can publish commands to specific guilds using special configuration.
|
||||
For more information, view the docs [here](https://sern.dev/docs/cli/publish).
|
||||
For educational and simplicity purposes, I'm using a plugin here.
|
||||
:::
|
||||
|
||||
Great! When we rerunning these test conditions, it should catch and respond to these conditions.
|
||||
|
||||
|
||||
## Collectors
|
||||
We know how to display components, but what about responding to them?
|
||||
Discord.js gives us the Collector API, which at its core, listens to incoming interactions from discord.js. It essentially comes in two flavors.
|
||||
- **await**
|
||||
- **callback based**
|
||||
|
||||
**Await** is [easy](https://www.infoq.com/presentations/Simple-Made-Easy/), but it comes at the cost of only collecting `one` at a time. Also,
|
||||
it is blocking on other commands attempting to be run; When we await a component,
|
||||
All other commands will be waiting as well. So, we'll be using callback based, lazily waiting. Let's create a collector to the message sent by the bot. How do we get that message?
|
||||
Luckily `ctx.reply` returns the [Message](https://discord.js.org/#/docs/discord.js/main/class/Message) sent. Let's capture that in a variable.
|
||||
|
||||
- Capture the result of ctx.reply in a variable called **resultMessage**.
|
||||
```js
|
||||
const resultMessage = await ctx.reply({ message, components: grid });
|
||||
```
|
||||
- Create a collector from the message's property `.createMessageComponentCollector()`
|
||||
- Accept only interactions of type **Button** (we are making a tictactoe game of solely buttons),
|
||||
- Make sure to import **ComponentType** from discord.js
|
||||
- Give it a time limit of 60_000 milliseconds aka 1 minute.
|
||||
```js
|
||||
const collector = responseMessage.createMessageComponentCollector({
|
||||
componentType: ComponentType.Button,
|
||||
time: 60_000
|
||||
});
|
||||
```
|
||||
---
|
||||
<GuideFeedback />
|
||||
@@ -1,24 +0,0 @@
|
||||
---
|
||||
title: intro
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
import GuideFeedback from "../../../../src/components/GuideFeedback";
|
||||
|
||||
> How hard can this be?
|
||||
|
||||
This will probably be the longest chapter in the guide. Don't worry though, once we're done, making commands is [**fodder**](https://www.merriam-webster.com/dictionary/fodder).
|
||||
|
||||
Here are some inspirational quotes to make you get motivated.
|
||||
> "If you don't make mistakes, you're not working on hard enough problems." ― Frank Wilczek
|
||||
|
||||
> "Dwell on the beauty of life. Watch the stars, and see yourself running with them." ― Marcus Aurelius, Meditations
|
||||
|
||||
> "Never let the future disturb you. You will meet it, if you have to, with the same weapons of reason which today arm you against the present." ― Marcus Aurelius, Meditations
|
||||
|
||||
If you want to add more, feel free to pull request this, but not too many please!
|
||||
|
||||
TODO!!! - ADD RPS DISCORD BOT GIF HERE
|
||||
|
||||
---
|
||||
<GuideFeedback />
|
||||
@@ -1,120 +0,0 @@
|
||||
---
|
||||
title: UI
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
import GuideFeedback from "../../../../src/components/GuideFeedback";
|
||||
|
||||
## Message Components
|
||||
|
||||
Discord has a rich api for developers, and they allow bots to use and interact with certain UI components.
|
||||
Some of these include
|
||||
|
||||
- Buttons
|
||||
- Modals (technically not a component)
|
||||
- Select Menu
|
||||
- Action Rows
|
||||
|
||||
Let's use the mush we call [**brain**](https://www.ninds.nih.gov/health-information/public-education/brain-basics/brain-basics-know-your-brain).
|
||||
|
||||
> **Question**: What components do we need to create a rps game?
|
||||
|
||||
> **Answer**: Buttons!!!! (And also some text i guess)
|
||||
|
||||
|
||||
### Rules
|
||||
Obviously we can't spam the user interface with lots of components; Discord knows this as well.
|
||||
|
||||
Per the [**discord api documentation**](https://discord.com/developers/docs/interactions/message-components#action-rows):
|
||||
- You can have up to 5 Action Rows per message
|
||||
- Maximum of **5** components in an Action Row
|
||||
- An Action Row cannot contain another Action Row
|
||||
- Select Menus take up an entire Action Row, and cannot have buttons
|
||||
|
||||
|
||||
Do the math, and we can have up to 5 (action rows) times 5 (per row), 25 buttons in one message
|
||||
|
||||
### Custom Ids
|
||||
We also need some way to distinguish buttons between other buttons. Whenever a user clicks a button, we are notified that **some** interaction has happened, but from **where?** Custom ids to the rescue. Think of these like 'classes' or 'ids' on html tags. **Each component that we need to handle
|
||||
will have to be retrieved by their custom id in order to properly handle it**
|
||||
|
||||
|
||||
We'll get more into this in the next chapter.
|
||||
|
||||
### Design
|
||||
Our UI will contain a message, and a total of 3 buttons, laid out in a one row.
|
||||
|
||||
TODO!!! PICTURE HERE
|
||||
|
||||
|
||||
### Implementation
|
||||
|
||||
How do we represent this in code? In discord.js, the library we're using, we can represent this via their builder api.
|
||||
Let's create some utility functions before diving straight in.
|
||||
|
||||
```js title="tictactoe.js"
|
||||
const EMPTY = "\0"; // A little trick to show buttons with no 'label'
|
||||
const button = (custom_id, label=EMPTY) => {
|
||||
return new ButtonBuilder({
|
||||
custom_id,
|
||||
label,
|
||||
style: ButtonStyle.Secondary
|
||||
});
|
||||
}
|
||||
|
||||
const row = (...elements) => {
|
||||
return new ActionRowBuilder().addComponents(elements);
|
||||
}
|
||||
```
|
||||
The names for these are pretty self explanatory. **EMPTY** is a placeholder for labels in a button.
|
||||
|
||||
In our **execute** function, let's build the Action Rows.
|
||||
```js title="tictactoe.js, in the execute body"
|
||||
const message = "Tic Tac Toe";
|
||||
|
||||
//Our TicTacToe grid. consists of 3 rows, and in each row, 3 buttons.
|
||||
//Each button has a unique 'customId' of a number.
|
||||
const grid = [row(button('0'), button('1'), button('2'))];
|
||||
|
||||
|
||||
await ctx.reply("Pwease wait. dis command in pwogwess"); // 👻
|
||||
```
|
||||
> Question: Does this grid satisfy the rules stated above?
|
||||
|
||||
> Answer: Yes! We have 1 Action Row that has 3 Buttons. Less than 25 Components!
|
||||
|
||||
Let's try displaying this to Discord. We're not just displaying plain text anymore, we need to change ctx.reply.
|
||||
|
||||
- Change how we call `ctx.reply`. Give it an object instead:
|
||||
```diff
|
||||
- await ctx.reply("Pwease wait. dis command in pwogwess"); // 👻
|
||||
|
||||
+ await ctx.reply({ content: message, components: grid });
|
||||
```
|
||||
One more thing, we need to play against someone, so we'll need to update our commandModule.
|
||||
- Add the import **ApplicationCommandOptionType** from discord.js
|
||||
- Add a new **option** of type **User** to the **options** field of your commandModule.
|
||||
This will display on the user's end as an option to choose from.
|
||||
```js
|
||||
options: [
|
||||
{
|
||||
name: "opponent",
|
||||
description: "Opponent you would like to play with",
|
||||
type: ApplicationCommandOptionType.User,
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
```
|
||||
- Run `npm run commands:publish` once more to update it.
|
||||
|
||||
:::tip
|
||||
Anytime we add a new slash command or its options, its a good idea to run `npm run commands:publish`
|
||||
:::
|
||||
|
||||
Run your bot.
|
||||
- Congrats! You got something to display.
|
||||
Notice how when you try to click, it will say something like `interaction failed to respond`.
|
||||
**Next chapter**, let's wire everything up.
|
||||
|
||||
---
|
||||
<GuideFeedback />
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
title: Choose your language
|
||||
---
|
||||
|
||||
import GuideFeedback from "../../src/components/GuideFeedback";
|
||||
|
||||
Choose your language:
|
||||
- [English](./en/intro/overview)
|
||||
- [Español](./es)
|
||||
- [Turkish](./tr)
|
||||
|
||||
---
|
||||
<GuideFeedback />
|
||||
@@ -3,9 +3,8 @@
|
||||
|
||||
// WARNING: When changing things in this file, please also change them on the other docgen.docusaurus.config.js file!
|
||||
|
||||
const lightCodeTheme = require('prism-react-renderer/themes/nightOwlLight');
|
||||
const darkCodeTheme = require('prism-react-renderer/themes/oceanicNext');
|
||||
|
||||
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.',
|
||||
@@ -30,6 +29,9 @@ const config = {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en']
|
||||
},
|
||||
markdown: {
|
||||
format: 'detect'
|
||||
},
|
||||
presets: [
|
||||
[
|
||||
'classic',
|
||||
@@ -46,8 +48,9 @@ const config = {
|
||||
// Remove this to remove the "edit this page" links.
|
||||
editUrl:
|
||||
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
|
||||
blogSidebarCount: 'ALL',
|
||||
},
|
||||
pages : {
|
||||
pages: {
|
||||
path: 'src/pages',
|
||||
routeBasePath: '/',
|
||||
include: ['**/*.{js,jsx,ts,tsx,md,mdx}'],
|
||||
@@ -68,23 +71,23 @@ const config = {
|
||||
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',
|
||||
},
|
||||
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: {
|
||||
@@ -98,12 +101,13 @@ const config = {
|
||||
position: 'left',
|
||||
label: 'Docs & Guide',
|
||||
},
|
||||
{to: '/blog', label: 'Blog', position: 'left'},
|
||||
{ to: '/blog', label: 'Blog', position: 'left' },
|
||||
{
|
||||
href: 'https://github.com/sern-handler',
|
||||
label: 'GitHub',
|
||||
position: 'right',
|
||||
},
|
||||
{ to: "/sponsors", label: "Sponsor", position: "left" },
|
||||
{
|
||||
to: '/plugins',
|
||||
label: 'Plugins',
|
||||
@@ -135,7 +139,7 @@ const config = {
|
||||
href: 'https://discord.gg/DwbF5H5JgQ',
|
||||
},
|
||||
{
|
||||
label : 'Open Collective',
|
||||
label: 'Open Collective',
|
||||
href: 'https://opencollective.com/sern'
|
||||
}
|
||||
],
|
||||
@@ -148,7 +152,7 @@ const config = {
|
||||
to: '/blog',
|
||||
},
|
||||
{
|
||||
label: 'GitHub',
|
||||
label: 'GitHub',
|
||||
href: 'https://github.com/sern-handler',
|
||||
},
|
||||
],
|
||||
@@ -156,16 +160,16 @@ const config = {
|
||||
],
|
||||
copyright: `Built with ❤️ by the sern Handler team and its contributors`,
|
||||
},
|
||||
metadata : [
|
||||
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' },
|
||||
{ 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: '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' },
|
||||
@@ -177,28 +181,28 @@ const config = {
|
||||
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",
|
||||
},
|
||||
]
|
||||
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;
|
||||
|
||||
21965
package-lock.json
generated
21965
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
26
package.json
26
package.json
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@sern/website",
|
||||
"name": "sern-website",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"description": "Our modern, clean and beginner friendly web interface",
|
||||
@@ -7,7 +7,6 @@
|
||||
"scripts": {
|
||||
"docusaurus": "docusaurus",
|
||||
"start": "docusaurus start",
|
||||
"dev": "docusaurus start",
|
||||
"build": "docusaurus build",
|
||||
"swizzle": "docusaurus swizzle",
|
||||
"deploy": "docusaurus deploy",
|
||||
@@ -19,21 +18,18 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@dipakparmar/docusaurus-plugin-umami": "^2.1.1",
|
||||
"@docusaurus/core": "^2.4.0",
|
||||
"@docusaurus/plugin-content-pages": "^2.4.0",
|
||||
"@docusaurus/preset-classic": "^2.4.0",
|
||||
"@docusaurus/theme-search-algolia": "^2.4.0",
|
||||
"@mdx-js/react": "^1.6.22",
|
||||
"axios": "^1.5.0",
|
||||
"@docusaurus/core": "3.0.0",
|
||||
"@docusaurus/preset-classic": "3.0.0",
|
||||
"@mdx-js/react": "^3.0.0",
|
||||
"clsx": "^1.2.1",
|
||||
"jsdoc-parse-plus": "^1.3.0",
|
||||
"prism-react-renderer": "^1.3.5",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-modal": "^3.16.1",
|
||||
"react-turnstile": "^1.1.1"
|
||||
"prism-react-renderer": "^2.1.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "2.0.0-rc.1",
|
||||
"@docusaurus/module-type-aliases": "3.0.0",
|
||||
"@docusaurus/types": "3.0.0",
|
||||
"docusaurus-plugin-typedoc": "latest",
|
||||
"typedoc": "latest",
|
||||
"typedoc-plugin-markdown": "latest",
|
||||
@@ -52,7 +48,7 @@
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.16"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
import React, { useState } from "react";
|
||||
import styles from "./index.module.css";
|
||||
import Modal from 'react-modal';
|
||||
import Turnstile from "react-turnstile";
|
||||
import { useLocation } from "@docusaurus/router";
|
||||
|
||||
const customStyles = {
|
||||
content: {
|
||||
top: '50%',
|
||||
left: '50%',
|
||||
right: 'auto',
|
||||
bottom: 'auto',
|
||||
marginRight: '-50%',
|
||||
transform: 'translate(-50%, -50%)',
|
||||
backgroundColor: 'var(--ifm-background-color)',
|
||||
width: '60vw',
|
||||
height: '60vh',
|
||||
overflow: 'hidden',
|
||||
},
|
||||
feedbackBox: {
|
||||
width: '100%',
|
||||
height: '65%',
|
||||
resize: 'none'
|
||||
}
|
||||
};
|
||||
|
||||
export default function GuideFeedback() {
|
||||
const location = useLocation();
|
||||
const [feedback, setFeedback] = useState('');
|
||||
const [inputText, setInputText] = useState('');
|
||||
const [modalIsOpen, setModalIsOpen] = useState(false);
|
||||
const [isSubmitted, setSubmitted] = useState(false);
|
||||
const [turnstileToken, setTurnstileToken] = useState('');
|
||||
const handleFeedbackChange = (e) => {
|
||||
setInputText(e.target.value);
|
||||
};
|
||||
const handleSubmit = () => {
|
||||
if (!turnstileToken) return
|
||||
fetch("https://automata.srizan.dev/api/tutorial/feedback", {
|
||||
method: "POST",
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify({
|
||||
inputText,
|
||||
feedback,
|
||||
turnstileToken,
|
||||
route: location.pathname
|
||||
}),
|
||||
mode: 'cors'
|
||||
}).then(() => {
|
||||
closeModal();
|
||||
setSubmitted(true)
|
||||
}).catch((e) => {
|
||||
closeModal();
|
||||
alert('Well, that didn\'t work! Try again later. If it\'s urgent join https://sern.dev/discord :)')
|
||||
console.error(e)
|
||||
})
|
||||
};
|
||||
const openModal = () => {
|
||||
setModalIsOpen(true);
|
||||
};
|
||||
const closeModal = () => {
|
||||
setModalIsOpen(false);
|
||||
};
|
||||
return (
|
||||
<div>
|
||||
<Modal
|
||||
isOpen={modalIsOpen}
|
||||
onRequestClose={closeModal}
|
||||
style={customStyles}
|
||||
contentLabel="Example Modal"
|
||||
ariaHideApp={false}
|
||||
>
|
||||
<h1>
|
||||
{feedback === "up"
|
||||
? "Thank you!"
|
||||
: "Sorry you didn't like it! Can you help us improve?"}
|
||||
</h1>
|
||||
<textarea
|
||||
style={customStyles.feedbackBox}
|
||||
value={inputText}
|
||||
onChange={handleFeedbackChange}
|
||||
placeholder="If you have any more feedback, please let us know! (optional)"
|
||||
/>
|
||||
<div style={{ display: 'flex' }}>
|
||||
<Turnstile
|
||||
sitekey={
|
||||
"0x4AAAAAAAJ518xa-S0l-saQ"
|
||||
}
|
||||
onVerify={(token) => {
|
||||
setTurnstileToken(token);
|
||||
}}
|
||||
theme='dark'
|
||||
style={{
|
||||
width: '270px',
|
||||
height: '63px'
|
||||
}} />
|
||||
<button
|
||||
onClick={handleSubmit}
|
||||
style={{
|
||||
marginLeft: "auto",
|
||||
order: 2,
|
||||
height: "10vh",
|
||||
width: "30%",
|
||||
backgroundColor: "var(--ifm-color-primary)",
|
||||
}}
|
||||
>
|
||||
Submit
|
||||
</button>
|
||||
</div>
|
||||
</Modal>
|
||||
<div className={styles.inline}>
|
||||
<p
|
||||
className={styles.thumbsUpButton}
|
||||
onClick={() => {
|
||||
if (!isSubmitted) openModal();
|
||||
setFeedback("up");
|
||||
}}
|
||||
>
|
||||
👍
|
||||
</p>
|
||||
<p
|
||||
className={styles.thumbsDownButton}
|
||||
onClick={() => {
|
||||
if (!isSubmitted) openModal();
|
||||
setFeedback("down");
|
||||
}}
|
||||
>
|
||||
👎
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
.inline {
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
}
|
||||
|
||||
.thumbsUpButton, .thumbsDownButton {
|
||||
border: none;
|
||||
padding-top: 10px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
user-select: none;
|
||||
font-size: 15px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.thumbsUpButton {
|
||||
background-color: var(--ifm-color-primary);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.thumbsDownButton {
|
||||
background-color: var(--ifm-color-primary-dark);
|
||||
margin-left: 5px;
|
||||
}
|
||||
92
src/components/Sponsors/index.js
Normal file
92
src/components/Sponsors/index.js
Normal file
@@ -0,0 +1,92 @@
|
||||
import styles from './styles.module.css';
|
||||
import {useEffect, useState} from "react";
|
||||
|
||||
export default function Sponsors() {
|
||||
const [sponsors, setSponsors] = useState({})
|
||||
useEffect(() => {
|
||||
const asyncFunction = async () => {
|
||||
fetch("https://opencollective.com/api/graphql/v2", {
|
||||
body: JSON.stringify({
|
||||
"operationName": "BannerTopContributors",
|
||||
"variables": {
|
||||
"collectiveSlug": "sern"
|
||||
},
|
||||
"query": "query BannerTopContributors($collectiveSlug: String!) {\n account(slug: $collectiveSlug, throwIfMissing: false) {\n id\n currency\n slug\n ... on AccountWithContributions {\n contributors(limit: 150) {\n totalCount\n nodes {\n id\n name\n roles\n isAdmin\n isCore\n isBacker\n since\n image\n description\n collectiveSlug\n totalAmountDonated\n type\n publicMessage\n isIncognito\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n}"
|
||||
}),
|
||||
method: "POST",
|
||||
headers: {
|
||||
"content-type": "application/json"
|
||||
}
|
||||
}).then(async res => setSponsors(await res.json()))
|
||||
}
|
||||
asyncFunction()
|
||||
}, [])
|
||||
return sponsors.data ? (
|
||||
<div className={styles.sponsorLayout}>
|
||||
{sponsors.data?.account?.contributors?.nodes.filter(sp => sp.totalAmountDonated > 0).map((sponsor, index) => (
|
||||
<div key={index} className={styles.sponsorCard}>
|
||||
<a href={`https://opencollective.com/${sponsor.collectiveSlug}`}>
|
||||
<img src={sponsor.image} alt={sponsor.name}/>
|
||||
<h3>{sponsor.name}{sponsor.isAdmin && ' (admin)'}</h3>
|
||||
</a>
|
||||
<p>{sponsor.publicMessage}</p>
|
||||
<p className={styles.sponsorMoney}>${sponsor.totalAmountDonated / 100}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
) : <LoadingIcon size={100}/>
|
||||
}
|
||||
|
||||
function LoadingIcon({ size }) {
|
||||
return (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" className="icon icon-tabler icon-tabler-loader-2" width="44" height="44"
|
||||
viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<path d="M12 3a9 9 0 1 0 9 9">
|
||||
<animateTransform attributeName="transform" type="rotate" from="0 12 12" to="360 12 12"
|
||||
dur="0.5s" repeatCount="indefinite"/>
|
||||
</path>
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
|
||||
/*
|
||||
type Response = {
|
||||
data: {
|
||||
account: Account;
|
||||
};
|
||||
};
|
||||
|
||||
type Account = {
|
||||
id: string;
|
||||
currency: string;
|
||||
slug: string;
|
||||
contributors: Contributors;
|
||||
__typename: string;
|
||||
};
|
||||
|
||||
type Contributors = {
|
||||
totalCount: number;
|
||||
nodes: Contributor[];
|
||||
__typename: string;
|
||||
};
|
||||
|
||||
type Contributor = {
|
||||
id: string;
|
||||
name: string;
|
||||
roles: string[];
|
||||
isAdmin: boolean;
|
||||
isCore: boolean;
|
||||
isBacker: boolean;
|
||||
since: string;
|
||||
image: string;
|
||||
description: string | null;
|
||||
collectiveSlug: string;
|
||||
totalAmountDonated: number;
|
||||
type: string;
|
||||
publicMessage: string | null;
|
||||
isIncognito: boolean;
|
||||
__typename: string;
|
||||
};
|
||||
*/
|
||||
42
src/components/Sponsors/styles.module.css
Normal file
42
src/components/Sponsors/styles.module.css
Normal file
@@ -0,0 +1,42 @@
|
||||
.sponsorLayout {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
margin: 0 auto;
|
||||
max-width: 1500px;
|
||||
}
|
||||
.sponsorCard {
|
||||
margin: 1rem;
|
||||
text-align: center;
|
||||
background: #deddda;
|
||||
border-radius: 15px;
|
||||
padding: 1rem;
|
||||
transition: transform 0.3s;
|
||||
width: 200px;
|
||||
white-space: break-spaces;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
height: 350px;
|
||||
}
|
||||
.sponsorMoney {
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-top: auto;
|
||||
}
|
||||
.sponsorCard img {
|
||||
width: 92px;
|
||||
height: 92px;
|
||||
aspect-ratio: 1/1;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .sponsorCard {
|
||||
background: #282828;
|
||||
color: white;
|
||||
}
|
||||
@@ -40,5 +40,5 @@
|
||||
--ifm-color-primary-lightest: #ffffff;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(82, 78, 183, 0.3);
|
||||
--ifm-font-family-monospace: 'JetBrains Mono', 'Fira Code', 'Meslo NGF', 'Menlo', SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
|
||||
--ifm-navbar-background-color: #66002a;
|
||||
--ifm-navbar-background-color :#66002a
|
||||
}
|
||||
|
||||
@@ -48,13 +48,10 @@ export default function Home() {
|
||||
return (
|
||||
<Layout
|
||||
title="sern - Handlers. Redefined."
|
||||
description="Description will go into a meta tag in"
|
||||
>
|
||||
description="Description will go into a meta tag in">
|
||||
<HomepageHeader/>
|
||||
<main className='user-select-none'>
|
||||
<div>
|
||||
<HomepageFeatures/>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
);
|
||||
|
||||
9
src/pages/sponsors.css
Normal file
9
src/pages/sponsors.css
Normal file
@@ -0,0 +1,9 @@
|
||||
.container {
|
||||
max-width: fit-content;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 1rem;
|
||||
}
|
||||
18
src/pages/sponsors.js
Normal file
18
src/pages/sponsors.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import './sponsors.css';
|
||||
import Layout from '@theme/Layout';
|
||||
import Sponsors from "../components/Sponsors";
|
||||
export default function ( ) {
|
||||
return (
|
||||
<Layout>
|
||||
<header className='header'>
|
||||
<h1 className={"hero__title"}>
|
||||
Sponsors
|
||||
</h1>
|
||||
<p className={"hero__subtitle"}>
|
||||
These amazing people help us keep the project alive. A big thanks from the team!
|
||||
</p>
|
||||
</header>
|
||||
<Sponsors />
|
||||
</Layout>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user