Files
website/v4/reference/modules/index.html
2025-08-31 19:33:31 +00:00

87 lines
142 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en" dir="ltr" data-has-toc data-has-sidebar data-theme="dark" class="astro-bguv2lll"> <head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Modules | sern</title><link rel="canonical" href="https://sern.dev/v4/reference/modules/"/><link rel="alternate" hreflang="en" href="https://sern.dev/v4/reference/modules/"/><link rel="alternate" hreflang="es" href="https://sern.dev/es/v4/reference/modules/"/><link rel="alternate" hreflang="tr" href="https://sern.dev/tr/v4/reference/modules/"/><link rel="sitemap" href="/sitemap-index.xml"/><script src="https://analytics.sern.dev/ua.js" data-website-id="db608ae9-3ae2-49ed-9f7c-3ba0d5abe1b6" defer></script><link rel="shortcut icon" href="/favicon.svg" type="image/svg+xml"/><meta name="generator" content="Astro v4.9.1"/><meta name="generator" content="Starlight v0.23.1"/><meta property="og:title" content="Modules"/><meta property="og:type" content="article"/><meta property="og:url" content="https://sern.dev/v4/reference/modules/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Learn how to create modules for your sern bot"/><meta property="og:site_name" content="sern"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="Modules"/><meta name="twitter:description" content="Learn how to create modules for your sern bot"/><meta name="description" content="Learn how to create modules for your sern bot"/> <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="https://sern.dev/open-graph/v4/reference/modules.webp"> <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="https://sern.dev/open-graph/v4/reference/modules.webp"> <meta name="twitter:url" content="https://sern.dev"> <meta property="twitter:site" content="@sern-handler"><script>
window.StarlightThemeProvider = (() => {
const storedTheme =
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
const theme =
storedTheme ||
(window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark');
document.documentElement.dataset.theme = theme === 'light' ? 'light' : 'dark';
return {
updatePickers(theme = storedTheme || 'auto') {
document.querySelectorAll('starlight-theme-select').forEach((picker) => {
const select = picker.querySelector('select');
if (select) select.value = theme;
/** @type {HTMLTemplateElement | null} */
const tmpl = document.querySelector(`#theme-icons`);
const newIcon = tmpl && tmpl.content.querySelector('.' + theme);
if (newIcon) {
const oldIcon = picker.querySelector('svg.label-icon');
if (oldIcon) {
oldIcon.replaceChildren(...newIcon.cloneNode(true).childNodes);
}
}
});
},
};
})();
</script><template id="theme-icons"><svg aria-hidden="true" class="light astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M5 12a1 1 0 0 0-1-1H3a1 1 0 0 0 0 2h1a1 1 0 0 0 1-1Zm.64 5-.71.71a1 1 0 0 0 0 1.41 1 1 0 0 0 1.41 0l.71-.71A1 1 0 0 0 5.64 17ZM12 5a1 1 0 0 0 1-1V3a1 1 0 0 0-2 0v1a1 1 0 0 0 1 1Zm5.66 2.34a1 1 0 0 0 .7-.29l.71-.71a1 1 0 1 0-1.41-1.41l-.66.71a1 1 0 0 0 0 1.41 1 1 0 0 0 .66.29Zm-12-.29a1 1 0 0 0 1.41 0 1 1 0 0 0 0-1.41l-.71-.71a1.004 1.004 0 1 0-1.43 1.41l.73.71ZM21 11h-1a1 1 0 0 0 0 2h1a1 1 0 0 0 0-2Zm-2.64 6A1 1 0 0 0 17 18.36l.71.71a1 1 0 0 0 1.41 0 1 1 0 0 0 0-1.41l-.76-.66ZM12 6.5a5.5 5.5 0 1 0 5.5 5.5A5.51 5.51 0 0 0 12 6.5Zm0 9a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Zm0 3.5a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1a1 1 0 0 0-1-1Z"/></svg> <svg aria-hidden="true" class="dark astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21.64 13a1 1 0 0 0-1.05-.14 8.049 8.049 0 0 1-3.37.73 8.15 8.15 0 0 1-8.14-8.1 8.59 8.59 0 0 1 .25-2A1 1 0 0 0 8 2.36a10.14 10.14 0 1 0 14 11.69 1 1 0 0 0-.36-1.05Zm-9.5 6.69A8.14 8.14 0 0 1 7.08 5.22v.27a10.15 10.15 0 0 0 10.14 10.14 9.784 9.784 0 0 0 2.1-.22 8.11 8.11 0 0 1-7.18 4.32v-.04Z"/></svg> <svg aria-hidden="true" class="auto astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg> </template><link rel="stylesheet" href="/_astro/index.DiwH0U4k.css">
<link rel="stylesheet" href="/_astro/Blog.D3jLG7eg.css">
<style>.author:where(.astro-kbhsbk7c){align-items:center;display:flex;gap:.5rem;line-height:var(--sl-line-height-headings);text-decoration:none}.text:where(.astro-kbhsbk7c){display:flex;flex-direction:column}.name:where(.astro-kbhsbk7c){font-size:var(--sl-text-base);font-weight:600}.author:where(.astro-kbhsbk7c)[href] .name:where(.astro-kbhsbk7c){color:var(--sl-color-text-accent)}.title:where(.astro-kbhsbk7c){font-size:var(--sl-text-xs);color:var(--sl-color-text)}.author:where(.astro-kbhsbk7c)[href]:hover .name:where(.astro-kbhsbk7c){color:var(--sl-color-text)}img:where(.astro-kbhsbk7c){border:1px solid var(--sl-color-gray-2);border-radius:9999px;height:2.5rem;width:2.5rem}.metadata:where(.astro-2oxtfctb){display:flex;flex-direction:column;gap:.75rem}time:where(.astro-2oxtfctb){font-size:var(--sl-text-sm)}.authors:where(.astro-2oxtfctb){display:flex;flex-wrap:wrap;gap:.75rem 1rem}.badges:where(.astro-2oxtfctb){margin-top:.25rem}.draft:where(.astro-2oxtfctb){background-color:var(--sl-color-orange-low);border:1px solid var(--sl-color-orange);border-radius:.3rem;color:var(--sl-color-orange-high);font-size:var(--sl-text-body-sm);line-height:var(--sl-line-height-headings);margin-inline:.2rem;padding:.25rem .5rem .35rem}ul:where(.astro-sg3lsd66){display:inline;padding:0}li:where(.astro-sg3lsd66){display:inline-block;margin-bottom:.25rem;padding:0}a:where(.astro-sg3lsd66){border:1px solid var(--sl-color-gray-5);border-radius:.3rem;font-size:var(--sl-text-sm);margin-inline:.2rem;padding:.25rem .5rem .35rem;text-decoration:none}a:where(.astro-sg3lsd66):hover{border-color:var(--sl-color-gray-2)}
.card-grid:where(.astro-zntqmydn){display:grid;gap:1rem}.card-grid:where(.astro-zntqmydn)>*{margin-top:0!important}@media (min-width: 50rem){.card-grid:where(.astro-zntqmydn){grid-template-columns:1fr 1fr;gap:1.5rem}.stagger:where(.astro-zntqmydn){--stagger-height: 5rem;padding-bottom:var(--stagger-height)}.stagger:where(.astro-zntqmydn)>*:nth-child(2n){transform:translateY(var(--stagger-height))}}
.card:where(.astro-v5tidmuc){--sl-card-border: var(--sl-color-purple);--sl-card-bg: var(--sl-color-purple-low);border:1px solid var(--sl-color-gray-5);background-color:var(--sl-color-black);padding:clamp(1rem,calc(.125rem + 3vw),2.5rem);flex-direction:column;gap:clamp(.5rem,calc(.125rem + 1vw),1rem)}.card:where(.astro-v5tidmuc):nth-child(4n+1){--sl-card-border: var(--sl-color-orange);--sl-card-bg: var(--sl-color-orange-low)}.card:where(.astro-v5tidmuc):nth-child(4n+3){--sl-card-border: var(--sl-color-green);--sl-card-bg: var(--sl-color-green-low)}.card:where(.astro-v5tidmuc):nth-child(4n+4){--sl-card-border: var(--sl-color-red);--sl-card-bg: var(--sl-color-red-low)}.card:where(.astro-v5tidmuc):nth-child(4n+5){--sl-card-border: var(--sl-color-blue);--sl-card-bg: var(--sl-color-blue-low)}.title:where(.astro-v5tidmuc){font-weight:600;font-size:var(--sl-text-h4);color:var(--sl-color-white);line-height:var(--sl-line-height-headings);gap:1rem;align-items:center}.card:where(.astro-v5tidmuc) .icon:where(.astro-v5tidmuc){border:1px solid var(--sl-card-border);background-color:var(--sl-card-bg);padding:.2em;border-radius:.25rem}.card:where(.astro-v5tidmuc) .body:where(.astro-v5tidmuc){margin:0;font-size:clamp(var(--sl-text-sm),calc(.5rem + 1vw),var(--sl-text-body))}
svg:where(.astro-c6vsoqas){color:var(--sl-icon-color);font-size:var(--sl-icon-size, 1em);width:1em;height:1em}
starlight-tabs:where(.astro-esqgolmp){display:block}.tablist-wrapper:where(.astro-esqgolmp){overflow-x:auto}:where(.astro-esqgolmp)[role=tablist]{display:flex;list-style:none;border-bottom:2px solid var(--sl-color-gray-5);padding:0}.tab:where(.astro-esqgolmp){margin-bottom:-2px}.tab:where(.astro-esqgolmp)>:where(.astro-esqgolmp)[role=tab]{display:flex;align-items:center;gap:.5rem;padding:0 1.25rem;text-decoration:none;border-bottom:2px solid var(--sl-color-gray-5);color:var(--sl-color-gray-3);outline-offset:var(--sl-outline-offset-inside);overflow-wrap:initial}.tab:where(.astro-esqgolmp) :where(.astro-esqgolmp)[role=tab][aria-selected=true]{color:var(--sl-color-white);border-color:var(--sl-color-text-accent);font-weight:600}.tablist-wrapper:where(.astro-esqgolmp)~[role=tabpanel]{margin-top:1rem}
.sl-link-card:where(.astro-mf7fz2mj){display:grid;grid-template-columns:1fr auto;gap:.5rem;border:1px solid var(--sl-color-gray-5);border-radius:.5rem;padding:1rem;box-shadow:var(--sl-shadow-sm);position:relative}a:where(.astro-mf7fz2mj){text-decoration:none;line-height:var(--sl-line-height-headings)}a:where(.astro-mf7fz2mj):before{content:"";position:absolute;inset:0}.stack:where(.astro-mf7fz2mj){flex-direction:column;gap:.5rem}.title:where(.astro-mf7fz2mj){color:var(--sl-color-white);font-weight:600;font-size:var(--sl-text-lg)}.description:where(.astro-mf7fz2mj){color:var(--sl-color-gray-3);line-height:1.5}.icon:where(.astro-mf7fz2mj){color:var(--sl-color-gray-3)}.sl-link-card:where(.astro-mf7fz2mj):hover{background:var(--sl-color-gray-7, var(--sl-color-gray-6));border-color:var(--sl-color-gray-2)}.sl-link-card:where(.astro-mf7fz2mj):hover .icon:where(.astro-mf7fz2mj){color:var(--sl-color-white)}
.sl-steps{--bullet-size: calc(var(--sl-line-height) * 1rem);--bullet-margin: .375rem;list-style:none;padding-inline-start:0}.sl-steps>li{position:relative;padding-inline-start:calc(var(--bullet-size) + 1rem);padding-bottom:1px;min-height:calc(var(--bullet-size) + var(--bullet-margin))}.sl-steps>li+li{margin-top:0}.sl-steps>li:before{content:counter(list-item);position:absolute;top:0;inset-inline-start:0;width:var(--bullet-size);height:var(--bullet-size);line-height:var(--bullet-size);font-size:var(--sl-text-xs);font-weight:600;text-align:center;color:var(--sl-color-white);background-color:var(--sl-color-gray-6);border-radius:99rem;box-shadow:inset 0 0 0 1px var(--sl-color-gray-5)}.sl-steps>li:not(:last-of-type):after{--guide-width: 1px;content:"";position:absolute;top:calc(var(--bullet-size) + var(--bullet-margin));bottom:var(--bullet-margin);inset-inline-start:calc((var(--bullet-size) - var(--guide-width)) / 2);width:var(--guide-width);background-color:var(--sl-color-hairline-light)}.sl-steps>li>:first-child{--lh: calc(1em * var(--sl-line-height));--shift-y: calc(.5 * (var(--bullet-size) - var(--lh)));transform:translateY(var(--shift-y));margin-bottom:var(--shift-y)}.sl-steps>li>:first-child:where(h1,h2,h3,h4,h5,h6){--lh: calc(1em * var(--sl-line-height-headings))}@supports (--prop: 1lh){.sl-steps>li>:first-child{--lh: 1lh}}
starlight-file-tree:where(.astro-p67cqifm){--x-space: 1.5rem;--y-space: .125rem;--y-pad: 0;display:block;border:1px solid var(--sl-color-gray-5);padding:1rem;background-color:var(--sl-color-gray-6);font-size:var(--sl-text-xs);font-family:var(--__sl-font-mono);overflow-x:auto}starlight-file-tree:where(.astro-p67cqifm) .directory>details{border:0;padding:0;padding-inline-start:var(--x-space);background:transparent}starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary{margin-inline-start:calc(-1 * var(--x-space));border:0;padding:var(--y-pad) .625rem;font-weight:400;color:var(--sl-color-white);max-width:100%}starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary::marker,starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary::-webkit-details-marker{color:var(--sl-color-gray-3)}starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary:hover,starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary:hover .tree-icon{cursor:pointer;color:var(--sl-color-text-accent);fill:var(--sl-color-text-accent)}starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary:hover~ul{border-color:var(--sl-color-gray-4)}starlight-file-tree:where(.astro-p67cqifm) .directory>details>summary:hover .highlight .tree-icon{fill:var(--sl-color-text-invert)}starlight-file-tree:where(.astro-p67cqifm) ul{margin-inline-start:.5rem;border-inline-start:1px solid var(--sl-color-gray-5);padding:0;padding-inline-start:.125rem;list-style:none}starlight-file-tree:where(.astro-p67cqifm)>ul{margin:0;border:0;padding:0}starlight-file-tree:where(.astro-p67cqifm) li{margin:var(--y-space) 0;padding:var(--y-pad) 0}starlight-file-tree:where(.astro-p67cqifm) .file{margin-inline-start:calc(var(--x-space) - .125rem);color:var(--sl-color-white)}starlight-file-tree:where(.astro-p67cqifm) .tree-entry{display:inline-flex;align-items:flex-start;flex-wrap:wrap;max-width:calc(100% - 1rem)}@media (min-width: 30em){starlight-file-tree:where(.astro-p67cqifm) .tree-entry{flex-wrap:nowrap}}starlight-file-tree:where(.astro-p67cqifm) .tree-entry>:first-child{flex-shrink:0}starlight-file-tree:where(.astro-p67cqifm) .empty{color:var(--sl-color-gray-3);padding-inline-start:.375rem}starlight-file-tree:where(.astro-p67cqifm) .comment{color:var(--sl-color-gray-3);padding-inline-start:1.625rem;max-width:24rem;min-width:12rem}starlight-file-tree:where(.astro-p67cqifm) .highlight{display:inline-block;border-radius:.25rem;padding-inline-end:.5rem;color:var(--sl-color-text-invert);background-color:var(--sl-color-text-accent)}starlight-file-tree:where(.astro-p67cqifm) svg{display:inline;fill:var(--sl-color-gray-3);vertical-align:middle;margin-inline:.25rem .375rem;width:.875rem;height:.875rem}starlight-file-tree:where(.astro-p67cqifm) .highlight svg.tree-icon{fill:var(--sl-color-text-invert)}
</style><script type="module" src="/_astro/hoisted.Cn8DqOkI.js"></script>
<script type="module" src="/_astro/page.LS5KDvwX.js"></script><script src="/_astro/Tabs.astro_astro_type_script_index_0_lang.CCIyraCc.js" type="module"></script></head> <body class="astro-bguv2lll"> <a href="#_top" class="astro-7q3lir66">Skip to content</a> <div class="page sl-flex astro-vrdttmbt"> <header class="header astro-vrdttmbt"><div class="header sl-flex astro-kmkmnagf"> <div class="title-wrapper sl-flex astro-kmkmnagf"> <a href="/" class="site-title sl-flex astro-m46x6ez3"> <img class="astro-m46x6ez3" alt="" src="/_astro/navbar-icon.Bha2ncEb.png" width="1080" height="1080"> <span class="sr-only astro-m46x6ez3"> sern </span> </a> <starlight-select class="md:hidden"><label class="align-center relative ml-4 flex items-center gap-4 text-[var(--sl-color-white)]"><select class="cursor-pointer appearance-none bg-transparent py-2 pe-6 font-semibold text-[var(--sl-color-white)]"><option value="" disabled selected>Menu</option><option value="/v4/reference/getting-started">Docs</option><option value="/plugins">Plugins</option><option value="/sponsors">Sponsors</option><option value="/blog">Blog</option></select><svg aria-hidden="true" class="pointer-events-none absolute end-0 top-1/2 h-6 w-6 -translate-y-1/2 astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg> </label></starlight-select><nav class="hidden items-center gap-4 ps-4 md:flex"><a class="font-semibold text-[var(--sl-color-text-accent)] no-underline" href="/v4/reference/getting-started">Docs</a><a class="font-semibold text-[var(--sl-color-text-accent)] no-underline" href="/plugins">Plugins</a><a class="font-semibold text-[var(--sl-color-text-accent)] no-underline" href="/sponsors">Sponsors</a><a class="font-semibold text-[var(--sl-color-text-accent)] no-underline" href="/blog">Blog</a></nav> </div> <div class="sl-flex astro-kmkmnagf"> <site-search data-translations="{&#34;placeholder&#34;:&#34;Search&#34;}" class="astro-v37mnknz"> <button data-open-modal disabled class="astro-v37mnknz"> <svg aria-label="Search" class="astro-v37mnknz astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21.71 20.29 18 16.61A9 9 0 1 0 16.61 18l3.68 3.68a.999.999 0 0 0 1.42 0 1 1 0 0 0 0-1.39ZM11 18a7 7 0 1 1 0-14 7 7 0 0 1 0 14Z"/></svg> <span class="sl-hidden md:sl-block astro-v37mnknz" aria-hidden="true">Search</span> <svg aria-label="(Press / to Search)" class="sl-hidden md:sl-block astro-v37mnknz astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 2H7a5 5 0 0 0-5 5v10a5 5 0 0 0 5 5h10a5 5 0 0 0 5-5V7a5 5 0 0 0-5-5Zm3 15a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v10Z"/><path d="M15.293 6.707a1 1 0 1 1 1.414 1.414l-8.485 8.486a1 1 0 0 1-1.414-1.415l8.485-8.485Z"/></svg> </button> <dialog style="padding:0" aria-label="Search" class="astro-v37mnknz"> <div class="dialog-frame sl-flex astro-v37mnknz"> <button data-close-modal class="sl-flex md:sl-hidden astro-v37mnknz"> Cancel </button> <div class="search-container astro-v37mnknz"> <div id="starlight__search" class="astro-v37mnknz"></div> </div> </div> </dialog> </site-search> </div> <div class="sl-hidden md:sl-flex right-group astro-kmkmnagf"> <div class="sl-flex social-icons astro-kmkmnagf"> <a href="https://github.com/sern-handler" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">GitHub</span><svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z"/></svg> </a><a href="https://discord.gg/DwbF5H5JgQ" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">Discord</span><svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M20.32 4.37a19.8 19.8 0 0 0-4.93-1.51 13.78 13.78 0 0 0-.64 1.28 18.27 18.27 0 0 0-5.5 0 12.64 12.64 0 0 0-.64-1.28h-.05A19.74 19.74 0 0 0 3.64 4.4 20.26 20.26 0 0 0 .11 18.09l.02.02a19.9 19.9 0 0 0 6.04 3.03l.04-.02a14.24 14.24 0 0 0 1.23-2.03.08.08 0 0 0-.05-.07 13.1 13.1 0 0 1-1.9-.92.08.08 0 0 1 .02-.1 10.2 10.2 0 0 0 .41-.31h.04a14.2 14.2 0 0 0 12.1 0l.04.01a9.63 9.63 0 0 0 .4.32.08.08 0 0 1-.03.1 12.29 12.29 0 0 1-1.9.91.08.08 0 0 0-.02.1 15.97 15.97 0 0 0 1.27 2.01h.04a19.84 19.84 0 0 0 6.03-3.05v-.03a20.12 20.12 0 0 0-3.57-13.69ZM8.02 15.33c-1.18 0-2.16-1.08-2.16-2.42 0-1.33.96-2.42 2.16-2.42 1.21 0 2.18 1.1 2.16 2.42 0 1.34-.96 2.42-2.16 2.42Zm7.97 0c-1.18 0-2.15-1.08-2.15-2.42 0-1.33.95-2.42 2.15-2.42 1.22 0 2.18 1.1 2.16 2.42 0 1.34-.94 2.42-2.16 2.42Z"/></svg> </a> </div> <starlight-theme-select> <label style="--sl-select-width: 6.25em" class="astro-4yphtoen"> <span class="sr-only astro-4yphtoen">Select theme</span> <svg aria-hidden="true" class="icon label-icon astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg> <select value="auto" class="astro-4yphtoen"> <option value="dark" class="astro-4yphtoen">Dark</option><option value="light" class="astro-4yphtoen">Light</option><option value="auto" selected="true" class="astro-4yphtoen">Auto</option> </select> <svg aria-hidden="true" class="icon caret astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg> </label> </starlight-theme-select> <script>
StarlightThemeProvider.updatePickers();
</script> <starlight-lang-select><label style="--sl-select-width: 7em" class="astro-4yphtoen"> <span class="sr-only astro-4yphtoen">Select language</span> <svg aria-hidden="true" class="icon label-icon astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path fill-rule="evenodd" d="M8.516 3a.94.94 0 0 0-.941.94v1.15H2.94a.94.94 0 1 0 0 1.882h7.362a7.422 7.422 0 0 1-1.787 3.958 7.42 7.42 0 0 1-1.422-2.425.94.94 0 1 0-1.774.627 9.303 9.303 0 0 0 1.785 3.043 7.422 7.422 0 0 1-4.164 1.278.94.94 0 1 0 0 1.881 9.303 9.303 0 0 0 5.575-1.855 9.303 9.303 0 0 0 4.11 1.74l-.763 1.525a.968.968 0 0 0-.016.034l-1.385 2.77a.94.94 0 1 0 1.683.841l1.133-2.267h5.806l1.134 2.267a.94.94 0 0 0 1.683-.841l-1.385-2.769a.95.95 0 0 0-.018-.036l-3.476-6.951a.94.94 0 0 0-1.682 0l-1.82 3.639a7.423 7.423 0 0 1-3.593-1.256 9.303 9.303 0 0 0 2.27-5.203h1.894a.94.94 0 0 0 0-1.881H9.456V3.94A.94.94 0 0 0 8.516 3Zm6.426 11.794a1.068 1.068 0 0 1-.02.039l-.703 1.407h3.924l-1.962-3.924-1.24 2.478Z" clip-rule="evenodd"/></svg> <select value="/v4/reference/modules/" class="astro-4yphtoen"> <option value="/v4/reference/modules/" class="astro-4yphtoen">English</option><option value="/es/v4/reference/modules/" class="astro-4yphtoen">Español</option><option value="/tr/v4/reference/modules/" class="astro-4yphtoen">Türkçe</option> </select> <svg aria-hidden="true" class="icon caret astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg> </label> </starlight-lang-select> </div> </div> </header> <nav class="sidebar astro-vrdttmbt" aria-label="Main"> <starlight-menu-button class="astro-jif73yzw"> <button aria-expanded="false" aria-label="Menu" aria-controls="starlight__sidebar" class="sl-flex md:sl-hidden astro-jif73yzw"> <svg aria-hidden="true" class="astro-jif73yzw astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M3 8h18a1 1 0 1 0 0-2H3a1 1 0 0 0 0 2Zm18 8H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2Zm0-5H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2Z"/></svg> </button> </starlight-menu-button> <div id="starlight__sidebar" class="sidebar-pane astro-vrdttmbt"> <div class="sidebar-content sl-flex astro-vrdttmbt"> <starlight-multi-sidebar-select class="astro-kcgrvcei"><label class="astro-kcgrvcei"><span class="sr-only astro-kcgrvcei">Menu</span><select class="astro-kcgrvcei"><option value="v4" selected="true" class="astro-kcgrvcei">v4</option><option value="v3" class="astro-kcgrvcei">v3</option></select><svg aria-hidden="true" class="icon astro-kcgrvcei astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg> </label><div data-starlight-multi-sidebar-label="v4" class="astro-kcgrvcei"><ul class="top-level astro-3ii7xxms"> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">API</span> <span class="sl-badge default astro-vohx2lp7">Generated</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Namespaces</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Presence</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">interfaces</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v4/api/namespaces/presence/interfaces/result/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Result</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">type-aliases</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v4/api/namespaces/presence/type-aliases/config/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Config</span> </a> </li> </ul> </details> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Sern</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">functions</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v4/api/namespaces/sern/functions/init/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">init</span> </a> </li> </ul> </details> </li> </ul> </details> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Enumerations</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v4/api/enumerations/commandtype/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CommandType</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/enumerations/eventtype/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">EventType</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/enumerations/payloadtype/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">PayloadType</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/enumerations/plugintype/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">PluginType</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Classes</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v4/api/classes/context/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Context</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Interfaces</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/bothcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">BothCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/buttoncommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ButtonCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/channelselectcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ChannelSelectCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/commandmoduledefs/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CommandModuleDefs</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/contextmenumsg/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ContextMenuMsg</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/contextmenuuser/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ContextMenuUser</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/controlplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ControlPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/coredependencies/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CoreDependencies</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/discordeventcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">DiscordEventCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/disposable/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Disposable</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/emitter/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Emitter</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/errorhandling/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ErrorHandling</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/eventmoduledefs/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">EventModuleDefs</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/externaleventcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ExternalEventCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/init/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Init</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/initplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">InitPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/logging/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Logging</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/mentionableselectcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">MentionableSelectCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/modalsubmitcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ModalSubmitCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/module/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Module</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/plugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Plugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/roleselectcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">RoleSelectCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/scheduledtask/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ScheduledTask</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/sdt/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SDT</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/sernautocompletedata/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernAutocompleteData</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/serneventcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernEventCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/serneventsmapping/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernEventsMapping</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/sernsubcommanddata/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernSubCommandData</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/sernsubcommandgroupdata/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernSubCommandGroupData</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/slashcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SlashCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/stringselectcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">StringSelectCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/textcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">TextCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/userselectcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">UserSelectCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/interfaces/wrapper/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Wrapper</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Type Aliases</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v4/api/type-aliases/anyplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">AnyPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/type-aliases/commandmodule/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CommandModule</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/type-aliases/controller/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Controller</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/type-aliases/eventmodule/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">EventModule</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/type-aliases/logpayload/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">LogPayload</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/type-aliases/payload/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Payload</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/type-aliases/pluginresult/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">PluginResult</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/type-aliases/sernoptionsdata/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernOptionsData</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Variables</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v4/api/variables/controller/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">controller</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/variables/presence/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Presence</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Functions</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v4/api/functions/commandcontrolplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CommandControlPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/functions/commandinitplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CommandInitPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/functions/commandmodule/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">commandModule</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/functions/discordevent/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">discordEvent</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/functions/eventinitplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">EventInitPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/functions/eventmodule/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">eventModule</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/functions/makedependencies/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">makeDependencies</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/functions/makeplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">makePlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/functions/scheduledtask/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">scheduledTask</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/functions/service/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Service</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/functions/services/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Services</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/functions/single/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">single</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/api/functions/transient/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">transient</span> </a> </li> </ul> </details> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">CLI</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v4/cli/about/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">About the CLI</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/cli/build/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Build</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/cli/clear/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Clear</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/cli/extra/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Extra</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/cli/publish/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Publish</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Reference</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v4/reference/getting-started/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Quickstart Guide</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/reference/config/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Config</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/reference/tasks/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Tasks</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/reference/project-layout/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Project Layout</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/reference/modules/" aria-current="page" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Modules</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/reference/plugins/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Plugins</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/reference/presence/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Presence</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/reference/dependencies/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Dependencies</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/reference/autocomplete/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Autocomplete</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/reference/error-handling/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Error Handling</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/reference/conclusion/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Conclusion</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/reference/goal/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Goal</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Snippets</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v4/snippets/command/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Command</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/snippets/event/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Event</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/snippets/plugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Plugins</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/snippets/presence/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Presence</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Transition</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v4/transition/from-v3/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Updating your sern app</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Tools</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v4/tools/publisher/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Publisher</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v4/tools/localizer/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Localizer</span> </a> </li> </ul> </details> </li> </ul> <div class="md:sl-hidden"> <div class="mobile-preferences sl-flex astro-wu23bvmt"> <div class="sl-flex social-icons astro-wu23bvmt"> <a href="https://github.com/sern-handler" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">GitHub</span><svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z"/></svg> </a><a href="https://discord.gg/DwbF5H5JgQ" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">Discord</span><svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M20.32 4.37a19.8 19.8 0 0 0-4.93-1.51 13.78 13.78 0 0 0-.64 1.28 18.27 18.27 0 0 0-5.5 0 12.64 12.64 0 0 0-.64-1.28h-.05A19.74 19.74 0 0 0 3.64 4.4 20.26 20.26 0 0 0 .11 18.09l.02.02a19.9 19.9 0 0 0 6.04 3.03l.04-.02a14.24 14.24 0 0 0 1.23-2.03.08.08 0 0 0-.05-.07 13.1 13.1 0 0 1-1.9-.92.08.08 0 0 1 .02-.1 10.2 10.2 0 0 0 .41-.31h.04a14.2 14.2 0 0 0 12.1 0l.04.01a9.63 9.63 0 0 0 .4.32.08.08 0 0 1-.03.1 12.29 12.29 0 0 1-1.9.91.08.08 0 0 0-.02.1 15.97 15.97 0 0 0 1.27 2.01h.04a19.84 19.84 0 0 0 6.03-3.05v-.03a20.12 20.12 0 0 0-3.57-13.69ZM8.02 15.33c-1.18 0-2.16-1.08-2.16-2.42 0-1.33.96-2.42 2.16-2.42 1.21 0 2.18 1.1 2.16 2.42 0 1.34-.96 2.42-2.16 2.42Zm7.97 0c-1.18 0-2.15-1.08-2.15-2.42 0-1.33.95-2.42 2.15-2.42 1.22 0 2.18 1.1 2.16 2.42 0 1.34-.94 2.42-2.16 2.42Z"/></svg> </a> </div> <starlight-theme-select> <label style="--sl-select-width: 6.25em" class="astro-4yphtoen"> <span class="sr-only astro-4yphtoen">Select theme</span> <svg aria-hidden="true" class="icon label-icon astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg> <select value="auto" class="astro-4yphtoen"> <option value="dark" class="astro-4yphtoen">Dark</option><option value="light" class="astro-4yphtoen">Light</option><option value="auto" selected="true" class="astro-4yphtoen">Auto</option> </select> <svg aria-hidden="true" class="icon caret astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg> </label> </starlight-theme-select> <script>
StarlightThemeProvider.updatePickers();
</script> <starlight-lang-select><label style="--sl-select-width: 7em" class="astro-4yphtoen"> <span class="sr-only astro-4yphtoen">Select language</span> <svg aria-hidden="true" class="icon label-icon astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path fill-rule="evenodd" d="M8.516 3a.94.94 0 0 0-.941.94v1.15H2.94a.94.94 0 1 0 0 1.882h7.362a7.422 7.422 0 0 1-1.787 3.958 7.42 7.42 0 0 1-1.422-2.425.94.94 0 1 0-1.774.627 9.303 9.303 0 0 0 1.785 3.043 7.422 7.422 0 0 1-4.164 1.278.94.94 0 1 0 0 1.881 9.303 9.303 0 0 0 5.575-1.855 9.303 9.303 0 0 0 4.11 1.74l-.763 1.525a.968.968 0 0 0-.016.034l-1.385 2.77a.94.94 0 1 0 1.683.841l1.133-2.267h5.806l1.134 2.267a.94.94 0 0 0 1.683-.841l-1.385-2.769a.95.95 0 0 0-.018-.036l-3.476-6.951a.94.94 0 0 0-1.682 0l-1.82 3.639a7.423 7.423 0 0 1-3.593-1.256 9.303 9.303 0 0 0 2.27-5.203h1.894a.94.94 0 0 0 0-1.881H9.456V3.94A.94.94 0 0 0 8.516 3Zm6.426 11.794a1.068 1.068 0 0 1-.02.039l-.703 1.407h3.924l-1.962-3.924-1.24 2.478Z" clip-rule="evenodd"/></svg> <select value="/v4/reference/modules/" class="astro-4yphtoen"> <option value="/v4/reference/modules/" class="astro-4yphtoen">English</option><option value="/es/v4/reference/modules/" class="astro-4yphtoen">Español</option><option value="/tr/v4/reference/modules/" class="astro-4yphtoen">Türkçe</option> </select> <svg aria-hidden="true" class="icon caret astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg> </label> </starlight-lang-select> </div> </div></div><div hidden data-starlight-multi-sidebar-label="v3" class="astro-kcgrvcei"><ul class="top-level astro-3ii7xxms"> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">API</span> <span class="sl-badge default astro-vohx2lp7">Generated</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Namespaces</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Presence</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">functions</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v3/api/namespaces/presence/functions/module/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">module</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/namespaces/presence/functions/of/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">of</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">interfaces</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v3/api/namespaces/presence/interfaces/result/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Result</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">type-aliases</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v3/api/namespaces/presence/type-aliases/config/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Config</span> </a> </li> </ul> </details> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Sern</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">functions</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v3/api/namespaces/sern/functions/init/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">init</span> </a> </li> </ul> </details> </li> </ul> </details> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Enumerations</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v3/api/enumerations/commandtype/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CommandType</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/enumerations/eventtype/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">EventType</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/enumerations/payloadtype/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">PayloadType</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/enumerations/plugintype/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">PluginType</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Classes</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v3/api/classes/context/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Context</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/classes/modulestore/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ModuleStore</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Interfaces</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/bothcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">BothCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/buttoncommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ButtonCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/channelselectcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ChannelSelectCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/commandmoduledefs/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CommandModuleDefs</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/contextmenumsg/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ContextMenuMsg</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/contextmenuuser/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ContextMenuUser</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/controller/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Controller</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/controlplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ControlPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/coredependencies/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CoreDependencies</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/coremodulestore/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CoreModuleStore</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/discordeventcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">DiscordEventCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/disposable/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Disposable</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/emitter/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Emitter</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/errorhandling/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ErrorHandling</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/eventmoduledefs/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">EventModuleDefs</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/externaleventcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ExternalEventCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/init/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Init</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/initplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">InitPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/logging/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Logging</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/mentionableselectcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">MentionableSelectCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/modalsubmitcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ModalSubmitCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/plugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Plugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/roleselectcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">RoleSelectCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/sernautocompletedata/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernAutocompleteData</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/serneventcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernEventCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/serneventsmapping/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernEventsMapping</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/sernsubcommanddata/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernSubCommandData</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/sernsubcommandgroupdata/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernSubCommandGroupData</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/slashcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SlashCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/stringselectcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">StringSelectCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/textcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">TextCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/userselectcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">UserSelectCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/interfaces/wrapper/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Wrapper</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Type Aliases</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v3/api/type-aliases/anycommandplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">AnyCommandPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/type-aliases/anyeventplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">AnyEventPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/type-aliases/args/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Args</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/type-aliases/commandmodule/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CommandModule</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/type-aliases/eventmodule/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">EventModule</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/type-aliases/initializable/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Initializable</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/type-aliases/logpayload/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">LogPayload</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/type-aliases/payload/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Payload</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/type-aliases/pluginresult/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">PluginResult</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/type-aliases/sernoptionsdata/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernOptionsData</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/type-aliases/singleton/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Singleton</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/type-aliases/slashoptions/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SlashOptions</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/type-aliases/transient/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Transient</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Variables</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v3/api/variables/controller/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">controller</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Functions</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v3/api/functions/commandcontrolplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CommandControlPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/functions/commandinitplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CommandInitPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/functions/commandmodule/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">commandModule</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/functions/discordevent/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">discordEvent</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/functions/discordeventcontrolplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">DiscordEventControlPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/functions/eventcontrolplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">EventControlPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/functions/eventinitplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">EventInitPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/functions/eventmodule/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">eventModule</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/functions/makedependencies/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">makeDependencies</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/functions/makeplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">makePlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/functions/service/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Service</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/functions/services/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Services</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/functions/single/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">single</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/api/functions/transient/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">transient</span> </a> </li> </ul> </details> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">CLI</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v3/cli/about/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">About the CLI</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/cli/build/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Build</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/cli/clear/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Clear</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/cli/extra/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Extra</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/cli/publish/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Publish</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Guide</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Getting Started</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v3/guide/getting-started/choose-ide/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Choosing an IDE</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/guide/getting-started/preparing/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Preparing to Code</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Walkthrough</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/v3/guide/walkthrough/goal/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Goal</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/guide/walkthrough/new-project/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">New Project</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/guide/walkthrough/cli/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CLI</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/guide/walkthrough/transition/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Transition from v2 to v3</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/guide/walkthrough/first-command/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">First Command</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/guide/walkthrough/first-event/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">First Event</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/guide/walkthrough/plugins/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Plugins</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/guide/walkthrough/services/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Services</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/guide/walkthrough/autocomplete/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Autocomplete</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/guide/walkthrough/dependency-injection/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Dependency Injection</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/guide/walkthrough/sern-emitter/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Sern Emitter</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/guide/walkthrough/conclusion/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Conclusion</span> </a> </li><li class="astro-3ii7xxms"> <a href="/v3/guide/walkthrough/good-to-know/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Good to Know</span> </a> </li> </ul> </details> </li> </ul> </details> </li> </ul> <div class="md:sl-hidden"> <div class="mobile-preferences sl-flex astro-wu23bvmt"> <div class="sl-flex social-icons astro-wu23bvmt"> <a href="https://github.com/sern-handler" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">GitHub</span><svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z"/></svg> </a><a href="https://discord.gg/DwbF5H5JgQ" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">Discord</span><svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M20.32 4.37a19.8 19.8 0 0 0-4.93-1.51 13.78 13.78 0 0 0-.64 1.28 18.27 18.27 0 0 0-5.5 0 12.64 12.64 0 0 0-.64-1.28h-.05A19.74 19.74 0 0 0 3.64 4.4 20.26 20.26 0 0 0 .11 18.09l.02.02a19.9 19.9 0 0 0 6.04 3.03l.04-.02a14.24 14.24 0 0 0 1.23-2.03.08.08 0 0 0-.05-.07 13.1 13.1 0 0 1-1.9-.92.08.08 0 0 1 .02-.1 10.2 10.2 0 0 0 .41-.31h.04a14.2 14.2 0 0 0 12.1 0l.04.01a9.63 9.63 0 0 0 .4.32.08.08 0 0 1-.03.1 12.29 12.29 0 0 1-1.9.91.08.08 0 0 0-.02.1 15.97 15.97 0 0 0 1.27 2.01h.04a19.84 19.84 0 0 0 6.03-3.05v-.03a20.12 20.12 0 0 0-3.57-13.69ZM8.02 15.33c-1.18 0-2.16-1.08-2.16-2.42 0-1.33.96-2.42 2.16-2.42 1.21 0 2.18 1.1 2.16 2.42 0 1.34-.96 2.42-2.16 2.42Zm7.97 0c-1.18 0-2.15-1.08-2.15-2.42 0-1.33.95-2.42 2.15-2.42 1.22 0 2.18 1.1 2.16 2.42 0 1.34-.94 2.42-2.16 2.42Z"/></svg> </a> </div> <starlight-theme-select> <label style="--sl-select-width: 6.25em" class="astro-4yphtoen"> <span class="sr-only astro-4yphtoen">Select theme</span> <svg aria-hidden="true" class="icon label-icon astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg> <select value="auto" class="astro-4yphtoen"> <option value="dark" class="astro-4yphtoen">Dark</option><option value="light" class="astro-4yphtoen">Light</option><option value="auto" selected="true" class="astro-4yphtoen">Auto</option> </select> <svg aria-hidden="true" class="icon caret astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg> </label> </starlight-theme-select> <script>
StarlightThemeProvider.updatePickers();
</script> <starlight-lang-select><label style="--sl-select-width: 7em" class="astro-4yphtoen"> <span class="sr-only astro-4yphtoen">Select language</span> <svg aria-hidden="true" class="icon label-icon astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path fill-rule="evenodd" d="M8.516 3a.94.94 0 0 0-.941.94v1.15H2.94a.94.94 0 1 0 0 1.882h7.362a7.422 7.422 0 0 1-1.787 3.958 7.42 7.42 0 0 1-1.422-2.425.94.94 0 1 0-1.774.627 9.303 9.303 0 0 0 1.785 3.043 7.422 7.422 0 0 1-4.164 1.278.94.94 0 1 0 0 1.881 9.303 9.303 0 0 0 5.575-1.855 9.303 9.303 0 0 0 4.11 1.74l-.763 1.525a.968.968 0 0 0-.016.034l-1.385 2.77a.94.94 0 1 0 1.683.841l1.133-2.267h5.806l1.134 2.267a.94.94 0 0 0 1.683-.841l-1.385-2.769a.95.95 0 0 0-.018-.036l-3.476-6.951a.94.94 0 0 0-1.682 0l-1.82 3.639a7.423 7.423 0 0 1-3.593-1.256 9.303 9.303 0 0 0 2.27-5.203h1.894a.94.94 0 0 0 0-1.881H9.456V3.94A.94.94 0 0 0 8.516 3Zm6.426 11.794a1.068 1.068 0 0 1-.02.039l-.703 1.407h3.924l-1.962-3.924-1.24 2.478Z" clip-rule="evenodd"/></svg> <select value="/v4/reference/modules/" class="astro-4yphtoen"> <option value="/v4/reference/modules/" class="astro-4yphtoen">English</option><option value="/es/v4/reference/modules/" class="astro-4yphtoen">Español</option><option value="/tr/v4/reference/modules/" class="astro-4yphtoen">Türkçe</option> </select> <svg aria-hidden="true" class="icon caret astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg> </label> </starlight-lang-select> </div> </div></div></starlight-multi-sidebar-select> </div> </div> </nav> <div class="main-frame astro-vrdttmbt"> <div class="lg:sl-flex astro-67yu43on"> <aside class="right-sidebar-container astro-67yu43on"> <div class="right-sidebar astro-67yu43on"> <div class="lg:sl-hidden astro-pb3aqygn"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-doynk5tl"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-doynk5tl"><details id="starlight__mobile-toc" class="astro-doynk5tl"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-doynk5tl"><div class="toggle sl-flex astro-doynk5tl">On this page<svg aria-hidden="true" class="caret astro-doynk5tl astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </div><span class="display-current astro-doynk5tl"></span></summary><div class="dropdown astro-doynk5tl"><ul class="isMobile astro-g2bywc46" style="--depth: 0;"> <li class="astro-g2bywc46" style="--depth: 0;"> <a href="#_top" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Overview</span> </a> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#introduction" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Introduction</span> </a> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#modules" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Modules</span> </a> <ul class="isMobile astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"> <a href="#application-commands" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Application Commands</span> </a> </li><li class="astro-g2bywc46" style="--depth: 1;"> <a href="#components" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Components</span> </a> </li><li class="astro-g2bywc46" style="--depth: 1;"> <a href="#dynamic-component-parameters" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Dynamic Component Parameters</span> </a> </li> </ul> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#event-modules" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Event Modules</span> </a> <ul class="isMobile astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"> <a href="#listening-to-discord-events" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Listening to Discord Events</span> </a> </li> </ul> </li> </ul> </div></details></nav></mobile-starlight-toc></div><div class="right-sidebar-panel sl-hidden lg:sl-block astro-pb3aqygn"><div class="sl-container astro-pb3aqygn"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">On this page</h2><ul class="astro-g2bywc46" style="--depth: 0;"> <li class="astro-g2bywc46" style="--depth: 0;"> <a href="#_top" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Overview</span> </a> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#introduction" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Introduction</span> </a> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#modules" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Modules</span> </a> <ul class="astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"> <a href="#application-commands" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Application Commands</span> </a> </li><li class="astro-g2bywc46" style="--depth: 1;"> <a href="#components" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Components</span> </a> </li><li class="astro-g2bywc46" style="--depth: 1;"> <a href="#dynamic-component-parameters" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Dynamic Component Parameters</span> </a> </li> </ul> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#event-modules" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Event Modules</span> </a> <ul class="astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"> <a href="#listening-to-discord-events" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Listening to Discord Events</span> </a> </li> </ul> </li> </ul> </nav></starlight-toc></div></div> </div> </aside> <div class="main-pane astro-67yu43on"> <main data-pagefind-body lang="en" dir="ltr" class="astro-bguv2lll"> <div class="content-panel astro-7nkwcw3z"> <div class="sl-container astro-7nkwcw3z"> <h1 id="_top" class="astro-j6tvhyss">Modules</h1> </div> </div> <div class="content-panel astro-7nkwcw3z"> <div class="sl-container astro-7nkwcw3z"> <div class="sl-markdown-content"> <h2 id="introduction">Introduction</h2>
<p>sern operates with <strong>modules</strong>. At its core, modules are simple objects which contain properties <code dir="auto">type</code>,<code dir="auto">execute</code>, and <a href="/v4/reference/plugins"><code dir="auto">plugins</code></a> (code ran before <code dir="auto">execute</code>).</p>
<h2 id="modules">Modules</h2>
<p>Well walk you through creating your first <strong>command</strong> module.</p>
<p>If you installed a new project via the CLI, your file should be here:</p>
<starlight-file-tree class="not-content astro-p67cqifm" data-pagefind-ignore><ul><li class="directory"><details open><summary><span class="tree-entry"><span class=""><span><span class="sr-only">Directory</span><svg width="16" height="16" class="tree-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M22.073 4.900L22.073 4.900L12.148 4.900L12.148 3.950Q12.148 3.125 11.585 2.563Q11.023 2 10.198 2L10.198 2L0.048 2L0.048 22L23.948 22L23.948 6.850Q23.998 6.025 23.448 5.462Q22.898 4.900 22.073 4.900Z"></path></svg></span>src/commands/
</span></span></summary><ul><li class="file"><span class="tree-entry"><span class="highlight"><span><svg width="16" height="16" class="tree-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M5.376 14.300L5.376 3.352L9.286 3.352L9.286 14.300Q9.286 17.842 7.630 19.452L7.630 19.452Q6.112 20.924 3.076 20.924L3.076 20.924Q2.386 20.924 1.558 20.809Q0.730 20.694 0.224 20.464L0.224 20.464L0.638 17.336Q1.512 17.750 2.662 17.750L2.662 17.750Q3.950 17.750 4.594 17.060L4.594 17.060Q5.376 16.232 5.376 14.300L5.376 14.300ZM11.862 19.912L12.736 16.600Q13.564 17.060 14.668 17.382L14.668 17.382Q15.910 17.750 17.014 17.750L17.014 17.750Q18.394 17.750 19.084 17.267Q19.774 16.784 19.774 15.910Q19.774 15.036 19.130 14.507Q18.486 13.978 16.876 13.426L16.876 13.426Q12.138 11.770 12.138 8.274L12.138 8.274Q12.138 5.974 13.909 4.525Q15.680 3.076 18.762 3.076L18.762 3.076Q21.200 3.076 23.224 3.950L23.224 3.950L22.350 7.124L22.074 6.986Q21.246 6.664 20.740 6.526L20.740 6.526Q19.774 6.250 18.762 6.250L18.762 6.250Q17.520 6.250 16.853 6.733Q16.186 7.216 16.186 7.998Q16.186 8.780 16.922 9.286L16.922 9.286Q17.474 9.700 19.314 10.436L19.314 10.436Q21.614 11.310 22.695 12.552Q23.776 13.794 23.776 15.588L23.776 15.588Q23.776 17.888 22.028 19.314L22.028 19.314Q20.142 20.924 16.738 20.924L16.738 20.924Q15.404 20.924 13.932 20.556L13.932 20.556Q12.782 20.326 11.862 19.912L11.862 19.912Z"></path></svg></span><strong>ping.js</strong></span> <span class="comment"> <strong>(right here, probably)</strong></span></span></li></ul></details></li><li class="file empty"><span class="tree-entry"><span class=""></span></span></li></ul></starlight-file-tree>
<h3 id="application-commands">Application Commands</h3>
<ul>
<li>Includes <code dir="auto">CommandType.Slash</code>, <code dir="auto">CommandType.Both</code>, <code dir="auto">CommandType.CtxUser</code>, <code dir="auto">CommandType.CtxMsg</code></li>
</ul>
<h4 id="chat-input-commands-slash-commands">Chat Input Commands (Slash Commands)</h4>
<div class="expressive-code"><link rel="stylesheet" href="/_astro/ec.r03g6.css"><script type="module" src="/_astro/ec.8zarh.js"></script><figure class="frame has-title not-content"><figcaption class="header"><span class="title">src/commands/ping.js</span></figcaption><pre data-language="js"><code><div class="ec-line"><div class="gutter"><div class="ln">1</div></div><div class="code"><span style="--0:#C792EA;--1:#8D46B4">import</span><span style="--0:#D6DEEB;--1:#403F53"> { commandModule, CommandType } </span><span style="--0:#C792EA;--1:#8D46B4">from</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">@sern/handler</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">;</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">2</div></div><div class="code">
</div></div><div class="ec-line"><div class="gutter"><div class="ln">3</div></div><div class="code"><span style="--0:#C792EA;--1:#8D46B4">export</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">default</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3C63B3">commandModule</span><span style="--0:#D6DEEB;--1:#403F53">({</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">4</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">type: </span><span style="--0:#7FDBCA;--1:#097174">CommandType</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#7FDBCA;--1:#097174">Slash</span><span style="--0:#D6DEEB;--1:#403F53">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">5</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">description: </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">A ping command</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">6</div></div><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3C63B3">execute</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#C792EA;--1:#8D46B4">async</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">(</span><span style="--1:#403F53"><span style="--0:#D7DBE0">ctx</span><span style="--0:#D6DEEB">, </span><span style="--0:#D7DBE0">sdt</span></span><span style="--0:#D9F5DD;--1:#111111">)</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">=></span><span style="--0:#D6DEEB;--1:#403F53"> { </span><span style="--0:#809191;--1:#5E6578">// ctx is Context, sdt is SDT type</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">7</div></div><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">await</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#7FDBCA;--1:#097174">ctx</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#82AAFF;--1:#3C63B3">reply</span><span style="--0:#D6DEEB;--1:#403F53">(</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">Pong 🏓</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">);</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">8</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">},</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">9</div></div><div class="code"><span style="--0:#D6DEEB;--1:#403F53">});</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="import { commandModule, CommandType } from &#x22;@sern/handler&#x22;;export default commandModule({ type: CommandType.Slash, description: &#x22;A ping command&#x22;, execute: async (ctx, sdt) => { // ctx is Context, sdt is SDT type await ctx.reply(&#x22;Pong 🏓&#x22;); },});"><div></div></button></div></figure></div>
<h4 id="context-menus">Context Menus</h4>
<div class="expressive-code"><figure class="frame has-title not-content"><figcaption class="header"><span class="title">src/commands/hello.js</span></figcaption><pre data-language="js"><code><div class="ec-line"><div class="gutter"><div class="ln">1</div></div><div class="code"><span style="--0:#C792EA;--1:#8D46B4">import</span><span style="--0:#D6DEEB;--1:#403F53"> { commandModule, CommandType } </span><span style="--0:#C792EA;--1:#8D46B4">from</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">@sern/handler</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">;</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">2</div></div><div class="code">
</div></div><div class="ec-line"><div class="gutter"><div class="ln">3</div></div><div class="code"><span style="--0:#C792EA;--1:#8D46B4">export</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">default</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3C63B3">commandModule</span><span style="--0:#D6DEEB;--1:#403F53">({</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">4</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">type: </span><span style="--0:#7FDBCA;--1:#097174">CommandType</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#7FDBCA;--1:#097174">CtxMsg</span><span style="--0:#D6DEEB;--1:#403F53">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">5</div></div><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3C63B3">execute</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#C792EA;--1:#8D46B4">async</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">(</span><span style="--0:#D7DBE0;--1:#403F53">ctx</span><span style="--0:#D9F5DD;--1:#111111">)</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">=></span><span style="--0:#D6DEEB;--1:#403F53"> {</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">6</div></div><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">await</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#7FDBCA;--1:#097174">ctx</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#82AAFF;--1:#3C63B3">reply</span><span style="--0:#D6DEEB;--1:#403F53">(</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">Hello.</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">);</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">7</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">},</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">8</div></div><div class="code"><span style="--0:#D6DEEB;--1:#403F53">});</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="import { commandModule, CommandType } from &#x22;@sern/handler&#x22;;export default commandModule({ type: CommandType.CtxMsg, execute: async (ctx) => { await ctx.reply(&#x22;Hello.&#x22;); },});"><div></div></button></div></figure></div>
<aside aria-label="Tip" class="starlight-aside starlight-aside--tip"><p class="starlight-aside__title" aria-hidden="true"><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" class="starlight-aside__icon"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.43909 8.85483L1.44039 8.85354L4.96668 5.33815C5.30653 4.99386 5.7685 4.79662 6.2524 4.78972L6.26553 4.78963L12.9014 4.78962L13.8479 3.84308C16.9187 0.772319 20.0546 0.770617 21.4678 0.975145C21.8617 1.02914 22.2271 1.21053 22.5083 1.4917C22.7894 1.77284 22.9708 2.13821 23.0248 2.53199C23.2294 3.94517 23.2278 7.08119 20.1569 10.1521L19.2107 11.0983V17.7338L19.2106 17.7469C19.2037 18.2308 19.0067 18.6933 18.6624 19.0331L15.1456 22.5608C14.9095 22.7966 14.6137 22.964 14.29 23.0449C13.9663 23.1259 13.6267 23.1174 13.3074 23.0204C12.9881 22.9235 12.7011 22.7417 12.4771 22.4944C12.2533 22.2473 12.1006 21.9441 12.0355 21.6171L11.1783 17.3417L6.65869 12.822L4.34847 12.3589L2.38351 11.965C2.05664 11.8998 1.75272 11.747 1.50564 11.5232C1.25835 11.2992 1.07653 11.0122 0.979561 10.6929C0.882595 10.3736 0.874125 10.034 0.955057 9.7103C1.03599 9.38659 1.20328 9.09092 1.43909 8.85483ZM6.8186 10.8724L2.94619 10.096L6.32006 6.73268H10.9583L6.8186 10.8724ZM15.2219 5.21703C17.681 2.75787 20.0783 2.75376 21.1124 2.8876C21.2462 3.92172 21.2421 6.31895 18.783 8.77812L12.0728 15.4883L8.51172 11.9272L15.2219 5.21703ZM13.9042 21.0538L13.1279 17.1811L17.2676 13.0414V17.68L13.9042 21.0538Z"></path><path d="M9.31827 18.3446C9.45046 17.8529 9.17864 17.3369 8.68945 17.1724C8.56178 17.1294 8.43145 17.1145 8.30512 17.1243C8.10513 17.1398 7.91519 17.2172 7.76181 17.3434C7.62613 17.455 7.51905 17.6048 7.45893 17.7835C6.97634 19.2186 5.77062 19.9878 4.52406 20.4029C4.08525 20.549 3.6605 20.644 3.29471 20.7053C3.35607 20.3395 3.45098 19.9148 3.59711 19.476C4.01221 18.2294 4.78141 17.0237 6.21648 16.5411C6.39528 16.481 6.54504 16.3739 6.65665 16.2382C6.85126 16.0016 6.92988 15.678 6.84417 15.3647C6.83922 15.3466 6.83373 15.3286 6.82767 15.3106C6.74106 15.053 6.55701 14.8557 6.33037 14.7459C6.10949 14.6389 5.84816 14.615 5.59715 14.6994C5.47743 14.7397 5.36103 14.7831 5.24786 14.8294C3.22626 15.6569 2.2347 17.4173 1.75357 18.8621C1.49662 19.6337 1.36993 20.3554 1.30679 20.8818C1.27505 21.1464 1.25893 21.3654 1.25072 21.5213C1.24662 21.5993 1.24448 21.6618 1.24337 21.7066L1.243 21.7226L1.24235 21.7605L1.2422 21.7771L1.24217 21.7827L1.24217 21.7856C1.24217 22.3221 1.67703 22.7579 2.2137 22.7579L2.2155 22.7579L2.22337 22.7578L2.23956 22.7577C2.25293 22.7575 2.27096 22.7572 2.29338 22.7567C2.33821 22.7555 2.40073 22.7534 2.47876 22.7493C2.63466 22.7411 2.85361 22.725 3.11822 22.6932C3.64462 22.6301 4.36636 22.5034 5.13797 22.2464C6.58274 21.7653 8.3431 20.7738 9.17063 18.7522C9.21696 18.639 9.26037 18.5226 9.30064 18.4029C9.30716 18.3835 9.31304 18.364 9.31827 18.3446Z"></path></svg>Tip</p><section class="starlight-aside__content"><p>Youll need to publish these modules. Dont worry, weve already got that covered <a href="/v4/tools/publisher">here</a>.
You may not see your command instantly in Discord, if so, try refreshing.</p></section></aside>
<h3 id="components">Components</h3>
<p>So, lets say you want to make a command module that listens to <strong>buttons</strong>, or ANY <strong>component</strong> (modals, select menus).</p>
<starlight-tabs data-sync-key="language-preference" class="astro-esqgolmp"> <div class="tablist-wrapper not-content astro-esqgolmp"> <ul role="tablist" class="astro-esqgolmp"> <li role="presentation" class="tab astro-esqgolmp"> <a role="tab" href="#tab-panel-54" id="tab-54" aria-selected="true" tabindex="0" class="astro-esqgolmp"> Send Component with Custom Id </a> </li><li role="presentation" class="tab astro-esqgolmp"> <a role="tab" href="#tab-panel-55" id="tab-55" aria-selected="false" tabindex="-1" class="astro-esqgolmp"> Button Listener </a> </li> </ul> </div> <section id="tab-panel-54" aria-labelledby="tab-54" role="tabpanel"> <div class="expressive-code"><figure class="frame has-title not-content"><figcaption class="header"><span class="title">src/commands/ping.js</span></figcaption><pre data-language="js"><code><div class="ec-line"><div class="gutter"><div class="ln">1</div></div><div class="code"><span style="--0:#C792EA;--1:#8D46B4">import</span><span style="--0:#D6DEEB;--1:#403F53"> { CommandType, commandModule } </span><span style="--0:#C792EA;--1:#8D46B4">from</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">@sern/handler</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">;</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">2</div></div><div class="code"><span style="--0:#C792EA;--1:#8D46B4">import</span><span style="--0:#D6DEEB;--1:#403F53"> { ButtonStyle, ActionRowBuilder, ButtonBuilder } </span><span style="--0:#C792EA;--1:#8D46B4">from</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">'</span><span style="--0:#ECC48D;--1:#9B504E">discord.js</span><span style="--0:#D9F5DD;--1:#111111">'</span><span style="--0:#D6DEEB;--1:#403F53">;</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">3</div></div><div class="code"><span style="--0:#C792EA;--1:#8D46B4">export</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">default</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3C63B3">commandModule</span><span style="--0:#D6DEEB;--1:#403F53">({</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">4</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">type: </span><span style="--0:#7FDBCA;--1:#097174">CommandType</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#7FDBCA;--1:#097174">Slash</span><span style="--0:#D6DEEB;--1:#403F53">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">5</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">description: </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">A ping command</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">6</div></div><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3C63B3">execute</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#C792EA;--1:#8D46B4">async</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">(</span><span style="--1:#403F53"><span style="--0:#D7DBE0">ctx</span><span style="--0:#D6DEEB">, </span><span style="--0:#D7DBE0">sdt</span></span><span style="--0:#D9F5DD;--1:#111111">)</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">=></span><span style="--0:#D6DEEB;--1:#403F53"> {</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">7</div></div><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">const </span><span style="--0:#82AAFF;--1:#3C63B3">editButton</span><span style="--0:#C792EA;--1:#8D46B4"> = </span><span style="--0:#7FDBCA;--1:#097174">new</span><span style="--0:#C792EA;--1:#8D46B4"> </span><span style="--0:#82AAFF;--1:#3C63B3">ButtonBuilder</span><span style="--0:#D6DEEB;--1:#403F53">(</span><span style="--0:#C792EA;--1:#8D46B4">{</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">8</div></div><div class="code"><span class="indent"><span style="--0:#C792EA;--1:#8D46B4"> </span></span><span style="--0:#C792EA;--1:#8D46B4">customId: </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">btn</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#C792EA;--1:#8D46B4">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">9</div></div><div class="code"><span class="indent"><span style="--0:#C792EA;--1:#8D46B4"> </span></span><span style="--0:#C792EA;--1:#8D46B4">label: </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">Click me</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#C792EA;--1:#8D46B4">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">10</div></div><div class="code"><span class="indent"><span style="--0:#C792EA;--1:#8D46B4"> </span></span><span style="--0:#C792EA;--1:#8D46B4">emoji: </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">🛠</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#C792EA;--1:#8D46B4">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">11</div></div><div class="code"><span class="indent"><span style="--0:#C792EA;--1:#8D46B4"> </span></span><span style="--0:#C792EA;--1:#8D46B4">style: </span><span style="--0:#7FDBCA;--1:#097174">ButtonStyle</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#7FDBCA;--1:#097174">Primary</span><span style="--0:#C792EA;--1:#8D46B4">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">12</div></div><div class="code"><span class="indent"><span style="--0:#C792EA;--1:#8D46B4"> </span></span><span style="--0:#C792EA;--1:#8D46B4">}</span><span style="--0:#D6DEEB;--1:#403F53">);</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">13</div></div><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">await</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#7FDBCA;--1:#097174">ctx</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#82AAFF;--1:#3C63B3">reply</span><span style="--0:#D6DEEB;--1:#403F53">({</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">14</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">content: </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">Pong 🏓</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">15</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">components: [</span><span style="--0:#7FDBCA;--1:#097174">new</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3C63B3">ActionRowBuilder</span><span style="--0:#D6DEEB;--1:#403F53">()</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#82AAFF;--1:#3C63B3">addComponents</span><span style="--1:#403F53"><span style="--0:#D6DEEB">(</span><span style="--0:#D7DBE0">editButton</span><span style="--0:#D6DEEB">)]</span></span></div></div><div class="ec-line"><div class="gutter"><div class="ln">16</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">});</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">17</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">},</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">18</div></div><div class="code"><span style="--0:#D6DEEB;--1:#403F53">});</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="import { CommandType, commandModule } from &#x22;@sern/handler&#x22;;import { ButtonStyle, ActionRowBuilder, ButtonBuilder } from &#x27;discord.js&#x27;;export default commandModule({ type: CommandType.Slash, description: &#x22;A ping command&#x22;, execute: async (ctx, sdt) => { const editButton = new ButtonBuilder({ customId: &#x22;btn&#x22;, label: &#x22;Click me&#x22;, emoji: &#x22;🛠&#x22;, style: ButtonStyle.Primary, }); await ctx.reply({ content: &#x22;Pong 🏓&#x22;, components: [new ActionRowBuilder().addComponents(editButton)] }); },});"><div></div></button></div></figure></div> </section><section id="tab-panel-55" aria-labelledby="tab-55" role="tabpanel" hidden> <div class="expressive-code"><figure class="frame has-title not-content"><figcaption class="header"><span class="title">src/commands/btn.js</span></figcaption><pre data-language="ts"><code><div class="ec-line"><div class="gutter"><div class="ln">1</div></div><div class="code"><span style="--0:#C792EA;--1:#8D46B4">import</span><span style="--0:#D6DEEB;--1:#403F53"> { CommandType, commandModule } </span><span style="--0:#C792EA;--1:#8D46B4">from</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">@sern/handler</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">;</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">2</div></div><div class="code">
</div></div><div class="ec-line"><div class="gutter"><div class="ln">3</div></div><div class="code"><span style="--0:#C792EA;--1:#8D46B4">export</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">default</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3C63B3">commandModule</span><span style="--0:#D6DEEB;--1:#403F53">({</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">4</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">type: CommandType</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#7FDBCA;--1:#097174">Button</span><span style="--0:#D6DEEB;--1:#403F53">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">5</div></div><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3C63B3">execute</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#D9F5DD;--1:#111111">(</span><span style="--0:#D7DBE0;--1:#403F53">ibtn</span><span style="--0:#D9F5DD;--1:#111111">)</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">=></span><span style="--0:#D6DEEB;--1:#403F53"> {</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">6</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">ibtn</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#82AAFF;--1:#3C63B3">reply</span><span style="--0:#D6DEEB;--1:#403F53">(</span><span style="--0:#D9F5DD;--1:#111111">'</span><span style="--0:#ECC48D;--1:#9B504E">clicked</span><span style="--0:#D9F5DD;--1:#111111">'</span><span style="--0:#D6DEEB;--1:#403F53">)</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">7</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">},</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">8</div></div><div class="code"><span style="--0:#D6DEEB;--1:#403F53">});</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="import { CommandType, commandModule } from &#x22;@sern/handler&#x22;;export default commandModule({ type: CommandType.Button, execute: (ibtn) => { ibtn.reply(&#x27;clicked&#x27;) },});"><div></div></button></div></figure></div> </section> </starlight-tabs>
<h3 id="dynamic-component-parameters">Dynamic Component Parameters</h3>
<p>Components can carry metadata. This comes in handy when handling multiple components of the same purpose. This is good for passing small, string based data across components.</p>
<starlight-tabs data-sync-key="language-preference" class="astro-esqgolmp"> <div class="tablist-wrapper not-content astro-esqgolmp"> <ul role="tablist" class="astro-esqgolmp"> <li role="presentation" class="tab astro-esqgolmp"> <a role="tab" href="#tab-panel-56" id="tab-56" aria-selected="true" tabindex="0" class="astro-esqgolmp"> Send Component with Custom Id </a> </li><li role="presentation" class="tab astro-esqgolmp"> <a role="tab" href="#tab-panel-57" id="tab-57" aria-selected="false" tabindex="-1" class="astro-esqgolmp"> Button Listener </a> </li> </ul> </div> <section id="tab-panel-56" aria-labelledby="tab-56" role="tabpanel"> <div class="expressive-code"><figure class="frame has-title not-content"><figcaption class="header"><span class="title">src/commands/ping.js</span></figcaption><pre data-language="js"><code><div class="ec-line"><div class="gutter"><div class="ln">1</div></div><div class="code"><span style="--0:#C792EA;--1:#8D46B4">import</span><span style="--0:#D6DEEB;--1:#403F53"> { CommandType, commandModule } </span><span style="--0:#C792EA;--1:#8D46B4">from</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">@sern/handler</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">;</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">2</div></div><div class="code"><span style="--0:#C792EA;--1:#8D46B4">import</span><span style="--0:#D6DEEB;--1:#403F53"> { ButtonStyle, ActionRowBuilder, ButtonBuilder } </span><span style="--0:#C792EA;--1:#8D46B4">from</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">'</span><span style="--0:#ECC48D;--1:#9B504E">discord.js</span><span style="--0:#D9F5DD;--1:#111111">'</span><span style="--0:#D6DEEB;--1:#403F53">;</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">3</div></div><div class="code"><span style="--0:#C792EA;--1:#8D46B4">export</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">default</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3C63B3">commandModule</span><span style="--0:#D6DEEB;--1:#403F53">({</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">4</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">type: </span><span style="--0:#7FDBCA;--1:#097174">CommandType</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#7FDBCA;--1:#097174">Slash</span><span style="--0:#D6DEEB;--1:#403F53">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">5</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">description: </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">A ping command</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">6</div></div><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3C63B3">execute</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#C792EA;--1:#8D46B4">async</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">(</span><span style="--1:#403F53"><span style="--0:#D7DBE0">ctx</span><span style="--0:#D6DEEB">, </span><span style="--0:#D7DBE0">sdt</span></span><span style="--0:#D9F5DD;--1:#111111">)</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">=></span><span style="--0:#D6DEEB;--1:#403F53"> {</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">7</div></div><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">const </span><span style="--0:#82AAFF;--1:#3C63B3">editButton</span><span style="--0:#C792EA;--1:#8D46B4"> = </span><span style="--0:#7FDBCA;--1:#097174">new</span><span style="--0:#C792EA;--1:#8D46B4"> </span><span style="--0:#82AAFF;--1:#3C63B3">ButtonBuilder</span><span style="--0:#D6DEEB;--1:#403F53">(</span><span style="--0:#C792EA;--1:#8D46B4">{</span></div></div><div class="ec-line highlight mark"><div class="gutter"><div class="ln">8</div></div><div class="code"><span style="--1:#773b98"><span class="indent"><span style="--0:#C792EA"> </span></span><span style="--0:#C792EA">customId: </span></span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#834442">btn/1061421834341462036</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#C792EA;--1:#773b98">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">9</div></div><div class="code"><span class="indent"><span style="--0:#C792EA;--1:#8D46B4"> </span></span><span style="--0:#C792EA;--1:#8D46B4">label: </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">Click me</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#C792EA;--1:#8D46B4">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">10</div></div><div class="code"><span class="indent"><span style="--0:#C792EA;--1:#8D46B4"> </span></span><span style="--0:#C792EA;--1:#8D46B4">emoji: </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">🛠</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#C792EA;--1:#8D46B4">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">11</div></div><div class="code"><span class="indent"><span style="--0:#C792EA;--1:#8D46B4"> </span></span><span style="--0:#C792EA;--1:#8D46B4">style: </span><span style="--0:#7FDBCA;--1:#097174">ButtonStyle</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#7FDBCA;--1:#097174">Primary</span><span style="--0:#C792EA;--1:#8D46B4">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">12</div></div><div class="code"><span class="indent"><span style="--0:#C792EA;--1:#8D46B4"> </span></span><span style="--0:#C792EA;--1:#8D46B4">}</span><span style="--0:#D6DEEB;--1:#403F53">);</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">13</div></div><div class="code"><span class="indent"> </span><span style="--0:#C792EA;--1:#8D46B4">await</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#7FDBCA;--1:#097174">ctx</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#82AAFF;--1:#3C63B3">reply</span><span style="--0:#D6DEEB;--1:#403F53">({</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">14</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">content: </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">Pong 🏓</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">15</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">components: [</span><span style="--0:#7FDBCA;--1:#097174">new</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3C63B3">ActionRowBuilder</span><span style="--0:#D6DEEB;--1:#403F53">()</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#82AAFF;--1:#3C63B3">addComponents</span><span style="--1:#403F53"><span style="--0:#D6DEEB">(</span><span style="--0:#D7DBE0">editButton</span><span style="--0:#D6DEEB">)]</span></span></div></div><div class="ec-line"><div class="gutter"><div class="ln">16</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">});</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">17</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">},</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">18</div></div><div class="code"><span style="--0:#D6DEEB;--1:#403F53">});</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="import { CommandType, commandModule } from &#x22;@sern/handler&#x22;;import { ButtonStyle, ActionRowBuilder, ButtonBuilder } from &#x27;discord.js&#x27;;export default commandModule({ type: CommandType.Slash, description: &#x22;A ping command&#x22;, execute: async (ctx, sdt) => { const editButton = new ButtonBuilder({ customId: &#x22;btn/1061421834341462036&#x22;, label: &#x22;Click me&#x22;, emoji: &#x22;🛠&#x22;, style: ButtonStyle.Primary, }); await ctx.reply({ content: &#x22;Pong 🏓&#x22;, components: [new ActionRowBuilder().addComponents(editButton)] }); },});"><div></div></button></div></figure></div> </section><section id="tab-panel-57" aria-labelledby="tab-57" role="tabpanel" hidden> <div class="expressive-code"><figure class="frame has-title not-content"><figcaption class="header"><span class="title">src/commands/btn.js</span></figcaption><pre data-language="ts"><code><div class="ec-line"><div class="gutter"><div class="ln">1</div></div><div class="code"><span style="--0:#C792EA;--1:#8D46B4">import</span><span style="--0:#D6DEEB;--1:#403F53"> { CommandType, commandModule } </span><span style="--0:#C792EA;--1:#8D46B4">from</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">@sern/handler</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">;</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">2</div></div><div class="code">
</div></div><div class="ec-line"><div class="gutter"><div class="ln">3</div></div><div class="code"><span style="--0:#C792EA;--1:#8D46B4">export</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">default</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3C63B3">commandModule</span><span style="--0:#D6DEEB;--1:#403F53">({</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">4</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">type: CommandType</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#7FDBCA;--1:#097174">Button</span><span style="--0:#D6DEEB;--1:#403F53">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">5</div></div><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3C63B3">execute</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#D9F5DD;--1:#111111">(</span><span style="--1:#403F53"><span style="--0:#D7DBE0">ibtn</span><span style="--0:#D6DEEB">, </span><span style="--0:#D7DBE0">sdt</span></span><span style="--0:#D9F5DD;--1:#111111">)</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">=></span><span style="--0:#D6DEEB;--1:#403F53"> {</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">6</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">ibtn</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#82AAFF;--1:#3C63B3">reply</span><span style="--0:#D6DEEB;--1:#403F53">(</span><span style="--0:#D9F5DD;--1:#111111">'</span><span style="--0:#ECC48D;--1:#9B504E">clicked with </span><span style="--0:#D9F5DD;--1:#111111">'</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">+</span><span style="--0:#D6DEEB;--1:#403F53"> sdt</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#7FDBCA;--1:#097174">params</span><span style="--0:#D6DEEB;--1:#403F53">)</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">7</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">},</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">8</div></div><div class="code"><span style="--0:#D6DEEB;--1:#403F53">});</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="import { CommandType, commandModule } from &#x22;@sern/handler&#x22;;export default commandModule({ type: CommandType.Button, execute: (ibtn, sdt) => { ibtn.reply(&#x27;clicked with &#x27; + sdt.params) },});"><div></div></button></div></figure></div> </section> </starlight-tabs>
<aside aria-label="Tip" class="starlight-aside starlight-aside--tip"><p class="starlight-aside__title" aria-hidden="true"><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" class="starlight-aside__icon"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.43909 8.85483L1.44039 8.85354L4.96668 5.33815C5.30653 4.99386 5.7685 4.79662 6.2524 4.78972L6.26553 4.78963L12.9014 4.78962L13.8479 3.84308C16.9187 0.772319 20.0546 0.770617 21.4678 0.975145C21.8617 1.02914 22.2271 1.21053 22.5083 1.4917C22.7894 1.77284 22.9708 2.13821 23.0248 2.53199C23.2294 3.94517 23.2278 7.08119 20.1569 10.1521L19.2107 11.0983V17.7338L19.2106 17.7469C19.2037 18.2308 19.0067 18.6933 18.6624 19.0331L15.1456 22.5608C14.9095 22.7966 14.6137 22.964 14.29 23.0449C13.9663 23.1259 13.6267 23.1174 13.3074 23.0204C12.9881 22.9235 12.7011 22.7417 12.4771 22.4944C12.2533 22.2473 12.1006 21.9441 12.0355 21.6171L11.1783 17.3417L6.65869 12.822L4.34847 12.3589L2.38351 11.965C2.05664 11.8998 1.75272 11.747 1.50564 11.5232C1.25835 11.2992 1.07653 11.0122 0.979561 10.6929C0.882595 10.3736 0.874125 10.034 0.955057 9.7103C1.03599 9.38659 1.20328 9.09092 1.43909 8.85483ZM6.8186 10.8724L2.94619 10.096L6.32006 6.73268H10.9583L6.8186 10.8724ZM15.2219 5.21703C17.681 2.75787 20.0783 2.75376 21.1124 2.8876C21.2462 3.92172 21.2421 6.31895 18.783 8.77812L12.0728 15.4883L8.51172 11.9272L15.2219 5.21703ZM13.9042 21.0538L13.1279 17.1811L17.2676 13.0414V17.68L13.9042 21.0538Z"></path><path d="M9.31827 18.3446C9.45046 17.8529 9.17864 17.3369 8.68945 17.1724C8.56178 17.1294 8.43145 17.1145 8.30512 17.1243C8.10513 17.1398 7.91519 17.2172 7.76181 17.3434C7.62613 17.455 7.51905 17.6048 7.45893 17.7835C6.97634 19.2186 5.77062 19.9878 4.52406 20.4029C4.08525 20.549 3.6605 20.644 3.29471 20.7053C3.35607 20.3395 3.45098 19.9148 3.59711 19.476C4.01221 18.2294 4.78141 17.0237 6.21648 16.5411C6.39528 16.481 6.54504 16.3739 6.65665 16.2382C6.85126 16.0016 6.92988 15.678 6.84417 15.3647C6.83922 15.3466 6.83373 15.3286 6.82767 15.3106C6.74106 15.053 6.55701 14.8557 6.33037 14.7459C6.10949 14.6389 5.84816 14.615 5.59715 14.6994C5.47743 14.7397 5.36103 14.7831 5.24786 14.8294C3.22626 15.6569 2.2347 17.4173 1.75357 18.8621C1.49662 19.6337 1.36993 20.3554 1.30679 20.8818C1.27505 21.1464 1.25893 21.3654 1.25072 21.5213C1.24662 21.5993 1.24448 21.6618 1.24337 21.7066L1.243 21.7226L1.24235 21.7605L1.2422 21.7771L1.24217 21.7827L1.24217 21.7856C1.24217 22.3221 1.67703 22.7579 2.2137 22.7579L2.2155 22.7579L2.22337 22.7578L2.23956 22.7577C2.25293 22.7575 2.27096 22.7572 2.29338 22.7567C2.33821 22.7555 2.40073 22.7534 2.47876 22.7493C2.63466 22.7411 2.85361 22.725 3.11822 22.6932C3.64462 22.6301 4.36636 22.5034 5.13797 22.2464C6.58274 21.7653 8.3431 20.7738 9.17063 18.7522C9.21696 18.639 9.26037 18.5226 9.30064 18.4029C9.30716 18.3835 9.31304 18.364 9.31827 18.3446Z"></path></svg>Tip</p><section class="starlight-aside__content"><p>The first <code dir="auto">/</code> is significant in custom ids. On the left of it is the custom id to be matched, and on the right is any user defined data.</p></section></aside>
<h2 id="event-modules">Event Modules</h2>
<p>We are now moving to event modules, which listens to the vast streams of data provided by</p>
<ul>
<li><code dir="auto">sern</code>, <code dir="auto">EventType.Sern</code></li>
<li><code dir="auto">discord.js</code>, <code dir="auto">EventType.Discord</code></li>
<li><code dir="auto">yourself</code>, <code dir="auto">EventType.External</code></li>
</ul>
<p>If you havent already, add the <code dir="auto">events</code> directory to your <a href="/v4/reference/config">config</a></p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="js"><code><div class="ec-line"><div class="gutter"><div class="ln">1</div></div><div class="code"><span style="--0:#C792EA;--1:#8D46B4">export const </span><span style="--0:#82AAFF;--1:#3C63B3">events</span><span style="--0:#C792EA;--1:#8D46B4"> = </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">./dist/events</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">;</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="export const events = &#x22;./dist/events&#x22;;"><div></div></button></div></figure></div>
<starlight-file-tree class="not-content astro-p67cqifm" data-pagefind-ignore><ul><li class="directory"><details open><summary><span class="tree-entry"><span class=""><span><span class="sr-only">Directory</span><svg width="16" height="16" class="tree-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M22.073 4.900L22.073 4.900L12.148 4.900L12.148 3.950Q12.148 3.125 11.585 2.563Q11.023 2 10.198 2L10.198 2L0.048 2L0.048 22L23.948 22L23.948 6.850Q23.998 6.025 23.448 5.462Q22.898 4.900 22.073 4.900Z"></path></svg></span>src/events/
</span></span></summary><ul><li class="file"><span class="tree-entry"><span class="highlight"><span><svg width="16" height="16" class="tree-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M5.376 14.300L5.376 3.352L9.286 3.352L9.286 14.300Q9.286 17.842 7.630 19.452L7.630 19.452Q6.112 20.924 3.076 20.924L3.076 20.924Q2.386 20.924 1.558 20.809Q0.730 20.694 0.224 20.464L0.224 20.464L0.638 17.336Q1.512 17.750 2.662 17.750L2.662 17.750Q3.950 17.750 4.594 17.060L4.594 17.060Q5.376 16.232 5.376 14.300L5.376 14.300ZM11.862 19.912L12.736 16.600Q13.564 17.060 14.668 17.382L14.668 17.382Q15.910 17.750 17.014 17.750L17.014 17.750Q18.394 17.750 19.084 17.267Q19.774 16.784 19.774 15.910Q19.774 15.036 19.130 14.507Q18.486 13.978 16.876 13.426L16.876 13.426Q12.138 11.770 12.138 8.274L12.138 8.274Q12.138 5.974 13.909 4.525Q15.680 3.076 18.762 3.076L18.762 3.076Q21.200 3.076 23.224 3.950L23.224 3.950L22.350 7.124L22.074 6.986Q21.246 6.664 20.740 6.526L20.740 6.526Q19.774 6.250 18.762 6.250L18.762 6.250Q17.520 6.250 16.853 6.733Q16.186 7.216 16.186 7.998Q16.186 8.780 16.922 9.286L16.922 9.286Q17.474 9.700 19.314 10.436L19.314 10.436Q21.614 11.310 22.695 12.552Q23.776 13.794 23.776 15.588L23.776 15.588Q23.776 17.888 22.028 19.314L22.028 19.314Q20.142 20.924 16.738 20.924L16.738 20.924Q15.404 20.924 13.932 20.556L13.932 20.556Q12.782 20.326 11.862 19.912L11.862 19.912Z"></path></svg></span><strong>messageCreate.js</strong></span> <span class="comment"> <strong>(right here, probably)</strong></span></span></li></ul></details></li><li class="file empty"><span class="tree-entry"><span class=""></span></span></li></ul></starlight-file-tree>
<h3 id="listening-to-discord-events">Listening to Discord Events</h3>
<div class="expressive-code"><figure class="frame has-title not-content"><figcaption class="header"><span class="title">src/events/messageCreate.js</span></figcaption><pre data-language="js"><code><div class="ec-line"><div class="gutter"><div class="ln">1</div></div><div class="code"><span style="--0:#C792EA;--1:#8D46B4">import</span><span style="--0:#D6DEEB;--1:#403F53"> { eventModule, EventType } </span><span style="--0:#C792EA;--1:#8D46B4">from</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">@sern/handler</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">;</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">2</div></div><div class="code">
</div></div><div class="ec-line"><div class="gutter"><div class="ln">3</div></div><div class="code"><span style="--0:#C792EA;--1:#8D46B4">export</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">default</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3C63B3">eventModule</span><span style="--0:#D6DEEB;--1:#403F53">({</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">4</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">type: </span><span style="--0:#7FDBCA;--1:#097174">EventType</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#7FDBCA;--1:#097174">Discord</span><span style="--0:#D6DEEB;--1:#403F53">,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">5</div></div><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3C63B3">execute</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#C792EA;--1:#8D46B4">async</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">(</span><span style="--0:#D7DBE0;--1:#403F53">message</span><span style="--0:#D9F5DD;--1:#111111">)</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C792EA;--1:#8D46B4">=></span><span style="--0:#D6DEEB;--1:#403F53"> {</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">6</div></div><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#097174">console</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#82AAFF;--1:#3C63B3">log</span><span style="--0:#D6DEEB;--1:#403F53">(</span><span style="--0:#D6DEEB;--1:#403F53">`</span><span style="--0:#DD6B68;--1:#B73936">${</span><span style="--0:#7FDBCA;--1:#097174">message</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#7FDBCA;--1:#097174">user</span><span style="--0:#DD6B68;--1:#B73936">}</span><span style="--0:#ECC48D;--1:#3C63B3"> said</span><span style="--0:#D6DEEB;--1:#403F53">`</span><span style="--0:#D6DEEB;--1:#403F53">, </span><span style="--0:#7FDBCA;--1:#097174">message</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#7FDBCA;--1:#097174">content</span><span style="--0:#D6DEEB;--1:#403F53">)</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">7</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">},</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">8</div></div><div class="code"><span style="--0:#D6DEEB;--1:#403F53">});</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="import { eventModule, EventType } from &#x22;@sern/handler&#x22;;export default eventModule({ type: EventType.Discord, execute: async (message) => { console.log(&#x60;${message.user} said&#x60;, message.content) },});"><div></div></button></div></figure></div>
<aside aria-label="Tip" class="starlight-aside starlight-aside--tip"><p class="starlight-aside__title" aria-hidden="true"><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" class="starlight-aside__icon"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.43909 8.85483L1.44039 8.85354L4.96668 5.33815C5.30653 4.99386 5.7685 4.79662 6.2524 4.78972L6.26553 4.78963L12.9014 4.78962L13.8479 3.84308C16.9187 0.772319 20.0546 0.770617 21.4678 0.975145C21.8617 1.02914 22.2271 1.21053 22.5083 1.4917C22.7894 1.77284 22.9708 2.13821 23.0248 2.53199C23.2294 3.94517 23.2278 7.08119 20.1569 10.1521L19.2107 11.0983V17.7338L19.2106 17.7469C19.2037 18.2308 19.0067 18.6933 18.6624 19.0331L15.1456 22.5608C14.9095 22.7966 14.6137 22.964 14.29 23.0449C13.9663 23.1259 13.6267 23.1174 13.3074 23.0204C12.9881 22.9235 12.7011 22.7417 12.4771 22.4944C12.2533 22.2473 12.1006 21.9441 12.0355 21.6171L11.1783 17.3417L6.65869 12.822L4.34847 12.3589L2.38351 11.965C2.05664 11.8998 1.75272 11.747 1.50564 11.5232C1.25835 11.2992 1.07653 11.0122 0.979561 10.6929C0.882595 10.3736 0.874125 10.034 0.955057 9.7103C1.03599 9.38659 1.20328 9.09092 1.43909 8.85483ZM6.8186 10.8724L2.94619 10.096L6.32006 6.73268H10.9583L6.8186 10.8724ZM15.2219 5.21703C17.681 2.75787 20.0783 2.75376 21.1124 2.8876C21.2462 3.92172 21.2421 6.31895 18.783 8.77812L12.0728 15.4883L8.51172 11.9272L15.2219 5.21703ZM13.9042 21.0538L13.1279 17.1811L17.2676 13.0414V17.68L13.9042 21.0538Z"></path><path d="M9.31827 18.3446C9.45046 17.8529 9.17864 17.3369 8.68945 17.1724C8.56178 17.1294 8.43145 17.1145 8.30512 17.1243C8.10513 17.1398 7.91519 17.2172 7.76181 17.3434C7.62613 17.455 7.51905 17.6048 7.45893 17.7835C6.97634 19.2186 5.77062 19.9878 4.52406 20.4029C4.08525 20.549 3.6605 20.644 3.29471 20.7053C3.35607 20.3395 3.45098 19.9148 3.59711 19.476C4.01221 18.2294 4.78141 17.0237 6.21648 16.5411C6.39528 16.481 6.54504 16.3739 6.65665 16.2382C6.85126 16.0016 6.92988 15.678 6.84417 15.3647C6.83922 15.3466 6.83373 15.3286 6.82767 15.3106C6.74106 15.053 6.55701 14.8557 6.33037 14.7459C6.10949 14.6389 5.84816 14.615 5.59715 14.6994C5.47743 14.7397 5.36103 14.7831 5.24786 14.8294C3.22626 15.6569 2.2347 17.4173 1.75357 18.8621C1.49662 19.6337 1.36993 20.3554 1.30679 20.8818C1.27505 21.1464 1.25893 21.3654 1.25072 21.5213C1.24662 21.5993 1.24448 21.6618 1.24337 21.7066L1.243 21.7226L1.24235 21.7605L1.2422 21.7771L1.24217 21.7827L1.24217 21.7856C1.24217 22.3221 1.67703 22.7579 2.2137 22.7579L2.2155 22.7579L2.22337 22.7578L2.23956 22.7577C2.25293 22.7575 2.27096 22.7572 2.29338 22.7567C2.33821 22.7555 2.40073 22.7534 2.47876 22.7493C2.63466 22.7411 2.85361 22.725 3.11822 22.6932C3.64462 22.6301 4.36636 22.5034 5.13797 22.2464C6.58274 21.7653 8.3431 20.7738 9.17063 18.7522C9.21696 18.639 9.26037 18.5226 9.30064 18.4029C9.30716 18.3835 9.31304 18.364 9.31827 18.3446Z"></path></svg>Tip</p><section class="starlight-aside__content"><p>Typescript users can use <code dir="auto">discordEvent</code>, a specialized eventModule with typings for discord.js events.</p></section></aside> </div> <footer class="astro-3yyafb3n"> <div class="meta sl-flex astro-3yyafb3n"> <a href="https://github.com/sern-handler/website/edit/main/src/content/docs/v4/reference/modules.mdx" class="sl-flex astro-eez2twj6"><svg aria-hidden="true" class="astro-eez2twj6 astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg> Edit page</a> <p>Last updated: <time datetime="2025-06-28T14:47:43.000Z">Jun 28, 2025</time></p> </div> <div class="pagination-links astro-u2l5gyhi" dir="ltr"> <a href="/v4/reference/project-layout/" rel="prev" class="astro-u2l5gyhi"> <svg aria-hidden="true" class="astro-u2l5gyhi astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg> <span class="astro-u2l5gyhi"> Previous <br class="astro-u2l5gyhi"> <span class="link-title astro-u2l5gyhi">Project Layout</span> </span> </a> <a href="/v4/reference/plugins/" rel="next" class="astro-u2l5gyhi"> <svg aria-hidden="true" class="astro-u2l5gyhi astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg> <span class="astro-u2l5gyhi"> Next <br class="astro-u2l5gyhi"> <span class="link-title astro-u2l5gyhi">Plugins</span> </span> </a> </div> </footer> </div> </div> </main> </div> </div> </div> </div> </body></html>