feat: migrate to starlight
BIN
src/.DS_Store
vendored
Normal file
BIN
src/assets/.DS_Store
vendored
Normal file
BIN
src/assets/blog/paper-logo.png
Normal file
|
After Width: | Height: | Size: 627 KiB |
BIN
src/assets/blog/paper-prototypes.jpg
Normal file
|
After Width: | Height: | Size: 2.4 MiB |
BIN
src/assets/blog/seren-tried.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
src/assets/docs/event-plugins.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
src/assets/docs/sern-publish.gif
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
src/assets/logo/navbar-icon.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
src/assets/logo/sern-logo.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
16
src/components/DeprecatedIcon.astro
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
import { Icon } from "@astrojs/starlight/components";
|
||||
---
|
||||
|
||||
<span class="group">
|
||||
<span class="group-hover:hidden">
|
||||
<div
|
||||
class="p-1 h-8 w-8 flex items-center justify-center rounded bg-[var(--sl-color-orange-low)] border border-[var(--sl-color-orange)] text-gray-900 dark:text-white"
|
||||
>
|
||||
<Icon name="warning" />
|
||||
</div>
|
||||
</span>
|
||||
<span class="group-hover:block hidden">
|
||||
<b>[DEPRECATED]</b>
|
||||
</span>
|
||||
</span>
|
||||
30
src/components/Head.astro
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
import type { Props } from "@astrojs/starlight/props";
|
||||
import DefaultHead from "@astrojs/starlight/components/Head.astro";
|
||||
---
|
||||
|
||||
<DefaultHead {...Astro.props}><slot /></DefaultHead>
|
||||
<meta property="og:title" content="sern - Handlers. Redefined." />
|
||||
<meta
|
||||
property="og:description"
|
||||
content="A modular, customizable, fast Discord.js framework to streamline bot development"
|
||||
/>
|
||||
<meta property="og:url" content="https://sern.dev" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:image:alt" content="sern logo" />
|
||||
<meta property="og:image" content="./assets/logo/sern-logo.png" />
|
||||
<meta property="og:image:height" content="512" />
|
||||
<meta property="og:image:width" content="1024" />
|
||||
<meta name="theme-color" content="#F25186" />
|
||||
<meta
|
||||
name="keywords"
|
||||
content="discord, bot, handler, framework, documentation, sern"
|
||||
/>
|
||||
<meta name="twitter:title" content="sern - Handlers. Redefined." />
|
||||
<meta
|
||||
name="twitter:description"
|
||||
content="A modular, customizable, fast Discord.js framework to streamline bot development"
|
||||
/>
|
||||
<meta name="twitter:image" content="./assets/logo/sern-logo.png" />
|
||||
<meta name="twitter:url" content="https://sern.dev" />
|
||||
<meta property="twitter:site" content="@sern-handler" />
|
||||
@@ -1,65 +0,0 @@
|
||||
import React from 'react';
|
||||
import clsx from 'clsx';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
const FeatureList = [
|
||||
{
|
||||
title: 'Modular',
|
||||
|
||||
Svg: require('@site/static/img/bricks-svgrepo-com.svg').default,
|
||||
description: (
|
||||
<>
|
||||
Take apart, build, or customize code with ease to create robust bots.
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: 'Concise',
|
||||
Svg: require('@site/static/img/pencil-svgrepo-com.svg').default,
|
||||
description: (
|
||||
<>
|
||||
Commands are significantly smaller than other competitors.
|
||||
Write impactful, concise code.
|
||||
</>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: 'Familiar',
|
||||
Svg: require('@site/static/img/fire-com.svg').default,
|
||||
description: (
|
||||
<>
|
||||
Code like a traditional command handler. Although not exactly the same, the api is easy to learn
|
||||
and resembles classic v12 command handlers.
|
||||
</>
|
||||
),
|
||||
},
|
||||
|
||||
];
|
||||
|
||||
function Feature({Svg, title, description}) {
|
||||
return (
|
||||
<div className={clsx('col col--4')}>
|
||||
<div className="text--center">
|
||||
<Svg className={styles.featureSvg} role="img" />
|
||||
</div>
|
||||
<div className="text--center padding-horiz--md">
|
||||
<h3>{title}</h3>
|
||||
<p>{description}</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function HomepageFeatures() {
|
||||
return (
|
||||
<section className={styles.features}>
|
||||
<div className="container">
|
||||
<div className="row">
|
||||
{FeatureList.map((props, idx) => (
|
||||
<Feature key={idx} {...props} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
|
||||
.features {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 2rem 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.featureSvg {
|
||||
height: 200px;
|
||||
width: 200px;
|
||||
}
|
||||
42
src/components/Modal.astro
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
import { Icon } from "@astrojs/starlight/components";
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
button: string;
|
||||
icon: Parameters<typeof Icon>[0]["name"];
|
||||
}
|
||||
|
||||
const { title, icon, button } = Astro.props;
|
||||
const modalId = `modal-${Math.random().toString(36).slice(2)}`;
|
||||
---
|
||||
|
||||
<div>
|
||||
<label
|
||||
for={modalId}
|
||||
class="cursor-pointer bg-accent-600 dark:bg-accent-200 text-white dark:text-gray-900 px-4 py-2 rounded-lg flex items-center justify-center"
|
||||
>
|
||||
<b>{button}</b>
|
||||
<Icon name={icon} class="w-6 h-6" />
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<input
|
||||
type="checkbox"
|
||||
id={modalId}
|
||||
class="peer fixed appearance-none opacity-0"
|
||||
/>
|
||||
|
||||
<label
|
||||
for={modalId}
|
||||
class="pointer-events-none invisible fixed inset-0 flex cursor-pointer items-center justify-center overflow-hidden overscroll-contain backdrop-blur-md bg-gray-800/90 opacity-0 transition-all duration-200 ease-in-out peer-checked:pointer-events-auto peer-checked:visible peer-checked:opacity-100 peer-checked:[&>*]:translate-y-0 peer-checked:[&>*]:scale-100 z-50"
|
||||
>
|
||||
<div
|
||||
class="bg-white dark:bg-gray-900 border dark:border-gray-700 border-gray-300 p-4 shadow-lg w-5/6 transform -translate-y-4 scale-95 transition-all duration-200 ease-in-out"
|
||||
>
|
||||
<h2 class="text-xl font-bold mb-4">{title}</h2>
|
||||
<slot />
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
41
src/components/PluginCard.astro
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
import PluginModal from "./PluginModal.astro";
|
||||
import { Markdown } from "@astropub/md";
|
||||
import DeprecatedIcon from "./DeprecatedIcon.astro";
|
||||
|
||||
export interface Plugin {
|
||||
description: string;
|
||||
hash: string;
|
||||
name: string;
|
||||
author: string[];
|
||||
link: string;
|
||||
example: string;
|
||||
version: string;
|
||||
}
|
||||
|
||||
type Props = Plugin;
|
||||
|
||||
const plugin = Astro.props;
|
||||
const description = (
|
||||
plugin.description.length > 200
|
||||
? plugin.description.slice(0, 200) + "..."
|
||||
: plugin.description
|
||||
).replace("[DEPRECATED]", "");
|
||||
|
||||
const deprecated = plugin.description.includes("[DEPRECATED]");
|
||||
---
|
||||
|
||||
<div
|
||||
class="relative p-4 border border-gray-300 dark:border-gray-700 not-content"
|
||||
>
|
||||
<div class="flex justify-between items-center mb-4">
|
||||
<h3>{plugin.name}</h3>
|
||||
{deprecated && <DeprecatedIcon />}
|
||||
</div>
|
||||
<div class="mb-14">
|
||||
<Markdown of={description} />
|
||||
</div>
|
||||
<div class="absolute bottom-4 right-4">
|
||||
<PluginModal {...plugin} />
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,28 +0,0 @@
|
||||
import styles from './index.module.css'
|
||||
import PluginModal from "../PluginModal";
|
||||
|
||||
export default function PluginCard({ plugin }) {
|
||||
return (
|
||||
<div className={styles.card}>
|
||||
<div className={styles.cardHeader}>
|
||||
<h3>{plugin.name}</h3>
|
||||
</div>
|
||||
<div className={styles.cardBody}>
|
||||
<p>{plugin.trimmedDescription}</p>
|
||||
</div>
|
||||
<div className={styles.cardFooter}>
|
||||
<PluginModal plugin={plugin} />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
/*
|
||||
- description
|
||||
- hash
|
||||
- name
|
||||
- author
|
||||
- link
|
||||
- example
|
||||
- version
|
||||
*/
|
||||
@@ -1,31 +0,0 @@
|
||||
.card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
height: 100%;
|
||||
padding: 1rem;
|
||||
border-radius: 0.5rem;
|
||||
background-color: var(--color-white);
|
||||
box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.cardHeader {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.cardBody {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
height: 100%;
|
||||
}
|
||||
.cardFooter {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 1rem;
|
||||
/* put on the right side of the footer */
|
||||
margin-left: auto;
|
||||
}
|
||||
46
src/components/PluginModal.astro
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
import type { Plugin } from "./PluginCard.astro";
|
||||
import { Code } from "@astrojs/starlight/components";
|
||||
import { Markdown } from "@astropub/md";
|
||||
import Modal from "./Modal.astro";
|
||||
|
||||
type Props = Plugin;
|
||||
|
||||
const { name, description, example, author } = Astro.props;
|
||||
|
||||
const trimmedCode = example
|
||||
.replace("```ts", "")
|
||||
.replace("```", "")
|
||||
.split("\n")
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
|
||||
const trimmedDescription = description.replace("[DEPRECATED]", "");
|
||||
const deprecated = description.includes("[DEPRECATED]");
|
||||
|
||||
const authors = new Intl.ListFormat("en", {
|
||||
style: "long",
|
||||
type: "conjunction",
|
||||
}).format(
|
||||
author.map((s) =>
|
||||
s
|
||||
.replace(/[\]<>@]/g, "")
|
||||
.split("[")[0]
|
||||
.trim(),
|
||||
),
|
||||
);
|
||||
---
|
||||
|
||||
<Modal button="View" icon="right-arrow" title={`${name} by ${authors}`}>
|
||||
{
|
||||
deprecated && (
|
||||
<div class="mb-4 p-2 rounded-md bg-[var(--sl-color-orange-low)] border border-[var(--sl-color-orange)] text-gray-900 dark:text-white">
|
||||
This plugin is deprecated and should not be used in new projects.
|
||||
</div>
|
||||
)
|
||||
}
|
||||
<div class="mb-4">
|
||||
<Markdown of={trimmedDescription} />
|
||||
</div>
|
||||
<Code lang="ts" title="src/commands/ping.ts" code={trimmedCode} />
|
||||
</Modal>
|
||||
@@ -1,88 +0,0 @@
|
||||
import React from 'react';
|
||||
import Modal from 'react-modal';
|
||||
import styles from "./index.module.css";
|
||||
import CodeBlock from "@theme/CodeBlock";
|
||||
import clsx from "clsx";
|
||||
import useTheme from "../../hooks/useTheme";
|
||||
|
||||
const light = {
|
||||
content: {
|
||||
top: '50%',
|
||||
left: '50%',
|
||||
right: 'auto',
|
||||
bottom: 'auto',
|
||||
marginRight: '-50%',
|
||||
transform: 'translate(-50%, -50%)',
|
||||
width: "70vw",
|
||||
height: "50vh",
|
||||
backgroundColor: "#fff",
|
||||
},
|
||||
};
|
||||
const dark = {
|
||||
content: {
|
||||
top: '50%',
|
||||
left: '50%',
|
||||
right: 'auto',
|
||||
bottom: 'auto',
|
||||
marginRight: '-50%',
|
||||
transform: 'translate(-50%, -50%)',
|
||||
width: "70vw",
|
||||
height: "50vh",
|
||||
backgroundColor: "#333",
|
||||
color: "#fff"
|
||||
},
|
||||
};
|
||||
|
||||
export default function PluginModal({ plugin }) {
|
||||
const [modalIsOpen, setIsOpen] = React.useState(false);
|
||||
const [theme] = useTheme();
|
||||
const [modalCSS, setModalCSS] = React.useState(theme === "dark" ? dark : light);
|
||||
function openModal() {
|
||||
setIsOpen(true);
|
||||
}
|
||||
function closeModal() {
|
||||
setIsOpen(false);
|
||||
}
|
||||
React.useEffect(() => {
|
||||
setModalCSS(theme === "dark" ? dark : light)
|
||||
}, [theme])
|
||||
return (
|
||||
<div>
|
||||
<button onClick={openModal}>Info</button>
|
||||
<Modal
|
||||
isOpen={modalIsOpen}
|
||||
onRequestClose={closeModal}
|
||||
style={modalCSS}
|
||||
contentLabel={plugin.name}
|
||||
>
|
||||
<h2>{plugin.name} by {parseAuthor(plugin.author)}</h2>
|
||||
<p>{plugin.description}</p>
|
||||
<CodeBlock
|
||||
language="ts"
|
||||
title="/src/commands/ping.ts"
|
||||
showLineNumbers
|
||||
>
|
||||
{plugin.example.replace('```ts', '').replace('```', '').trim()}
|
||||
</CodeBlock>
|
||||
<div className={styles.closeButton}>
|
||||
<button onClick={closeModal}>close</button>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function parseAuthor(aut) {
|
||||
const [interestingStuff,] = aut.toString().replace(/[\]<>@]/g, "").split("[")
|
||||
return interestingStuff.trim()
|
||||
}
|
||||
|
||||
/*
|
||||
- description
|
||||
- hash
|
||||
- name
|
||||
- author
|
||||
- link
|
||||
- example
|
||||
- version
|
||||
*/
|
||||
@@ -1,11 +0,0 @@
|
||||
.closeButton {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
padding: 0.5rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
[data-theme='dark'] .modal {
|
||||
background-color: var(--ifm-color-primary);
|
||||
}
|
||||
46
src/components/SponsorCard.astro
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
export interface Sponsor {
|
||||
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;
|
||||
}
|
||||
|
||||
type Props = Pick<
|
||||
Sponsor,
|
||||
"name" | "image" | "totalAmountDonated" | "isAdmin" | "publicMessage"
|
||||
>;
|
||||
|
||||
const { name, image, totalAmountDonated, isAdmin, publicMessage } = Astro.props;
|
||||
---
|
||||
|
||||
<div
|
||||
class="relative p-4 border border-gray-300 dark:border-gray-700 flex items-center flex-col not-content"
|
||||
>
|
||||
<div class="flex items-center flex-col text-center">
|
||||
<img class="w-16 h-16 rounded-full" src={image} alt={name} />
|
||||
{
|
||||
isAdmin && (
|
||||
<div class="px-2 py-1 mt-2 text-xs font-semibold bg-accent-600 dark:bg-accent-200 text-white dark:text-gray-900 rounded-full">
|
||||
Admin
|
||||
</div>
|
||||
)
|
||||
}
|
||||
<p class="font-semibold">{name}</p>
|
||||
</div>
|
||||
<p class="text-sm text-center mb-8">{publicMessage}</p>
|
||||
<p class="font-semibold text-center absolute bottom-2">
|
||||
${totalAmountDonated / 100}
|
||||
</p>
|
||||
</div>
|
||||
@@ -1,92 +0,0 @@
|
||||
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;
|
||||
};
|
||||
*/
|
||||
@@ -1,42 +0,0 @@
|
||||
.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;
|
||||
}
|
||||
39
src/components/ThemeSelect.astro
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
// Reference: https://github.com/HiDeoo/starlight-blog/blob/924b20ce0dd5f71eb2416fefed8a5134586893d8/packages/starlight-blog/overrides/ThemeSelect.astro#L10
|
||||
// Have to override Starlight ThemeSelect component to add custom links in the header.
|
||||
import type { Props } from "@astrojs/starlight/props";
|
||||
import StarlightThemeSelect from "starlight-blog/overrides/ThemeSelect.astro";
|
||||
---
|
||||
|
||||
<div>
|
||||
<a href="/guide/walkthrough/new-project">Docs</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="/plugins">Plugins</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="/sponsors">Sponsors</a>
|
||||
</div>
|
||||
<StarlightThemeSelect {...Astro.props}>
|
||||
<slot />
|
||||
</StarlightThemeSelect>
|
||||
|
||||
<style>
|
||||
div {
|
||||
border-inline-end: 1px solid var(--sl-color-gray-5);
|
||||
display: none;
|
||||
padding-inline-end: 1rem;
|
||||
}
|
||||
|
||||
@media (min-width: 50rem) {
|
||||
div {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--sl-color-text-accent);
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
7
src/content/config.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { defineCollection } from "astro:content";
|
||||
import { docsSchema } from "@astrojs/starlight/schema";
|
||||
import { blogSchema } from "starlight-blog/schema";
|
||||
|
||||
export const collections = {
|
||||
docs: defineCollection({ schema: docsSchema({ extend: blogSchema() }) }),
|
||||
};
|
||||
96
src/content/docs/api/README.md
Normal file
@@ -0,0 +1,96 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "@sern/handler"
|
||||
---
|
||||
|
||||
## Namespaces
|
||||
|
||||
- [Presence](/api/namespaces/presence/readme/)
|
||||
- [Sern](/api/namespaces/sern/readme/)
|
||||
|
||||
## Enumerations
|
||||
|
||||
- [CommandType](/api/enumerations/commandtype/)
|
||||
- [EventType](/api/enumerations/eventtype/)
|
||||
- [PayloadType](/api/enumerations/payloadtype/)
|
||||
- [PluginType](/api/enumerations/plugintype/)
|
||||
|
||||
## Classes
|
||||
|
||||
- [Context](/api/classes/context/)
|
||||
- [ModuleStore](/api/classes/modulestore/)
|
||||
|
||||
## Interfaces
|
||||
|
||||
- [BothCommand](/api/interfaces/bothcommand/)
|
||||
- [ButtonCommand](/api/interfaces/buttoncommand/)
|
||||
- [ChannelSelectCommand](/api/interfaces/channelselectcommand/)
|
||||
- [CommandModuleDefs](/api/interfaces/commandmoduledefs/)
|
||||
- [ContextMenuMsg](/api/interfaces/contextmenumsg/)
|
||||
- [ContextMenuUser](/api/interfaces/contextmenuuser/)
|
||||
- [ControlPlugin](/api/interfaces/controlplugin/)
|
||||
- [Controller](/api/interfaces/controller/)
|
||||
- [CoreDependencies](/api/interfaces/coredependencies/)
|
||||
- [CoreModuleStore](/api/interfaces/coremodulestore/)
|
||||
- [DiscordEventCommand](/api/interfaces/discordeventcommand/)
|
||||
- [Disposable](/api/interfaces/disposable/)
|
||||
- [Emitter](/api/interfaces/emitter/)
|
||||
- [ErrorHandling](/api/interfaces/errorhandling/)
|
||||
- [EventModuleDefs](/api/interfaces/eventmoduledefs/)
|
||||
- [ExternalEventCommand](/api/interfaces/externaleventcommand/)
|
||||
- [Init](/api/interfaces/init/)
|
||||
- [InitPlugin](/api/interfaces/initplugin/)
|
||||
- [Logging](/api/interfaces/logging/)
|
||||
- [MentionableSelectCommand](/api/interfaces/mentionableselectcommand/)
|
||||
- [ModalSubmitCommand](/api/interfaces/modalsubmitcommand/)
|
||||
- [Plugin](/api/interfaces/plugin/)
|
||||
- [RoleSelectCommand](/api/interfaces/roleselectcommand/)
|
||||
- [SernAutocompleteData](/api/interfaces/sernautocompletedata/)
|
||||
- [SernEventCommand](/api/interfaces/serneventcommand/)
|
||||
- [SernEventsMapping](/api/interfaces/serneventsmapping/)
|
||||
- [SernSubCommandData](/api/interfaces/sernsubcommanddata/)
|
||||
- [SernSubCommandGroupData](/api/interfaces/sernsubcommandgroupdata/)
|
||||
- [SlashCommand](/api/interfaces/slashcommand/)
|
||||
- [StringSelectCommand](/api/interfaces/stringselectcommand/)
|
||||
- [TextCommand](/api/interfaces/textcommand/)
|
||||
- [UserSelectCommand](/api/interfaces/userselectcommand/)
|
||||
- [Wrapper](/api/interfaces/wrapper/)
|
||||
|
||||
## Type Aliases
|
||||
|
||||
- [AnyCommandPlugin](/api/type-aliases/anycommandplugin/)
|
||||
- [AnyEventPlugin](/api/type-aliases/anyeventplugin/)
|
||||
- [Args](/api/type-aliases/args/)
|
||||
- [CommandModule](/api/type-aliases/commandmodule/)
|
||||
- [EventModule](/api/type-aliases/eventmodule/)
|
||||
- [Initializable](/api/type-aliases/initializable/)
|
||||
- [LogPayload](/api/type-aliases/logpayload/)
|
||||
- [Payload](/api/type-aliases/payload/)
|
||||
- [PluginResult](/api/type-aliases/pluginresult/)
|
||||
- [SernOptionsData](/api/type-aliases/sernoptionsdata/)
|
||||
- [Singleton](/api/type-aliases/singleton/)
|
||||
- [SlashOptions](/api/type-aliases/slashoptions/)
|
||||
- [Transient](/api/type-aliases/transient/)
|
||||
|
||||
## Variables
|
||||
|
||||
- [controller](/api/variables/controller/)
|
||||
|
||||
## Functions
|
||||
|
||||
- [CommandControlPlugin](/api/functions/commandcontrolplugin/)
|
||||
- [CommandInitPlugin](/api/functions/commandinitplugin/)
|
||||
- [DiscordEventControlPlugin](/api/functions/discordeventcontrolplugin/)
|
||||
- [EventControlPlugin](/api/functions/eventcontrolplugin/)
|
||||
- [EventInitPlugin](/api/functions/eventinitplugin/)
|
||||
- [Service](/api/functions/service/)
|
||||
- [Services](/api/functions/services/)
|
||||
- [commandModule](/api/functions/commandmodule/)
|
||||
- [discordEvent](/api/functions/discordevent/)
|
||||
- [eventModule](/api/functions/eventmodule/)
|
||||
- [makeDependencies](/api/functions/makedependencies/)
|
||||
- [makePlugin](/api/functions/makeplugin/)
|
||||
- [single](/api/functions/single/)
|
||||
- [transient](/api/functions/transient/)
|
||||
291
src/content/docs/api/classes/Context.md
Normal file
@@ -0,0 +1,291 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Context"
|
||||
---
|
||||
|
||||
## Since
|
||||
|
||||
1.0.0
|
||||
Provides values shared between
|
||||
Message and ChatInputCommandInteraction
|
||||
|
||||
## Extends
|
||||
|
||||
- `CoreContext`\<`Message`, `ChatInputCommandInteraction`\>
|
||||
|
||||
## Accessors
|
||||
|
||||
### channel
|
||||
|
||||
> `get` **channel**(): `null` \| `TextBasedChannel`
|
||||
|
||||
#### Returns
|
||||
|
||||
`null` \| `TextBasedChannel`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:39](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/context.ts#L39)
|
||||
|
||||
***
|
||||
|
||||
### channelId
|
||||
|
||||
> `get` **channelId**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:45](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/context.ts#L45)
|
||||
|
||||
***
|
||||
|
||||
### client
|
||||
|
||||
> `get` **client**(): `Client`\<`boolean`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Client`\<`boolean`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:91](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/context.ts#L91)
|
||||
|
||||
***
|
||||
|
||||
### createdTimestamp
|
||||
|
||||
> `get` **createdTimestamp**(): `number`
|
||||
|
||||
#### Returns
|
||||
|
||||
`number`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:65](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/context.ts#L65)
|
||||
|
||||
***
|
||||
|
||||
### guild
|
||||
|
||||
> `get` **guild**(): `null` \| `Guild`
|
||||
|
||||
#### Returns
|
||||
|
||||
`null` \| `Guild`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:71](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/context.ts#L71)
|
||||
|
||||
***
|
||||
|
||||
### guildId
|
||||
|
||||
> `get` **guildId**(): `null` \| `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`null` \| `string`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:77](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/context.ts#L77)
|
||||
|
||||
***
|
||||
|
||||
### id
|
||||
|
||||
> `get` **id**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:33](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/context.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### inGuild
|
||||
|
||||
> `get` **inGuild**(): `boolean`
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:97](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/context.ts#L97)
|
||||
|
||||
***
|
||||
|
||||
### interaction
|
||||
|
||||
> `get` **interaction**(): `I`
|
||||
|
||||
#### Returns
|
||||
|
||||
`I`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/core-context.ts:15](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/core-context.ts#L15)
|
||||
|
||||
***
|
||||
|
||||
### member
|
||||
|
||||
> `get` **member**(): `null` \| `GuildMember` \| `APIInteractionGuildMember`
|
||||
|
||||
#### Returns
|
||||
|
||||
`null` \| `GuildMember` \| `APIInteractionGuildMember`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:85](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/context.ts#L85)
|
||||
|
||||
***
|
||||
|
||||
### message
|
||||
|
||||
> `get` **message**(): `M`
|
||||
|
||||
#### Returns
|
||||
|
||||
`M`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/core-context.ts:12](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/core-context.ts#L12)
|
||||
|
||||
***
|
||||
|
||||
### options
|
||||
|
||||
> `get` **options**(): `Omit`\<`CommandInteractionOptionResolver`\<`CacheType`\>, `"getMessage"` \| `"getFocused"`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Omit`\<`CommandInteractionOptionResolver`\<`CacheType`\>, `"getMessage"` \| `"getFocused"`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:26](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/context.ts#L26)
|
||||
|
||||
***
|
||||
|
||||
### user
|
||||
|
||||
> `get` **user**(): `User`
|
||||
|
||||
If context is holding a message, message.author
|
||||
else, interaction.user
|
||||
|
||||
#### Returns
|
||||
|
||||
`User`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:55](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/context.ts#L55)
|
||||
|
||||
***
|
||||
|
||||
### userId
|
||||
|
||||
> `get` **userId**(): `string`
|
||||
|
||||
#### Returns
|
||||
|
||||
`string`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:61](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/context.ts#L61)
|
||||
|
||||
## Methods
|
||||
|
||||
### isMessage()
|
||||
|
||||
> **isMessage**(): `this is CoreContext<Message<boolean>, never>`
|
||||
|
||||
#### Returns
|
||||
|
||||
`this is CoreContext<Message<boolean>, never>`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`CoreContext.isMessage`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/core-context.ts:19](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/core-context.ts#L19)
|
||||
|
||||
***
|
||||
|
||||
### isSlash()
|
||||
|
||||
> **isSlash**(): `this is CoreContext<never, ChatInputCommandInteraction<CacheType>>`
|
||||
|
||||
#### Returns
|
||||
|
||||
`this is CoreContext<never, ChatInputCommandInteraction<CacheType>>`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`CoreContext.isSlash`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/core-context.ts:23](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/core-context.ts#L23)
|
||||
|
||||
***
|
||||
|
||||
### reply()
|
||||
|
||||
> **reply**(`content`): `Promise`\<`Message`\<`boolean`\>\>
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **content**: `ReplyOptions`
|
||||
|
||||
#### Returns
|
||||
|
||||
`Promise`\<`Message`\<`boolean`\>\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:103](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/context.ts#L103)
|
||||
|
||||
***
|
||||
|
||||
### wrap()
|
||||
|
||||
> `static` **wrap**(`wrappable`): [`Context`](/api/classes/context/)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **wrappable**: `Message`\<`boolean`\> \| `BaseInteraction`\<`CacheType`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Context`](/api/classes/context/)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`CoreContext.wrap`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/context.ts:113](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/context.ts#L113)
|
||||
36
src/content/docs/api/classes/ModuleStore.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "ModuleStore"
|
||||
---
|
||||
|
||||
## Constructors
|
||||
|
||||
### new ModuleStore()
|
||||
|
||||
> **new ModuleStore**(): [`ModuleStore`](/api/classes/modulestore/)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ModuleStore`](/api/classes/modulestore/)
|
||||
|
||||
## Properties
|
||||
|
||||
### commands
|
||||
|
||||
> **commands**: `Map`\<`string`, `Module`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/module-store.ts:10](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/module-store.ts#L10)
|
||||
|
||||
***
|
||||
|
||||
### metadata
|
||||
|
||||
> **metadata**: `WeakMap`\<`Module`, `CommandMeta`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/module-store.ts:9](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/module-store.ts#L9)
|
||||
144
src/content/docs/api/enumerations/CommandType.md
Normal file
@@ -0,0 +1,144 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "CommandType"
|
||||
---
|
||||
|
||||
## Since
|
||||
|
||||
1.0.0
|
||||
A bitfield that discriminates command modules
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
export default commandModule({
|
||||
// highlight-next-line
|
||||
type : CommandType.Text,
|
||||
name : 'a text command'
|
||||
execute(message) {
|
||||
console.log(message.content)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### Both
|
||||
|
||||
> **Both**: `3`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:20](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L20)
|
||||
|
||||
***
|
||||
|
||||
### Button
|
||||
|
||||
> **Button**: `16`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:23](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L23)
|
||||
|
||||
***
|
||||
|
||||
### ChannelSelect
|
||||
|
||||
> **ChannelSelect**: `1024`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:29](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L29)
|
||||
|
||||
***
|
||||
|
||||
### CtxMsg
|
||||
|
||||
> **CtxMsg**: `8`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:22](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L22)
|
||||
|
||||
***
|
||||
|
||||
### CtxUser
|
||||
|
||||
> **CtxUser**: `4`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:21](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L21)
|
||||
|
||||
***
|
||||
|
||||
### MentionableSelect
|
||||
|
||||
> **MentionableSelect**: `512`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:28](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L28)
|
||||
|
||||
***
|
||||
|
||||
### Modal
|
||||
|
||||
> **Modal**: `64`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:25](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L25)
|
||||
|
||||
***
|
||||
|
||||
### RoleSelect
|
||||
|
||||
> **RoleSelect**: `256`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:27](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L27)
|
||||
|
||||
***
|
||||
|
||||
### Slash
|
||||
|
||||
> **Slash**: `2`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:19](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L19)
|
||||
|
||||
***
|
||||
|
||||
### StringSelect
|
||||
|
||||
> **StringSelect**: `32`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:24](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L24)
|
||||
|
||||
***
|
||||
|
||||
### Text
|
||||
|
||||
> **Text**: `1`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:18](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L18)
|
||||
|
||||
***
|
||||
|
||||
### UserSelect
|
||||
|
||||
> **UserSelect**: `128`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:26](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L26)
|
||||
58
src/content/docs/api/enumerations/EventType.md
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "EventType"
|
||||
---
|
||||
|
||||
A bitfield that discriminates event modules
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
export default eventModule({
|
||||
//highlight-next-line
|
||||
type : EventType.Discord,
|
||||
name : 'guildMemberAdd'
|
||||
execute(member : GuildMember) {
|
||||
console.log(member)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### Discord
|
||||
|
||||
> **Discord**: `1`
|
||||
|
||||
The EventType for handling discord events
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:51](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L51)
|
||||
|
||||
***
|
||||
|
||||
### External
|
||||
|
||||
> **External**: `3`
|
||||
|
||||
The EventType for handling external events.
|
||||
Could be for example, `process` events, database events
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:60](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L60)
|
||||
|
||||
***
|
||||
|
||||
### Sern
|
||||
|
||||
> **Sern**: `2`
|
||||
|
||||
The EventType for handling sern events
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:55](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L55)
|
||||
42
src/content/docs/api/enumerations/PayloadType.md
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "PayloadType"
|
||||
---
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### Failure
|
||||
|
||||
> **Failure**: `"failure"`
|
||||
|
||||
The PayloadType for a SernEmitter failure event
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:98](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L98)
|
||||
|
||||
***
|
||||
|
||||
### Success
|
||||
|
||||
> **Success**: `"success"`
|
||||
|
||||
The PayloadType for a SernEmitter success event
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:94](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L94)
|
||||
|
||||
***
|
||||
|
||||
### Warning
|
||||
|
||||
> **Warning**: `"warning"`
|
||||
|
||||
The PayloadType for a SernEmitter warning event
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:102](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L102)
|
||||
44
src/content/docs/api/enumerations/PluginType.md
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "PluginType"
|
||||
---
|
||||
|
||||
A bitfield that discriminates plugins
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
export default function myPlugin() : EventPlugin<CommandType.Text> {
|
||||
//highlight-next-line
|
||||
type : PluginType.Event,
|
||||
execute([ctx, args], controller) {
|
||||
return controller.next();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
### Control
|
||||
|
||||
> **Control**: `2`
|
||||
|
||||
The PluginType for EventPlugins
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:85](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L85)
|
||||
|
||||
***
|
||||
|
||||
### Init
|
||||
|
||||
> **Init**: `1`
|
||||
|
||||
The PluginType for InitPlugins
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/structures/enums.ts:81](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/structures/enums.ts#L81)
|
||||
29
src/content/docs/api/functions/CommandControlPlugin.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "CommandControlPlugin"
|
||||
---
|
||||
|
||||
> **CommandControlPlugin**\<`I`\>(`execute`): [`Plugin`](/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **I** *extends* [`CommandType`](/api/enumerations/commandtype/)
|
||||
|
||||
## Parameters
|
||||
|
||||
• **execute**
|
||||
|
||||
## Returns
|
||||
|
||||
[`Plugin`](/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Since
|
||||
|
||||
2.5.0
|
||||
@__PURE__
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/create-plugins.ts:37](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/create-plugins.ts#L37)
|
||||
29
src/content/docs/api/functions/CommandInitPlugin.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "CommandInitPlugin"
|
||||
---
|
||||
|
||||
> **CommandInitPlugin**\<`I`\>(`execute`): [`Plugin`](/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **I** *extends* [`CommandType`](/api/enumerations/commandtype/)
|
||||
|
||||
## Parameters
|
||||
|
||||
• **execute**
|
||||
|
||||
## Returns
|
||||
|
||||
[`Plugin`](/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Since
|
||||
|
||||
2.5.0
|
||||
@__PURE__
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/create-plugins.ts:28](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/create-plugins.ts#L28)
|
||||
35
src/content/docs/api/functions/DiscordEventControlPlugin.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "DiscordEventControlPlugin"
|
||||
---
|
||||
|
||||
> **DiscordEventControlPlugin**\<`T`\>(`name`, `execute`): [`Plugin`](/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** *extends* keyof `ClientEvents`
|
||||
|
||||
## Parameters
|
||||
|
||||
• **name**: `T`
|
||||
|
||||
• **execute**
|
||||
|
||||
## Returns
|
||||
|
||||
[`Plugin`](/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Since
|
||||
|
||||
2.5.0
|
||||
|
||||
## Experimental
|
||||
|
||||
A specialized function for creating control plugins with discord.js ClientEvents.
|
||||
Will probably be moved one day!
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/create-plugins.ts:58](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/create-plugins.ts#L58)
|
||||
29
src/content/docs/api/functions/EventControlPlugin.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "EventControlPlugin"
|
||||
---
|
||||
|
||||
> **EventControlPlugin**\<`I`\>(`execute`): [`Plugin`](/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **I** *extends* [`EventType`](/api/enumerations/eventtype/)
|
||||
|
||||
## Parameters
|
||||
|
||||
• **execute**
|
||||
|
||||
## Returns
|
||||
|
||||
[`Plugin`](/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Since
|
||||
|
||||
2.5.0
|
||||
@__PURE__
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/create-plugins.ts:46](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/create-plugins.ts#L46)
|
||||
29
src/content/docs/api/functions/EventInitPlugin.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "EventInitPlugin"
|
||||
---
|
||||
|
||||
> **EventInitPlugin**\<`I`\>(`execute`): [`Plugin`](/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **I** *extends* [`EventType`](/api/enumerations/eventtype/)
|
||||
|
||||
## Parameters
|
||||
|
||||
• **execute**
|
||||
|
||||
## Returns
|
||||
|
||||
[`Plugin`](/api/interfaces/plugin/)\<`unknown`[]\>
|
||||
|
||||
## Since
|
||||
|
||||
2.5.0
|
||||
@__PURE__
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/create-plugins.ts:19](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/create-plugins.ts#L19)
|
||||
41
src/content/docs/api/functions/Service.md
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Service"
|
||||
---
|
||||
|
||||
> **Service**\<`T`\>(`key`): `NonNullable`\<`UnpackFunction`\<`Partial`\<`Dependencies`\>\[`T`\]\>\>
|
||||
|
||||
The new Service api, a cleaner alternative to useContainer
|
||||
To obtain intellisense, ensure a .d.ts file exists in the root of compilation.
|
||||
Usually our scaffolding tool takes care of this.
|
||||
Note: this method only works AFTER your container has been initiated
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** *extends* keyof `Dependencies`
|
||||
|
||||
## Parameters
|
||||
|
||||
• **key**: `T`
|
||||
|
||||
a key that corresponds to a dependency registered.
|
||||
|
||||
## Returns
|
||||
|
||||
`NonNullable`\<`UnpackFunction`\<`Partial`\<`Dependencies`\>\[`T`\]\>\>
|
||||
|
||||
## Since
|
||||
|
||||
3.0.0
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
const client = Service('@sern/client');
|
||||
```
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/ioc/dependency-injection.ts:37](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/ioc/dependency-injection.ts#L37)
|
||||
31
src/content/docs/api/functions/Services.md
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Services"
|
||||
---
|
||||
|
||||
> **Services**\<`T`\>(...`keys`): `IntoDependencies`\<`T`\>
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** *extends* keyof `Dependencies`[]
|
||||
|
||||
## Parameters
|
||||
|
||||
• ...**keys**: [`...T[]`]
|
||||
|
||||
## Returns
|
||||
|
||||
`IntoDependencies`\<`T`\>
|
||||
|
||||
array of dependencies, in the same order of keys provided
|
||||
|
||||
## Since
|
||||
|
||||
3.0.0
|
||||
The plural version of [Service](../../../../../../api/functions/service)
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/ioc/dependency-injection.ts:47](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/ioc/dependency-injection.ts#L47)
|
||||
24
src/content/docs/api/functions/commandModule.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "commandModule"
|
||||
---
|
||||
|
||||
> **commandModule**(`mod`): [`CommandModule`](/api/type-aliases/commandmodule/)
|
||||
|
||||
## Parameters
|
||||
|
||||
• **mod**: `InputCommand`
|
||||
|
||||
## Returns
|
||||
|
||||
[`CommandModule`](/api/type-aliases/commandmodule/)
|
||||
|
||||
## Since
|
||||
|
||||
1.0.0 The wrapper function to define command modules for sern
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/modules.ts:19](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/modules.ts#L19)
|
||||
36
src/content/docs/api/functions/discordEvent.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "discordEvent"
|
||||
---
|
||||
|
||||
> **discordEvent**\<`T`\>(`mod`): [`EventModule`](/api/type-aliases/eventmodule/)
|
||||
|
||||
Create event modules from discord.js client events,
|
||||
This is an [eventModule](../../../../../../api/functions/eventmodule) for discord events,
|
||||
where typings can be very bad.
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** *extends* keyof `ClientEvents`
|
||||
|
||||
## Parameters
|
||||
|
||||
• **mod**
|
||||
|
||||
• **mod.execute**
|
||||
|
||||
• **mod.name**: `T`
|
||||
|
||||
• **mod.plugins?**: [`AnyEventPlugin`](/api/type-aliases/anyeventplugin/)[]
|
||||
|
||||
## Returns
|
||||
|
||||
[`EventModule`](/api/type-aliases/eventmodule/)
|
||||
|
||||
## Experimental
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/modules.ts:47](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/modules.ts#L47)
|
||||
25
src/content/docs/api/functions/eventModule.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "eventModule"
|
||||
---
|
||||
|
||||
> **eventModule**(`mod`): [`EventModule`](/api/type-aliases/eventmodule/)
|
||||
|
||||
## Parameters
|
||||
|
||||
• **mod**: `InputEvent`
|
||||
|
||||
## Returns
|
||||
|
||||
[`EventModule`](/api/type-aliases/eventmodule/)
|
||||
|
||||
## Since
|
||||
|
||||
1.0.0
|
||||
The wrapper function to define event modules for sern
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/modules.ts:32](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/modules.ts#L32)
|
||||
24
src/content/docs/api/functions/makeDependencies.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "makeDependencies"
|
||||
---
|
||||
|
||||
> **makeDependencies**\<`T`\>(`conf`): `Promise`\<\<`V`\>(...`keys`) => `IntoDependencies`\<`V`\>\>
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** *extends* `Dependencies`
|
||||
|
||||
## Parameters
|
||||
|
||||
• **conf**: `ValidDependencyConfig`
|
||||
|
||||
## Returns
|
||||
|
||||
`Promise`\<\<`V`\>(...`keys`) => `IntoDependencies`\<`V`\>\>
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/ioc/base.ts:144](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/ioc/base.ts#L144)
|
||||
26
src/content/docs/api/functions/makePlugin.md
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "makePlugin"
|
||||
---
|
||||
|
||||
> **makePlugin**\<`V`\>(`type`, `execute`): [`Plugin`](/api/interfaces/plugin/)\<`V`\>
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **V** *extends* `unknown`[]
|
||||
|
||||
## Parameters
|
||||
|
||||
• **type**: [`PluginType`](/api/enumerations/plugintype/)
|
||||
|
||||
• **execute**
|
||||
|
||||
## Returns
|
||||
|
||||
[`Plugin`](/api/interfaces/plugin/)\<`V`\>
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/create-plugins.ts:6](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/create-plugins.ts#L6)
|
||||
35
src/content/docs/api/functions/single.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "single"
|
||||
---
|
||||
|
||||
> **single**\<`T`\>(`cb`): () => `T`
|
||||
|
||||
@__PURE__
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T**
|
||||
|
||||
## Parameters
|
||||
|
||||
• **cb**
|
||||
|
||||
## Returns
|
||||
|
||||
`Function`
|
||||
|
||||
### Returns
|
||||
|
||||
`T`
|
||||
|
||||
## Since
|
||||
|
||||
2.0.0.
|
||||
Creates a singleton object.
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/ioc/dependency-injection.ts:11](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/ioc/dependency-injection.ts#L11)
|
||||
39
src/content/docs/api/functions/transient.md
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "transient"
|
||||
---
|
||||
|
||||
> **transient**\<`T`\>(`cb`): () => () => `T`
|
||||
|
||||
@__PURE__
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T**
|
||||
|
||||
## Parameters
|
||||
|
||||
• **cb**
|
||||
|
||||
## Returns
|
||||
|
||||
`Function`
|
||||
|
||||
### Returns
|
||||
|
||||
`Function`
|
||||
|
||||
#### Returns
|
||||
|
||||
`T`
|
||||
|
||||
## Since
|
||||
|
||||
2.0.0
|
||||
Creates a transient object
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/ioc/dependency-injection.ts:21](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/ioc/dependency-injection.ts#L21)
|
||||
124
src/content/docs/api/interfaces/BothCommand.md
Normal file
@@ -0,0 +1,124 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "BothCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### alias?
|
||||
|
||||
> `optional` **alias**: `string`[]
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:125](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L125)
|
||||
|
||||
***
|
||||
|
||||
### description
|
||||
|
||||
> **description**: `string`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:126](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L126)
|
||||
|
||||
***
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (`ctx`, `args`) => `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **ctx**: [`Context`](/api/classes/context/)
|
||||
|
||||
• **args**: [`Args`](/api/type-aliases/args/)
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:128](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L128)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### options?
|
||||
|
||||
> `optional` **options**: [`SernOptionsData`](/api/type-aliases/sernoptionsdata/)[]
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:127](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L127)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`Both`](/api/enumerations/commandtype/#both)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:124](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L124)
|
||||
102
src/content/docs/api/interfaces/ButtonCommand.md
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "ButtonCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (`ctx`) => `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **ctx**: `ButtonInteraction`\<`CacheType`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:65](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L65)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`Button`](/api/enumerations/commandtype/#button)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:64](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L64)
|
||||
102
src/content/docs/api/interfaces/ChannelSelectCommand.md
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "ChannelSelectCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (`ctx`) => `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **ctx**: `ChannelSelectMenuInteraction`\<`CacheType`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:75](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L75)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`ChannelSelect`](/api/enumerations/commandtype/#channelselect)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:74](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L74)
|
||||
126
src/content/docs/api/interfaces/CommandModuleDefs.md
Normal file
@@ -0,0 +1,126 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "CommandModuleDefs"
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### 1
|
||||
|
||||
> **1**: [`TextCommand`](/api/interfaces/textcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:150](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L150)
|
||||
|
||||
***
|
||||
|
||||
### 1024
|
||||
|
||||
> **1024**: [`ChannelSelectCommand`](/api/interfaces/channelselectcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:158](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L158)
|
||||
|
||||
***
|
||||
|
||||
### 128
|
||||
|
||||
> **128**: [`UserSelectCommand`](/api/interfaces/userselectcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:160](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L160)
|
||||
|
||||
***
|
||||
|
||||
### 16
|
||||
|
||||
> **16**: [`ButtonCommand`](/api/interfaces/buttoncommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:155](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L155)
|
||||
|
||||
***
|
||||
|
||||
### 2
|
||||
|
||||
> **2**: [`SlashCommand`](/api/interfaces/slashcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:151](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L151)
|
||||
|
||||
***
|
||||
|
||||
### 256
|
||||
|
||||
> **256**: [`RoleSelectCommand`](/api/interfaces/roleselectcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:157](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L157)
|
||||
|
||||
***
|
||||
|
||||
### 3
|
||||
|
||||
> **3**: [`BothCommand`](/api/interfaces/bothcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:152](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L152)
|
||||
|
||||
***
|
||||
|
||||
### 32
|
||||
|
||||
> **32**: [`StringSelectCommand`](/api/interfaces/stringselectcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:156](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L156)
|
||||
|
||||
***
|
||||
|
||||
### 4
|
||||
|
||||
> **4**: [`ContextMenuUser`](/api/interfaces/contextmenuuser/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:154](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L154)
|
||||
|
||||
***
|
||||
|
||||
### 512
|
||||
|
||||
> **512**: [`MentionableSelectCommand`](/api/interfaces/mentionableselectcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:159](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L159)
|
||||
|
||||
***
|
||||
|
||||
### 64
|
||||
|
||||
> **64**: [`ModalSubmitCommand`](/api/interfaces/modalsubmitcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:161](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L161)
|
||||
|
||||
***
|
||||
|
||||
### 8
|
||||
|
||||
> **8**: [`ContextMenuMsg`](/api/interfaces/contextmenumsg/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:153](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L153)
|
||||
102
src/content/docs/api/interfaces/ContextMenuMsg.md
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "ContextMenuMsg"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (`ctx`) => `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **ctx**: `MessageContextMenuCommandInteraction`\<`CacheType`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:60](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L60)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`CtxMsg`](/api/enumerations/commandtype/#ctxmsg)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:59](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L59)
|
||||
102
src/content/docs/api/interfaces/ContextMenuUser.md
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "ContextMenuUser"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (`ctx`) => `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **ctx**: `UserContextMenuCommandInteraction`\<`CacheType`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:55](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L55)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`CtxUser`](/api/enumerations/commandtype/#ctxuser)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:54](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L54)
|
||||
38
src/content/docs/api/interfaces/ControlPlugin.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "ControlPlugin"
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **Args** *extends* `any`[] = `any`[]
|
||||
|
||||
## Properties
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (...`args`) => [`PluginResult`](/api/type-aliases/pluginresult/)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**args**: `Args`
|
||||
|
||||
#### Returns
|
||||
|
||||
[`PluginResult`](/api/type-aliases/pluginresult/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-plugin.ts:73](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-plugin.ts#L73)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`Control`](/api/enumerations/plugintype/#control)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-plugin.ts:72](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-plugin.ts#L72)
|
||||
34
src/content/docs/api/interfaces/Controller.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Controller"
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### next()
|
||||
|
||||
> **next**: () => `Ok`\<`void`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Ok`\<`void`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-plugin.ts:59](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-plugin.ts#L59)
|
||||
|
||||
***
|
||||
|
||||
### stop()
|
||||
|
||||
> **stop**: () => `Err`\<`void`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`Err`\<`void`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-plugin.ts:60](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-plugin.ts#L60)
|
||||
94
src/content/docs/api/interfaces/CoreDependencies.md
Normal file
@@ -0,0 +1,94 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "CoreDependencies"
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### @sern/client()
|
||||
|
||||
> **@sern/client**: () => [`Emitter`](/api/interfaces/emitter/)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Emitter`](/api/interfaces/emitter/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/ioc.ts:28](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/ioc.ts#L28)
|
||||
|
||||
***
|
||||
|
||||
### @sern/emitter()
|
||||
|
||||
> **@sern/emitter**: () => [`Emitter`](/api/interfaces/emitter/)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Emitter`](/api/interfaces/emitter/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/ioc.ts:29](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/ioc.ts#L29)
|
||||
|
||||
***
|
||||
|
||||
### @sern/errors()
|
||||
|
||||
> **@sern/errors**: () => [`ErrorHandling`](/api/interfaces/errorhandling/)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`ErrorHandling`](/api/interfaces/errorhandling/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/ioc.ts:36](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/ioc.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### @sern/logger()?
|
||||
|
||||
> `optional` **@sern/logger**: () => [`Logging`](/api/interfaces/logging/)\<`unknown`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Logging`](/api/interfaces/logging/)\<`unknown`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/ioc.ts:37](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/ioc.ts#L37)
|
||||
|
||||
***
|
||||
|
||||
### @sern/modules()
|
||||
|
||||
> **@sern/modules**: () => `ModuleManager`
|
||||
|
||||
#### Returns
|
||||
|
||||
`ModuleManager`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/ioc.ts:35](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/ioc.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### ~~@sern/store()~~
|
||||
|
||||
> **@sern/store**: () => [`CoreModuleStore`](/api/interfaces/coremodulestore/)
|
||||
|
||||
:::caution[Deprecated]
|
||||
Will be removed and turned internal
|
||||
:::
|
||||
|
||||
#### Returns
|
||||
|
||||
[`CoreModuleStore`](/api/interfaces/coremodulestore/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/ioc.ts:34](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/ioc.ts#L34)
|
||||
28
src/content/docs/api/interfaces/CoreModuleStore.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "CoreModuleStore"
|
||||
---
|
||||
|
||||
Represents a core module store that stores IDs mapped to file paths.
|
||||
|
||||
## Properties
|
||||
|
||||
### commands
|
||||
|
||||
> **commands**: `Map`\<`string`, `Module`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/module-store.ts:7](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/contracts/module-store.ts#L7)
|
||||
|
||||
***
|
||||
|
||||
### metadata
|
||||
|
||||
> **metadata**: `WeakMap`\<`Module`, `CommandMeta`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/module-store.ts:8](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/contracts/module-store.ts#L8)
|
||||
106
src/content/docs/api/interfaces/DiscordEventCommand.md
Normal file
@@ -0,0 +1,106 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "DiscordEventCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** *extends* keyof `ClientEvents` = keyof `ClientEvents`
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `T`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:106](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L106)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`Discord`](/api/enumerations/eventtype/#discord)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:107](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L107)
|
||||
|
||||
## Methods
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**(...`args`): `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**args**: `ClientEvents`\[`T`\]
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:108](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L108)
|
||||
23
src/content/docs/api/interfaces/Disposable.md
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Disposable"
|
||||
---
|
||||
|
||||
Represents a Disposable contract.
|
||||
Let dependencies implement this to dispose and cleanup.
|
||||
|
||||
## Methods
|
||||
|
||||
### dispose()
|
||||
|
||||
> **dispose**(): `unknown`
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/hooks.ts:15](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/contracts/hooks.ts#L15)
|
||||
66
src/content/docs/api/interfaces/Emitter.md
Normal file
@@ -0,0 +1,66 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Emitter"
|
||||
---
|
||||
|
||||
## Methods
|
||||
|
||||
### addListener()
|
||||
|
||||
> **addListener**(`eventName`, `listener`): `this`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **eventName**: `string` \| `symbol`
|
||||
|
||||
• **listener**: `AnyFunction`
|
||||
|
||||
#### Returns
|
||||
|
||||
`this`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/emitter.ts:6](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/contracts/emitter.ts#L6)
|
||||
|
||||
***
|
||||
|
||||
### emit()
|
||||
|
||||
> **emit**(`eventName`, ...`payload`): `boolean`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **eventName**: `string` \| `symbol`
|
||||
|
||||
• ...**payload**: `any`[]
|
||||
|
||||
#### Returns
|
||||
|
||||
`boolean`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/emitter.ts:8](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/contracts/emitter.ts#L8)
|
||||
|
||||
***
|
||||
|
||||
### removeListener()
|
||||
|
||||
> **removeListener**(`eventName`, `listener`): `this`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **eventName**: `string` \| `symbol`
|
||||
|
||||
• **listener**: `AnyFunction`
|
||||
|
||||
#### Returns
|
||||
|
||||
`this`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/emitter.ts:7](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/contracts/emitter.ts#L7)
|
||||
52
src/content/docs/api/interfaces/ErrorHandling.md
Normal file
@@ -0,0 +1,52 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "ErrorHandling"
|
||||
---
|
||||
|
||||
## Since
|
||||
|
||||
2.0.0
|
||||
|
||||
## Methods
|
||||
|
||||
### ~~crash()~~
|
||||
|
||||
> **crash**(`err`): `never`
|
||||
|
||||
:::caution[Deprecated]
|
||||
Version 4 will remove this method
|
||||
:::
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **err**: `Error`
|
||||
|
||||
#### Returns
|
||||
|
||||
`never`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/error-handling.ts:9](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/contracts/error-handling.ts#L9)
|
||||
|
||||
***
|
||||
|
||||
### updateAlive()
|
||||
|
||||
> **updateAlive**(`error`): `void`
|
||||
|
||||
A function that is called on every throw.
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **error**: `Error`
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/error-handling.ts:14](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/contracts/error-handling.ts#L14)
|
||||
36
src/content/docs/api/interfaces/EventModuleDefs.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "EventModuleDefs"
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### 1
|
||||
|
||||
> **1**: [`DiscordEventCommand`](/api/interfaces/discordeventcommand/)\<keyof `ClientEvents`\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:166](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L166)
|
||||
|
||||
***
|
||||
|
||||
### 2
|
||||
|
||||
> **2**: [`SernEventCommand`](/api/interfaces/serneventcommand/)\<keyof [`SernEventsMapping`](/api/interfaces/serneventsmapping/)\>
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:165](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L165)
|
||||
|
||||
***
|
||||
|
||||
### 3
|
||||
|
||||
> **3**: [`ExternalEventCommand`](/api/interfaces/externaleventcommand/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:167](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L167)
|
||||
112
src/content/docs/api/interfaces/ExternalEventCommand.md
Normal file
@@ -0,0 +1,112 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "ExternalEventCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### emitter
|
||||
|
||||
> **emitter**: keyof `Dependencies`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:48](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L48)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:47](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L47)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`External`](/api/enumerations/eventtype/#external)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:49](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L49)
|
||||
|
||||
## Methods
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**(...`args`): `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**args**: `unknown`[]
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:50](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L50)
|
||||
23
src/content/docs/api/interfaces/Init.md
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Init"
|
||||
---
|
||||
|
||||
Represents an initialization contract.
|
||||
Let dependencies implement this to initiate some logic.
|
||||
|
||||
## Methods
|
||||
|
||||
### init()
|
||||
|
||||
> **init**(): `unknown`
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/hooks.ts:7](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/contracts/hooks.ts#L7)
|
||||
38
src/content/docs/api/interfaces/InitPlugin.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "InitPlugin"
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **Args** *extends* `any`[] = `any`[]
|
||||
|
||||
## Properties
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (...`args`) => [`PluginResult`](/api/type-aliases/pluginresult/)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**args**: `Args`
|
||||
|
||||
#### Returns
|
||||
|
||||
[`PluginResult`](/api/type-aliases/pluginresult/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-plugin.ts:69](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-plugin.ts#L69)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`Init`](/api/enumerations/plugintype/#init)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-plugin.ts:68](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-plugin.ts#L68)
|
||||
86
src/content/docs/api/interfaces/Logging.md
Normal file
@@ -0,0 +1,86 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Logging"
|
||||
---
|
||||
|
||||
## Since
|
||||
|
||||
2.0.0
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** = `unknown`
|
||||
|
||||
## Methods
|
||||
|
||||
### debug()
|
||||
|
||||
> **debug**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **payload**: [`LogPayload`](/api/type-aliases/logpayload/)\<`T`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/logging.ts:8](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/contracts/logging.ts#L8)
|
||||
|
||||
***
|
||||
|
||||
### error()
|
||||
|
||||
> **error**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **payload**: [`LogPayload`](/api/type-aliases/logpayload/)\<`T`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/logging.ts:5](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/contracts/logging.ts#L5)
|
||||
|
||||
***
|
||||
|
||||
### info()
|
||||
|
||||
> **info**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **payload**: [`LogPayload`](/api/type-aliases/logpayload/)\<`T`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/logging.ts:7](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/contracts/logging.ts#L7)
|
||||
|
||||
***
|
||||
|
||||
### warning()
|
||||
|
||||
> **warning**(`payload`): `void`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **payload**: [`LogPayload`](/api/type-aliases/logpayload/)\<`T`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`void`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/contracts/logging.ts:6](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/contracts/logging.ts#L6)
|
||||
102
src/content/docs/api/interfaces/MentionableSelectCommand.md
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "MentionableSelectCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (`ctx`) => `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **ctx**: `MentionableSelectMenuInteraction`\<`CacheType`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:85](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L85)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`MentionableSelect`](/api/enumerations/commandtype/#mentionableselect)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:84](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L84)
|
||||
102
src/content/docs/api/interfaces/ModalSubmitCommand.md
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "ModalSubmitCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (`ctx`) => `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **ctx**: `ModalSubmitInteraction`\<`CacheType`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:95](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L95)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`Modal`](/api/enumerations/commandtype/#modal)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:94](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L94)
|
||||
38
src/content/docs/api/interfaces/Plugin.md
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Plugin"
|
||||
---
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **Args** *extends* `any`[] = `any`[]
|
||||
|
||||
## Properties
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (...`args`) => [`PluginResult`](/api/type-aliases/pluginresult/)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**args**: `Args`
|
||||
|
||||
#### Returns
|
||||
|
||||
[`PluginResult`](/api/type-aliases/pluginresult/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-plugin.ts:64](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-plugin.ts#L64)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`PluginType`](/api/enumerations/plugintype/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-plugin.ts:63](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-plugin.ts#L63)
|
||||
102
src/content/docs/api/interfaces/RoleSelectCommand.md
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "RoleSelectCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (`ctx`) => `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **ctx**: `RoleSelectMenuInteraction`\<`CacheType`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:80](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L80)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`RoleSelect`](/api/enumerations/commandtype/#roleselect)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:79](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L79)
|
||||
110
src/content/docs/api/interfaces/SernAutocompleteData.md
Normal file
@@ -0,0 +1,110 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "SernAutocompleteData"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Omit`\<`BaseApplicationCommandOptionsData`, `"autocomplete"`\>
|
||||
|
||||
## Properties
|
||||
|
||||
### autocomplete
|
||||
|
||||
> **autocomplete**: `true`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:172](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L172)
|
||||
|
||||
***
|
||||
|
||||
### command
|
||||
|
||||
> **command**: `AutocompleteCommand`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:177](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L177)
|
||||
|
||||
***
|
||||
|
||||
### description
|
||||
|
||||
> **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Omit.description`
|
||||
|
||||
#### Source
|
||||
|
||||
node\_modules/discord.js/typings/index.d.ts:4711
|
||||
|
||||
***
|
||||
|
||||
### descriptionLocalizations?
|
||||
|
||||
> `optional` **descriptionLocalizations**: `Partial`\<`Record`\<`"id"` \| `"en-US"` \| `"en-GB"` \| `"bg"` \| `"zh-CN"` \| `"zh-TW"` \| `"hr"` \| `"cs"` \| `"da"` \| `"nl"` \| `"fi"` \| `"fr"` \| `"de"` \| `"el"` \| `"hi"` \| `"hu"` \| `"it"` \| `"ja"` \| `"ko"` \| `"lt"` \| `"no"` \| `"pl"` \| `"pt-BR"` \| `"ro"` \| `"ru"` \| `"es-ES"` \| `"es-419"` \| `"sv-SE"` \| `"th"` \| `"tr"` \| `"uk"` \| `"vi"`, `null` \| `string`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Omit.descriptionLocalizations`
|
||||
|
||||
#### Source
|
||||
|
||||
node\_modules/discord.js/typings/index.d.ts:4712
|
||||
|
||||
***
|
||||
|
||||
### name
|
||||
|
||||
> **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Omit.name`
|
||||
|
||||
#### Source
|
||||
|
||||
node\_modules/discord.js/typings/index.d.ts:4709
|
||||
|
||||
***
|
||||
|
||||
### nameLocalizations?
|
||||
|
||||
> `optional` **nameLocalizations**: `Partial`\<`Record`\<`"id"` \| `"en-US"` \| `"en-GB"` \| `"bg"` \| `"zh-CN"` \| `"zh-TW"` \| `"hr"` \| `"cs"` \| `"da"` \| `"nl"` \| `"fi"` \| `"fr"` \| `"de"` \| `"el"` \| `"hi"` \| `"hu"` \| `"it"` \| `"ja"` \| `"ko"` \| `"lt"` \| `"no"` \| `"pl"` \| `"pt-BR"` \| `"ro"` \| `"ru"` \| `"es-ES"` \| `"es-419"` \| `"sv-SE"` \| `"th"` \| `"tr"` \| `"uk"` \| `"vi"`, `null` \| `string`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Omit.nameLocalizations`
|
||||
|
||||
#### Source
|
||||
|
||||
node\_modules/discord.js/typings/index.d.ts:4710
|
||||
|
||||
***
|
||||
|
||||
### required?
|
||||
|
||||
> `optional` **required**: `boolean`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Omit.required`
|
||||
|
||||
#### Source
|
||||
|
||||
node\_modules/discord.js/typings/index.d.ts:4713
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: `String` \| `Integer` \| `Number`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:173](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L173)
|
||||
106
src/content/docs/api/interfaces/SernEventCommand.md
Normal file
@@ -0,0 +1,106 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "SernEventCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** *extends* keyof [`SernEventsMapping`](/api/interfaces/serneventsmapping/) = keyof [`SernEventsMapping`](/api/interfaces/serneventsmapping/)
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `T`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:42](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L42)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`Sern`](/api/enumerations/eventtype/#sern)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:43](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L43)
|
||||
|
||||
## Methods
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**(...`args`): `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**args**: [`SernEventsMapping`](/api/interfaces/serneventsmapping/)\[`T`\]
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:44](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L44)
|
||||
56
src/content/docs/api/interfaces/SernEventsMapping.md
Normal file
@@ -0,0 +1,56 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "SernEventsMapping"
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### error
|
||||
|
||||
> **error**: [`object`]
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/utility.ts:21](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/utility.ts#L21)
|
||||
|
||||
***
|
||||
|
||||
### module.activate
|
||||
|
||||
> **module.activate**: [[`Payload`](/api/type-aliases/payload/)]
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/utility.ts:20](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/utility.ts#L20)
|
||||
|
||||
***
|
||||
|
||||
### module.register
|
||||
|
||||
> **module.register**: [[`Payload`](/api/type-aliases/payload/)]
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/utility.ts:19](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/utility.ts#L19)
|
||||
|
||||
***
|
||||
|
||||
### modulesLoaded
|
||||
|
||||
> **modulesLoaded**: [`undefined?`]
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/utility.ts:23](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/utility.ts#L23)
|
||||
|
||||
***
|
||||
|
||||
### warning
|
||||
|
||||
> **warning**: [[`Payload`](/api/type-aliases/payload/)]
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/utility.ts:22](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/utility.ts#L22)
|
||||
104
src/content/docs/api/interfaces/SernSubCommandData.md
Normal file
@@ -0,0 +1,104 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "SernSubCommandData"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `APIApplicationCommandOptionBase`\<`ApplicationCommandOptionType.Subcommand`\>
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
> **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`APIApplicationCommandOptionBase.description`
|
||||
|
||||
#### Source
|
||||
|
||||
node\_modules/discord-api-types/payloads/v10/\_interactions/\_applicationCommands/\_chatInput/base.d.ts:7
|
||||
|
||||
***
|
||||
|
||||
### description\_localizations?
|
||||
|
||||
> `optional` **description\_localizations**: `null` \| `Partial`\<`Record`\<`"id"` \| `"en-US"` \| `"en-GB"` \| `"bg"` \| `"zh-CN"` \| `"zh-TW"` \| `"hr"` \| `"cs"` \| `"da"` \| `"nl"` \| `"fi"` \| `"fr"` \| `"de"` \| `"el"` \| `"hi"` \| `"hu"` \| `"it"` \| `"ja"` \| `"ko"` \| `"lt"` \| `"no"` \| `"pl"` \| `"pt-BR"` \| `"ro"` \| `"ru"` \| `"es-ES"` \| `"es-419"` \| `"sv-SE"` \| `"th"` \| `"tr"` \| `"uk"` \| `"vi"`, `null` \| `string`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`APIApplicationCommandOptionBase.description_localizations`
|
||||
|
||||
#### Source
|
||||
|
||||
node\_modules/discord-api-types/payloads/v10/\_interactions/\_applicationCommands/\_chatInput/base.d.ts:8
|
||||
|
||||
***
|
||||
|
||||
### name
|
||||
|
||||
> **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`APIApplicationCommandOptionBase.name`
|
||||
|
||||
#### Source
|
||||
|
||||
node\_modules/discord-api-types/payloads/v10/\_interactions/\_applicationCommands/\_chatInput/base.d.ts:5
|
||||
|
||||
***
|
||||
|
||||
### name\_localizations?
|
||||
|
||||
> `optional` **name\_localizations**: `null` \| `Partial`\<`Record`\<`"id"` \| `"en-US"` \| `"en-GB"` \| `"bg"` \| `"zh-CN"` \| `"zh-TW"` \| `"hr"` \| `"cs"` \| `"da"` \| `"nl"` \| `"fi"` \| `"fr"` \| `"de"` \| `"el"` \| `"hi"` \| `"hu"` \| `"it"` \| `"ja"` \| `"ko"` \| `"lt"` \| `"no"` \| `"pl"` \| `"pt-BR"` \| `"ro"` \| `"ru"` \| `"es-ES"` \| `"es-419"` \| `"sv-SE"` \| `"th"` \| `"tr"` \| `"uk"` \| `"vi"`, `null` \| `string`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`APIApplicationCommandOptionBase.name_localizations`
|
||||
|
||||
#### Source
|
||||
|
||||
node\_modules/discord-api-types/payloads/v10/\_interactions/\_applicationCommands/\_chatInput/base.d.ts:6
|
||||
|
||||
***
|
||||
|
||||
### options?
|
||||
|
||||
> `optional` **options**: [`SernOptionsData`](/api/type-aliases/sernoptionsdata/)[]
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:209](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L209)
|
||||
|
||||
***
|
||||
|
||||
### required?
|
||||
|
||||
> `optional` **required**: `boolean`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`APIApplicationCommandOptionBase.required`
|
||||
|
||||
#### Source
|
||||
|
||||
node\_modules/discord-api-types/payloads/v10/\_interactions/\_applicationCommands/\_chatInput/base.d.ts:9
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: `Subcommand`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`APIApplicationCommandOptionBase.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:208](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L208)
|
||||
114
src/content/docs/api/interfaces/SernSubCommandGroupData.md
Normal file
@@ -0,0 +1,114 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "SernSubCommandGroupData"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `BaseApplicationCommandOptionsData`
|
||||
|
||||
## Properties
|
||||
|
||||
### autocomplete?
|
||||
|
||||
> `optional` **autocomplete**: `undefined`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`BaseApplicationCommandOptionsData.autocomplete`
|
||||
|
||||
#### Source
|
||||
|
||||
node\_modules/discord.js/typings/index.d.ts:4714
|
||||
|
||||
***
|
||||
|
||||
### description
|
||||
|
||||
> **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`BaseApplicationCommandOptionsData.description`
|
||||
|
||||
#### Source
|
||||
|
||||
node\_modules/discord.js/typings/index.d.ts:4711
|
||||
|
||||
***
|
||||
|
||||
### descriptionLocalizations?
|
||||
|
||||
> `optional` **descriptionLocalizations**: `Partial`\<`Record`\<`"id"` \| `"en-US"` \| `"en-GB"` \| `"bg"` \| `"zh-CN"` \| `"zh-TW"` \| `"hr"` \| `"cs"` \| `"da"` \| `"nl"` \| `"fi"` \| `"fr"` \| `"de"` \| `"el"` \| `"hi"` \| `"hu"` \| `"it"` \| `"ja"` \| `"ko"` \| `"lt"` \| `"no"` \| `"pl"` \| `"pt-BR"` \| `"ro"` \| `"ru"` \| `"es-ES"` \| `"es-419"` \| `"sv-SE"` \| `"th"` \| `"tr"` \| `"uk"` \| `"vi"`, `null` \| `string`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`BaseApplicationCommandOptionsData.descriptionLocalizations`
|
||||
|
||||
#### Source
|
||||
|
||||
node\_modules/discord.js/typings/index.d.ts:4712
|
||||
|
||||
***
|
||||
|
||||
### name
|
||||
|
||||
> **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`BaseApplicationCommandOptionsData.name`
|
||||
|
||||
#### Source
|
||||
|
||||
node\_modules/discord.js/typings/index.d.ts:4709
|
||||
|
||||
***
|
||||
|
||||
### nameLocalizations?
|
||||
|
||||
> `optional` **nameLocalizations**: `Partial`\<`Record`\<`"id"` \| `"en-US"` \| `"en-GB"` \| `"bg"` \| `"zh-CN"` \| `"zh-TW"` \| `"hr"` \| `"cs"` \| `"da"` \| `"nl"` \| `"fi"` \| `"fr"` \| `"de"` \| `"el"` \| `"hi"` \| `"hu"` \| `"it"` \| `"ja"` \| `"ko"` \| `"lt"` \| `"no"` \| `"pl"` \| `"pt-BR"` \| `"ro"` \| `"ru"` \| `"es-ES"` \| `"es-419"` \| `"sv-SE"` \| `"th"` \| `"tr"` \| `"uk"` \| `"vi"`, `null` \| `string`\>\>
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`BaseApplicationCommandOptionsData.nameLocalizations`
|
||||
|
||||
#### Source
|
||||
|
||||
node\_modules/discord.js/typings/index.d.ts:4710
|
||||
|
||||
***
|
||||
|
||||
### options?
|
||||
|
||||
> `optional` **options**: [`SernSubCommandData`](/api/interfaces/sernsubcommanddata/)[]
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:214](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L214)
|
||||
|
||||
***
|
||||
|
||||
### required?
|
||||
|
||||
> `optional` **required**: `boolean`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`BaseApplicationCommandOptionsData.required`
|
||||
|
||||
#### Source
|
||||
|
||||
node\_modules/discord.js/typings/index.d.ts:4713
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: `SubcommandGroup`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:213](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L213)
|
||||
114
src/content/docs/api/interfaces/SlashCommand.md
Normal file
@@ -0,0 +1,114 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "SlashCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### description
|
||||
|
||||
> **description**: `string`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:118](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L118)
|
||||
|
||||
***
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (`ctx`, `args`) => `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **ctx**: [`Context`](/api/classes/context/)
|
||||
|
||||
• **args**: [`"slash"`, [`SlashOptions`](/api/type-aliases/slashoptions/)]
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:120](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L120)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### options?
|
||||
|
||||
> `optional` **options**: [`SernOptionsData`](/api/type-aliases/sernoptionsdata/)[]
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:119](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L119)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`Slash`](/api/enumerations/commandtype/#slash)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:117](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L117)
|
||||
102
src/content/docs/api/interfaces/StringSelectCommand.md
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "StringSelectCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (`ctx`) => `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **ctx**: `StringSelectMenuInteraction`\<`CacheType`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:70](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L70)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`StringSelect`](/api/enumerations/commandtype/#stringselect)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:69](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L69)
|
||||
114
src/content/docs/api/interfaces/TextCommand.md
Normal file
@@ -0,0 +1,114 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "TextCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### alias?
|
||||
|
||||
> `optional` **alias**: `string`[]
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:112](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L112)
|
||||
|
||||
***
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (`ctx`, `args`) => `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **ctx**: [`Context`](/api/classes/context/)
|
||||
|
||||
• **args**: [`"text"`, `string`[]]
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:113](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L113)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`Text`](/api/enumerations/commandtype/#text)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:111](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L111)
|
||||
102
src/content/docs/api/interfaces/UserSelectCommand.md
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "UserSelectCommand"
|
||||
---
|
||||
|
||||
## Extends
|
||||
|
||||
- `Module`
|
||||
|
||||
## Properties
|
||||
|
||||
### description?
|
||||
|
||||
> `optional` **description**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.description`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:36](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L36)
|
||||
|
||||
***
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (`ctx`) => `unknown`
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **ctx**: `UserSelectMenuInteraction`\<`CacheType`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
`unknown`
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.execute`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:90](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L90)
|
||||
|
||||
***
|
||||
|
||||
### name?
|
||||
|
||||
> `optional` **name**: `string`
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.name`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:33](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L33)
|
||||
|
||||
***
|
||||
|
||||
### onEvent
|
||||
|
||||
> **onEvent**: [`ControlPlugin`](/api/interfaces/controlplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.onEvent`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:34](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L34)
|
||||
|
||||
***
|
||||
|
||||
### plugins
|
||||
|
||||
> **plugins**: [`InitPlugin`](/api/interfaces/initplugin/)\<`any`[]\>[]
|
||||
|
||||
#### Inherited from
|
||||
|
||||
`Module.plugins`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:35](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L35)
|
||||
|
||||
***
|
||||
|
||||
### type
|
||||
|
||||
> **type**: [`UserSelect`](/api/enumerations/commandtype/#userselect)
|
||||
|
||||
#### Overrides
|
||||
|
||||
`Module.type`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core-modules.ts:89](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L89)
|
||||
74
src/content/docs/api/interfaces/Wrapper.md
Normal file
@@ -0,0 +1,74 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Wrapper"
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### commands
|
||||
|
||||
> **commands**: `string`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core.ts:9](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core.ts#L9)
|
||||
|
||||
***
|
||||
|
||||
### containerConfig?
|
||||
|
||||
> `optional` **containerConfig**: `object`
|
||||
|
||||
#### get()
|
||||
|
||||
> **get**: (...`keys`) => `unknown`[]
|
||||
|
||||
##### Parameters
|
||||
|
||||
• ...**keys**: keyof `Dependencies`[]
|
||||
|
||||
##### Returns
|
||||
|
||||
`unknown`[]
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core.ts:20](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core.ts#L20)
|
||||
|
||||
***
|
||||
|
||||
### defaultPrefix?
|
||||
|
||||
> `optional` **defaultPrefix**: `string`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core.ts:10](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core.ts#L10)
|
||||
|
||||
***
|
||||
|
||||
### events?
|
||||
|
||||
> `optional` **events**: `string`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core.ts:11](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core.ts#L11)
|
||||
|
||||
***
|
||||
|
||||
### ~~mode?~~
|
||||
|
||||
> `optional` **mode**: `string`
|
||||
|
||||
Overload to enable mode in case developer does not use a .env file.
|
||||
|
||||
:::caution[Deprecated]
|
||||
- https://github.com/sern-handler/handler/pull/325
|
||||
:::
|
||||
|
||||
#### Source
|
||||
|
||||
[src/types/core.ts:16](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core.ts#L16)
|
||||
28
src/content/docs/api/namespaces/Presence/functions/module.md
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "module"
|
||||
---
|
||||
|
||||
> **module**\<`T`\>(`conf`): [`Config`](/api/namespaces/presence/type-aliases/config/)\<`T`\>
|
||||
|
||||
A small wrapper to provide type inference.
|
||||
Create a Presence module which **MUST** be put in a file called presence.(language-extension)
|
||||
adjacent to the file where **Sern.init** is CALLED.
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** *extends* keyof `Dependencies`[]
|
||||
|
||||
## Parameters
|
||||
|
||||
• **conf**: [`Config`](/api/namespaces/presence/type-aliases/config/)\<`T`\>
|
||||
|
||||
## Returns
|
||||
|
||||
[`Config`](/api/namespaces/presence/type-aliases/config/)\<`T`\>
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/presences.ts:28](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/presences.ts#L28)
|
||||
97
src/content/docs/api/namespaces/Presence/functions/of.md
Normal file
@@ -0,0 +1,97 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "of"
|
||||
---
|
||||
|
||||
> **of**(`root`): `object`
|
||||
|
||||
Create a Presence body which can be either:
|
||||
- once, the presence is activated only once.
|
||||
- repeated, per cycle or event, the presence can be changed.
|
||||
|
||||
## Parameters
|
||||
|
||||
• **root**: `Omit`\<[`Result`](/api/namespaces/presence/interfaces/result/), `"repeat"` \| `"onRepeat"`\>
|
||||
|
||||
## Returns
|
||||
|
||||
`object`
|
||||
|
||||
### once()
|
||||
|
||||
> **once**: () => `Omit`\<[`Result`](/api/namespaces/presence/interfaces/result/), `"repeat"` \| `"onRepeat"`\>
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
Presence
|
||||
.of({
|
||||
activities: [
|
||||
{ name: "Chilling out" }
|
||||
]
|
||||
})
|
||||
.once() // Sets the presence once, with what's provided in '.of()'
|
||||
```
|
||||
|
||||
#### Returns
|
||||
|
||||
`Omit`\<[`Result`](/api/namespaces/presence/interfaces/result/), `"repeat"` \| `"onRepeat"`\>
|
||||
|
||||
### repeated()
|
||||
|
||||
> **repeated**: (`onRepeat`, `repeat`) => `object`
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
Presence
|
||||
.of({
|
||||
activities: [{ name: "deez nuts" }]
|
||||
}) //starts the presence with "deez nuts".
|
||||
.repeated(prev => {
|
||||
return {
|
||||
afk: true,
|
||||
activities: prev.activities?.map(s => ({ ...s, name: s.name+"s" }))
|
||||
};
|
||||
}, 10000)) //every 10 s, the callback sets the presence to the returned one.
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **onRepeat**: `PresenceReduce`
|
||||
|
||||
• **repeat**: `number` \| [[`Emitter`](/api/interfaces/emitter/), `string`]
|
||||
|
||||
#### Returns
|
||||
|
||||
`object`
|
||||
|
||||
##### activities?
|
||||
|
||||
> `optional` **activities**: `ActivitiesOptions`[]
|
||||
|
||||
##### afk?
|
||||
|
||||
> `optional` **afk**: `boolean`
|
||||
|
||||
##### onRepeat
|
||||
|
||||
> **onRepeat**: `PresenceReduce`
|
||||
|
||||
##### repeat
|
||||
|
||||
> **repeat**: `number` \| [[`Emitter`](/api/interfaces/emitter/), `string`]
|
||||
|
||||
##### shardId?
|
||||
|
||||
> `optional` **shardId**: `number`[]
|
||||
|
||||
##### status?
|
||||
|
||||
> `optional` **status**: `Status`
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/presences.ts:37](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/presences.ts#L37)
|
||||
@@ -0,0 +1,74 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Result"
|
||||
---
|
||||
|
||||
## Properties
|
||||
|
||||
### activities?
|
||||
|
||||
> `optional` **activities**: `ActivitiesOptions`[]
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/presences.ts:11](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/presences.ts#L11)
|
||||
|
||||
***
|
||||
|
||||
### afk?
|
||||
|
||||
> `optional` **afk**: `boolean`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/presences.ts:10](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/presences.ts#L10)
|
||||
|
||||
***
|
||||
|
||||
### onRepeat()?
|
||||
|
||||
> `optional` **onRepeat**: (`previous`) => [`Result`](/api/namespaces/presence/interfaces/result/)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• **previous**: [`Result`](/api/namespaces/presence/interfaces/result/)
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Result`](/api/namespaces/presence/interfaces/result/)
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/presences.ts:14](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/presences.ts#L14)
|
||||
|
||||
***
|
||||
|
||||
### repeat?
|
||||
|
||||
> `optional` **repeat**: `number` \| [[`Emitter`](/api/interfaces/emitter/), `string`]
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/presences.ts:13](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/presences.ts#L13)
|
||||
|
||||
***
|
||||
|
||||
### shardId?
|
||||
|
||||
> `optional` **shardId**: `number`[]
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/presences.ts:12](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/presences.ts#L12)
|
||||
|
||||
***
|
||||
|
||||
### status?
|
||||
|
||||
> `optional` **status**: `Status`
|
||||
|
||||
#### Source
|
||||
|
||||
[src/core/presences.ts:9](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/presences.ts#L9)
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Config"
|
||||
---
|
||||
|
||||
> **Config**\<`T`\>: `object`
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** *extends* keyof `Dependencies`[]
|
||||
|
||||
## Type declaration
|
||||
|
||||
### execute()
|
||||
|
||||
> **execute**: (...`v`) => [`Result`](/api/namespaces/presence/interfaces/result/)
|
||||
|
||||
#### Parameters
|
||||
|
||||
• ...**v**: `IntoDependencies`\<`T`\>
|
||||
|
||||
#### Returns
|
||||
|
||||
[`Result`](/api/namespaces/presence/interfaces/result/)
|
||||
|
||||
### inject?
|
||||
|
||||
> `optional` **inject**: [`...T`]
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/presences.ts:17](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/presences.ts#L17)
|
||||
54
src/content/docs/api/namespaces/Sern/functions/init.md
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "init"
|
||||
---
|
||||
|
||||
`Experimental` `Alpha` `Beta`
|
||||
|
||||
> **init**(`maybeWrapper`): `void`
|
||||
|
||||
:::caution[Deprecated]
|
||||
This is a test with typedoc
|
||||
:::
|
||||
|
||||
:::caution[Experimental]
|
||||
This API should not be used in production and may be trimmed from a public release.
|
||||
:::
|
||||
|
||||
:::caution[Alpha]
|
||||
This API should not be used in production and may be trimmed from a public release.
|
||||
:::
|
||||
|
||||
:::caution[Beta]
|
||||
This API should not be used in production and may be trimmed from a public release.
|
||||
:::
|
||||
|
||||
## Parameters
|
||||
|
||||
• **maybeWrapper**: [`Wrapper`](/api/interfaces/wrapper/) \| `"file"`
|
||||
|
||||
## Returns
|
||||
|
||||
`void`
|
||||
|
||||
## Since
|
||||
|
||||
1.0.0
|
||||
|
||||
## Example
|
||||
|
||||
```ts title="src/index.ts"
|
||||
Sern.init({
|
||||
commands: 'dist/commands',
|
||||
events: 'dist/events',
|
||||
})
|
||||
```
|
||||
This is a test with typedoc
|
||||
This is a test with typedoc
|
||||
This is a test with typedoc
|
||||
|
||||
## Source
|
||||
|
||||
[src/sern.ts:30](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/sern.ts#L30)
|
||||
12
src/content/docs/api/type-aliases/AnyCommandPlugin.md
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "AnyCommandPlugin"
|
||||
---
|
||||
|
||||
> **AnyCommandPlugin**: [`ControlPlugin`](/api/interfaces/controlplugin/) \| [`InitPlugin`](/api/interfaces/initplugin/)\<[`InitArgs`\<`Processed`\<[`CommandModule`](/api/type-aliases/commandmodule/)\>\>]\>
|
||||
|
||||
## Source
|
||||
|
||||
[src/types/core-plugin.ts:76](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-plugin.ts#L76)
|
||||
12
src/content/docs/api/type-aliases/AnyEventPlugin.md
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "AnyEventPlugin"
|
||||
---
|
||||
|
||||
> **AnyEventPlugin**: [`ControlPlugin`](/api/interfaces/controlplugin/) \| [`InitPlugin`](/api/interfaces/initplugin/)\<[`InitArgs`\<`Processed`\<[`EventModule`](/api/type-aliases/eventmodule/)\>\>]\>
|
||||
|
||||
## Source
|
||||
|
||||
[src/types/core-plugin.ts:77](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-plugin.ts#L77)
|
||||
22
src/content/docs/api/type-aliases/Args.md
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Args"
|
||||
---
|
||||
|
||||
> **Args**: `ParseType`\<`object`\>
|
||||
|
||||
## Type declaration
|
||||
|
||||
### slash
|
||||
|
||||
> **slash**: [`SlashOptions`](/api/type-aliases/slashoptions/)
|
||||
|
||||
### text
|
||||
|
||||
> **text**: `string`[]
|
||||
|
||||
## Source
|
||||
|
||||
[src/types/utility.ts:16](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/utility.ts#L16)
|
||||
12
src/content/docs/api/type-aliases/CommandModule.md
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "CommandModule"
|
||||
---
|
||||
|
||||
> **CommandModule**: [`TextCommand`](/api/interfaces/textcommand/) \| [`SlashCommand`](/api/interfaces/slashcommand/) \| [`BothCommand`](/api/interfaces/bothcommand/) \| [`ContextMenuUser`](/api/interfaces/contextmenuuser/) \| [`ContextMenuMsg`](/api/interfaces/contextmenumsg/) \| [`ButtonCommand`](/api/interfaces/buttoncommand/) \| [`StringSelectCommand`](/api/interfaces/stringselectcommand/) \| [`MentionableSelectCommand`](/api/interfaces/mentionableselectcommand/) \| [`UserSelectCommand`](/api/interfaces/userselectcommand/) \| [`ChannelSelectCommand`](/api/interfaces/channelselectcommand/) \| [`RoleSelectCommand`](/api/interfaces/roleselectcommand/) \| [`ModalSubmitCommand`](/api/interfaces/modalsubmitcommand/)
|
||||
|
||||
## Source
|
||||
|
||||
[src/types/core-modules.ts:132](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L132)
|
||||
12
src/content/docs/api/type-aliases/EventModule.md
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "EventModule"
|
||||
---
|
||||
|
||||
> **EventModule**: [`DiscordEventCommand`](/api/interfaces/discordeventcommand/) \| [`SernEventCommand`](/api/interfaces/serneventcommand/) \| [`ExternalEventCommand`](/api/interfaces/externaleventcommand/)
|
||||
|
||||
## Source
|
||||
|
||||
[src/types/core-modules.ts:131](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L131)
|
||||
19
src/content/docs/api/type-aliases/Initializable.md
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Initializable"
|
||||
---
|
||||
|
||||
> **Initializable**\<`T`\>: `T`
|
||||
|
||||
Type to annotate that something is initializable.
|
||||
If T has an init method, this will be called.
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** *extends* [`Init`](/api/interfaces/init/)
|
||||
|
||||
## Source
|
||||
|
||||
[src/types/ioc.ts:17](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/ioc.ts#L17)
|
||||
22
src/content/docs/api/type-aliases/LogPayload.md
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "LogPayload"
|
||||
---
|
||||
|
||||
> **LogPayload**\<`T`\>: `object`
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T** = `unknown`
|
||||
|
||||
## Type declaration
|
||||
|
||||
### message
|
||||
|
||||
> **message**: `T`
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/contracts/logging.ts:11](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/contracts/logging.ts#L11)
|
||||
12
src/content/docs/api/type-aliases/Payload.md
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Payload"
|
||||
---
|
||||
|
||||
> **Payload**: `object` \| `object` \| `object`
|
||||
|
||||
## Source
|
||||
|
||||
[src/types/utility.ts:26](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/utility.ts#L26)
|
||||
12
src/content/docs/api/type-aliases/PluginResult.md
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "PluginResult"
|
||||
---
|
||||
|
||||
> **PluginResult**: `Awaitable`\<`VoidResult`\>
|
||||
|
||||
## Source
|
||||
|
||||
[src/types/core-plugin.ts:51](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-plugin.ts#L51)
|
||||
14
src/content/docs/api/type-aliases/SernOptionsData.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "SernOptionsData"
|
||||
---
|
||||
|
||||
> **SernOptionsData**: [`SernSubCommandData`](/api/interfaces/sernsubcommanddata/) \| [`SernSubCommandGroupData`](/api/interfaces/sernsubcommandgroupdata/) \| `APIApplicationCommandBasicOption` \| [`SernAutocompleteData`](/api/interfaces/sernautocompletedata/)
|
||||
|
||||
Type that replaces autocomplete with [SernAutocompleteData](../../../../../../api/interfaces/sernautocompletedata)
|
||||
|
||||
## Source
|
||||
|
||||
[src/types/core-modules.ts:200](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/core-modules.ts#L200)
|
||||
23
src/content/docs/api/type-aliases/Singleton.md
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Singleton"
|
||||
---
|
||||
|
||||
> **Singleton**\<`T`\>: () => `T`
|
||||
|
||||
Type to annotate that something is a singleton.
|
||||
T is created once and lazily.
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T**
|
||||
|
||||
## Returns
|
||||
|
||||
`T`
|
||||
|
||||
## Source
|
||||
|
||||
[src/types/ioc.ts:7](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/ioc.ts#L7)
|
||||
12
src/content/docs/api/type-aliases/SlashOptions.md
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "SlashOptions"
|
||||
---
|
||||
|
||||
> **SlashOptions**: `Omit`\<`CommandInteractionOptionResolver`, `"getMessage"` \| `"getFocused"`\>
|
||||
|
||||
## Source
|
||||
|
||||
[src/types/utility.ts:14](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/utility.ts#L14)
|
||||
27
src/content/docs/api/type-aliases/Transient.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "Transient"
|
||||
---
|
||||
|
||||
> **Transient**\<`T`\>: () => () => `T`
|
||||
|
||||
Type to annotate that something is transient.
|
||||
Every time this is called, a new object is created
|
||||
|
||||
## Type parameters
|
||||
|
||||
• **T**
|
||||
|
||||
## Returns
|
||||
|
||||
`Function`
|
||||
|
||||
### Returns
|
||||
|
||||
`T`
|
||||
|
||||
## Source
|
||||
|
||||
[src/types/ioc.ts:12](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/types/ioc.ts#L12)
|
||||
35
src/content/docs/api/variables/controller.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
editUrl: false
|
||||
next: false
|
||||
prev: false
|
||||
title: "controller"
|
||||
---
|
||||
|
||||
> `const` **controller**: `object`
|
||||
|
||||
## Since
|
||||
|
||||
1.0.0
|
||||
The object passed into every plugin to control a command's behavior
|
||||
|
||||
## Type declaration
|
||||
|
||||
### next()
|
||||
|
||||
> **next**: () => `OkImpl`\<`void`\> = `ok`
|
||||
|
||||
#### Returns
|
||||
|
||||
`OkImpl`\<`void`\>
|
||||
|
||||
### stop()
|
||||
|
||||
> **stop**: () => `ErrImpl`\<`void`\> = `err`
|
||||
|
||||
#### Returns
|
||||
|
||||
`ErrImpl`\<`void`\>
|
||||
|
||||
## Source
|
||||
|
||||
[src/core/create-plugins.ts:69](https://github.com/sern-handler/handler/blob/91b3768e376cfe22ec37d8ab44f4e4a4dfe8a1e8/src/core/create-plugins.ts#L69)
|
||||
86
src/content/docs/blog/2022-09-28.md
Normal file
@@ -0,0 +1,86 @@
|
||||
---
|
||||
slug: blog/1.2.0
|
||||
title: Release 1.2.0
|
||||
authors: [jacoobes]
|
||||
tags: [release]
|
||||
date: 2022-09-28
|
||||
---
|
||||
|
||||
## Class-based modules
|
||||
|
||||
Today we're announcing the ability to create class based modules!
|
||||
To get started, install
|
||||
|
||||
```
|
||||
npm install @sern/handler@latest
|
||||
```
|
||||
|
||||
Quick List of changes!
|
||||
|
||||
- [Class-based modules](#class-based-modules-1)
|
||||
- [Deprecation Warnings](#deprecation-warnings)
|
||||
- [Dependencies Update](#dependencies-update)
|
||||
|
||||
### Class based modules
|
||||
|
||||
Incorporate class based modules into your project instead of the traditional `commandModule` or `eventModule`
|
||||
Extend the new [CommandExecutable](docs/api/classes/CommandExecutable) or [EventExecutable](docs/api/classes/EventExecutable)
|
||||
|
||||
```ts title="commands/meaning-of-life.ts" {15}
|
||||
import {
|
||||
CommandType,
|
||||
CommandExecutable,
|
||||
type Args,
|
||||
type Context,
|
||||
} from "@sern/handler";
|
||||
import { publish } from "../plugins/publish.js";
|
||||
import { serendipityOnly } from "../plugins/serendipityOnly.js";
|
||||
|
||||
export default class extends CommandExecutable<CommandType.Both> {
|
||||
type = CommandType.Both as const;
|
||||
description = "What is the meaning of life?";
|
||||
override onEvent = [serendipityOnly()];
|
||||
override plugins = [publish()];
|
||||
execute = async (ctx: Context, args: Args) => {
|
||||
await ctx.reply("42");
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
:::caution
|
||||
|
||||
execute must not be a method of the class. It should be as above, a property on the class!
|
||||
|
||||
:::
|
||||
|
||||
```ts title="events/guildMemberAdd.ts" {6}
|
||||
import { CommandType, EventExecutable, type EventType } from "@sern/handler";
|
||||
import type { GuildMember } from "discord.js";
|
||||
|
||||
export default class extends EventExecutable<EventType.Discord> {
|
||||
type = EventType.Discord as const;
|
||||
execute = (member: GuildMember) => {
|
||||
console.log(member);
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
Now, you might ask **why** this feature was added. <br /> Simply put, to give flexibility to the developers.
|
||||
I believe that you should build your own structures however you might like and customize to your liking.
|
||||
In addition, **decorators now unofficially work with modules!**
|
||||
Feel free to use TypeScript experimental decorators to augment and customize your classes.
|
||||
|
||||
### Deprecation Warnings
|
||||
|
||||
The next update will bring sern v2 with some important features. Here are some things to watch out for.
|
||||
|
||||
- [Wrapper#client](docs/api/interfaces/Wrapper) will be deprecated
|
||||
- [Wrapper#sernEmitter](docs/api/interfaces/Wrapper) will be deprecated
|
||||
- a SernEmitter will be automatically created once Sern#init is called
|
||||
- The option to pass in a function or array for [Wrapper#events](docs/api/interfaces/Wrapper) will be deprecated. Only strings are accepted.
|
||||
- [Sern#addExternal](docs/api/classes/SernEmitter) will be deprecated in favor of a better way.
|
||||
|
||||
### Dependencies Update
|
||||
|
||||
- TypeScript has been updated to 4.8.3
|
||||
- Discord.js has been upgraded to 14.5
|
||||
68
src/content/docs/blog/2022-09-30.md
Normal file
@@ -0,0 +1,68 @@
|
||||
---
|
||||
slug: blog/getting-started
|
||||
title: How to get started with sern!
|
||||
authors: [ethan]
|
||||
tags: [guides]
|
||||
date: 2022-09-30
|
||||
---
|
||||
|
||||
## Hello everyone!
|
||||
|
||||
I'm Sr Izan, your fellow user and contributor.
|
||||
|
||||
Today I'm going to show you how to get started with sern and all its cool features.
|
||||
|
||||
### Step 1: Install the CLI.
|
||||
|
||||
Install the CLI:
|
||||
|
||||
```
|
||||
npm i -g @sern/cli
|
||||
```
|
||||
|
||||
and then run
|
||||
|
||||
```
|
||||
sern init
|
||||
```
|
||||
|
||||
:::tip
|
||||
You can also run `sern init -y` if you want to use the default options.
|
||||
:::
|
||||
|
||||
The CLI is written in Typescript and open-sourced on [Github](https://github.com/sern-handler/cli). (thanks [evo](https://github.com/EvolutionX-10)!)
|
||||
|
||||
### Step 2: Have some way to store secrets.
|
||||
|
||||
Normally you'd need a way to store secrets, and the best way to do that is by installing another package: `dotenv`
|
||||
|
||||
just `npm i dotenv` in the project folder and add `require('dotenv').config()` to your import section. Then, when you login, `process.env.TOKEN` (or however you have it named on your `.env` file) should do the trick.
|
||||
|
||||
:::caution
|
||||
If you're using ESM, configure dotenv with `import 'dotenv/config'` instead of `require('dotenv').config()`.
|
||||
:::
|
||||
|
||||
### And... that's it?
|
||||
|
||||
Yes, that's it. Here's a little FAQ to get you started. You can also join the [Discord](https://sern.dev/discord) for any problems.
|
||||
|
||||
### Extra: Video tutorial!
|
||||
|
||||
<video width="400" controls>
|
||||
<source src="https://srizan.s-ul.eu/wtJBVsZU" type="video/mp4" />
|
||||
</video>
|
||||
|
||||
## FAQ
|
||||
|
||||
**Q**: How do I publish a slash command?
|
||||
**A**: Install the publish extension. Little video:
|
||||
|
||||
<video width="400" controls>
|
||||
<source src="https://srizan.s-ul.eu/uHzPhfcS" type="video/mp4" />
|
||||
</video>
|
||||
|
||||
**Q**: Any snippet VSCode extension?
|
||||
**A**: Yeah, just search `sern Snippets` made by a verified publisher called Sr Izan (haha yeah me funny!)
|
||||
|
||||
**Q**: HEEEELLLPPPP!!!!
|
||||
**A**: Hey, don't panic! We're here to help so, join the [Discord](https://sern.dev/discord). We're trying to get to 100 members!
|
||||