mirror of
https://github.com/sern-handler/website
synced 2026-06-25 17:22:23 +00:00
118 lines
89 KiB
HTML
118 lines
89 KiB
HTML
<!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>Build | sern</title><link rel="canonical"/><link rel="shortcut icon" href="/favicon.svg" type="image/svg+xml"/><meta name="generator" content="Astro v4.7.1"/><meta name="generator" content="Starlight v0.22.2"/><meta property="og:title" content="Build"/><meta property="og:type" content="article"/><meta property="og:url"/><meta property="og:locale" content="en"/><meta property="og:description"/><meta property="og:site_name" content="sern"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="Build"/><meta name="twitter:description"/> <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="http://localhost:4321/sern-logo.png"> <meta property="og:image:height" content="512"> <meta property="og:image:width" content="1024"> <meta name="theme-color" content="#F25186"> <meta name="keywords" content="discord, bot, handler, framework, documentation, sern"> <meta name="twitter:title" content="sern - Handlers. Redefined."> <meta name="twitter:description" content="A modular, customizable, fast Discord.js framework to streamline bot development"> <meta name="twitter:image" content="http://localhost:4321/sern-logo.png"> <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.C0lnCt1k.css">
|
||
<link rel="stylesheet" href="/_astro/Blog.BSQpZ4XK.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)}.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.BNyjdg2f.js"></script>
|
||
<script type="module" src="/_astro/page.BO5rBSqo.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> </div> <div class="sl-flex astro-kmkmnagf"> <sl-doc-search data-translations="{"placeholder":"Search","translations":{"button":{"buttonText":"Search","buttonAriaLabel":"Search"},"modal":{"searchBox":{},"startScreen":{},"errorScreen":{},"footer":{},"noResultsScreen":{}}}}"> <button type="button" class="DocSearch DocSearch-Button" aria-label="Search"> <span class="DocSearch-Button-Container"> <svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"> <path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path> </svg> <span class="DocSearch-Button-Placeholder">Search</span> </span> <span class="DocSearch-Button-Keys"></span> </button> </sl-doc-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> <div class="astro-e3sgix4a"> <a href="/guide/walkthrough/new-project" class="astro-e3sgix4a">Docs</a> </div> <div class="astro-e3sgix4a"> <a href="/plugins" class="astro-e3sgix4a">Plugins</a> </div> <div class="astro-e3sgix4a"> <a href="/sponsors" class="astro-e3sgix4a">Sponsors</a> </div> <div class="astro-p2efsdyb"> <a href="/blog" class="astro-p2efsdyb">Blog</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> </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"> <div class="md:sl-hidden astro-4f3f2ziw"><a href="/blog" class="astro-4f3f2ziw">Blog</a></div><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> </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="/api/namespaces/presence/functions/module/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">module</span> </a> </li><li class="astro-3ii7xxms"> <a href="/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="/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="/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="/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="/api/enumerations/commandtype/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CommandType</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/enumerations/eventtype/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">EventType</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/enumerations/payloadtype/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">PayloadType</span> </a> </li><li class="astro-3ii7xxms"> <a href="/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="/api/classes/context/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Context</span> </a> </li><li class="astro-3ii7xxms"> <a href="/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="/api/interfaces/bothcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">BothCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/buttoncommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ButtonCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/channelselectcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ChannelSelectCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/commandmoduledefs/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CommandModuleDefs</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/contextmenumsg/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ContextMenuMsg</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/contextmenuuser/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ContextMenuUser</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/controller/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Controller</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/controlplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ControlPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/coredependencies/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CoreDependencies</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/coremodulestore/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CoreModuleStore</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/discordeventcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">DiscordEventCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/disposable/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Disposable</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/emitter/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Emitter</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/errorhandling/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ErrorHandling</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/eventmoduledefs/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">EventModuleDefs</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/externaleventcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ExternalEventCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/init/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Init</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/initplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">InitPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/logging/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Logging</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/mentionableselectcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">MentionableSelectCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/modalsubmitcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">ModalSubmitCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/plugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Plugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/roleselectcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">RoleSelectCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/sernautocompletedata/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernAutocompleteData</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/serneventcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernEventCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/serneventsmapping/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernEventsMapping</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/sernsubcommanddata/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernSubCommandData</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/sernsubcommandgroupdata/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernSubCommandGroupData</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/slashcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SlashCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/stringselectcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">StringSelectCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/textcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">TextCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/interfaces/userselectcommand/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">UserSelectCommand</span> </a> </li><li class="astro-3ii7xxms"> <a href="/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="/api/type-aliases/anycommandplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">AnyCommandPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/type-aliases/anyeventplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">AnyEventPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/type-aliases/args/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Args</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/type-aliases/commandmodule/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CommandModule</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/type-aliases/eventmodule/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">EventModule</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/type-aliases/initializable/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Initializable</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/type-aliases/logpayload/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">LogPayload</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/type-aliases/payload/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Payload</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/type-aliases/pluginresult/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">PluginResult</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/type-aliases/sernoptionsdata/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SernOptionsData</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/type-aliases/singleton/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Singleton</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/type-aliases/slashoptions/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">SlashOptions</span> </a> </li><li class="astro-3ii7xxms"> <a href="/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="/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="/api/functions/commandcontrolplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CommandControlPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/functions/commandinitplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CommandInitPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/functions/commandmodule/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">commandModule</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/functions/discordevent/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">discordEvent</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/functions/discordeventcontrolplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">DiscordEventControlPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/functions/eventcontrolplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">EventControlPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/functions/eventinitplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">EventInitPlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/functions/eventmodule/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">eventModule</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/functions/makedependencies/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">makeDependencies</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/functions/makeplugin/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">makePlugin</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/functions/service/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Service</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/functions/services/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Services</span> </a> </li><li class="astro-3ii7xxms"> <a href="/api/functions/single/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">single</span> </a> </li><li class="astro-3ii7xxms"> <a href="/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="/cli/about/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">About the CLI</span> </a> </li><li class="astro-3ii7xxms"> <a href="/cli/build/" aria-current="page" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Build</span> </a> </li><li class="astro-3ii7xxms"> <a href="/cli/clear/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Clear</span> </a> </li><li class="astro-3ii7xxms"> <a href="/cli/extra/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Extra</span> </a> </li><li class="astro-3ii7xxms"> <a href="/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="/guide/getting-started/choose-ide/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Choosing an IDE</span> </a> </li><li class="astro-3ii7xxms"> <a href="/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="/guide/walkthrough/goal/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Goal</span> </a> </li><li class="astro-3ii7xxms"> <a href="/guide/walkthrough/new-project/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">New Project</span> </a> </li><li class="astro-3ii7xxms"> <a href="/guide/walkthrough/cli/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">CLI</span> </a> </li><li class="astro-3ii7xxms"> <a href="/guide/walkthrough/transition/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Transition from v2 to v3</span> </a> </li><li class="astro-3ii7xxms"> <a href="/guide/walkthrough/first-command/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">First Command</span> </a> </li><li class="astro-3ii7xxms"> <a href="/guide/walkthrough/first-event/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">First Event</span> </a> </li><li class="astro-3ii7xxms"> <a href="/guide/walkthrough/plugins/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Plugins</span> </a> </li><li class="astro-3ii7xxms"> <a href="/guide/walkthrough/services/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Services</span> </a> </li><li class="astro-3ii7xxms"> <a href="/guide/walkthrough/autocomplete/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Autocomplete</span> </a> </li><li class="astro-3ii7xxms"> <a href="/guide/walkthrough/dependency-injection/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Dependency Injection</span> </a> </li><li class="astro-3ii7xxms"> <a href="/guide/walkthrough/sern-emitter/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Sern Emitter</span> </a> </li><li class="astro-3ii7xxms"> <a href="/guide/walkthrough/conclusion/" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Conclusion</span> </a> </li><li class="astro-3ii7xxms"> <a href="/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> <div class="astro-e3sgix4a"> <a href="/guide/walkthrough/new-project" class="astro-e3sgix4a">Docs</a> </div> <div class="astro-e3sgix4a"> <a href="/plugins" class="astro-e3sgix4a">Plugins</a> </div> <div class="astro-e3sgix4a"> <a href="/sponsors" class="astro-e3sgix4a">Sponsors</a> </div> <div class="astro-p2efsdyb"> <a href="/blog" class="astro-p2efsdyb">Blog</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> </div> </div> </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="#guiding-principles" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Guiding Principles</span> </a> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#experimental-features" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Experimental Features</span> </a> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#features" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Features</span> </a> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#implicits" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Implicits</span> </a> <ul class="isMobile astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"> <a href="#sernbuildjs" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">sern.build.js</span> </a> </li> </ul> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#usage" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Usage</span> </a> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#adapting-older-projects" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Adapting older projects</span> </a> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#in-depth" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">In depth</span> </a> <ul class="isMobile astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"> <a href="#drop-labels" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">drop labels</span> </a> </li><li class="astro-g2bywc46" style="--depth: 1;"> <a href="#constants" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">constants</span> </a> </li><li class="astro-g2bywc46" style="--depth: 1;"> <a href="#processenv" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">process.env</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="#guiding-principles" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Guiding Principles</span> </a> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#experimental-features" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Experimental Features</span> </a> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#features" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Features</span> </a> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#implicits" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Implicits</span> </a> <ul class="astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"> <a href="#sernbuildjs" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">sern.build.js</span> </a> </li> </ul> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#usage" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Usage</span> </a> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#adapting-older-projects" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Adapting older projects</span> </a> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#in-depth" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">In depth</span> </a> <ul class="astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"> <a href="#drop-labels" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">drop labels</span> </a> </li><li class="astro-g2bywc46" style="--depth: 1;"> <a href="#constants" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">constants</span> </a> </li><li class="astro-g2bywc46" style="--depth: 1;"> <a href="#processenv" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">process.env</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">Build</h1> </div> </div> <div class="content-panel astro-7nkwcw3z"> <div class="sl-container astro-7nkwcw3z"> <div class="sl-markdown-content"> <div class="expressive-code"><link rel="stylesheet" href="/_astro/ec.nhq3f.css"/><script type="module" src="/_astro/ec.3zb7u.js"></script><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="sh"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3C63B3">Usage:</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3C63B3">sern</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3C63B3">build</span><span style="--0:#D6DEEB;--1:#403F53"> [options]</span></div></div><div class="ec-line"><div class="code">
|
||
</div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3C63B3">Build</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3C63B3">your</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3C63B3">bot</span></div></div><div class="ec-line"><div class="code">
|
||
</div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3C63B3">Options:</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3C63B3">-f</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3C63B3">--format</span><span style="--0:#D6DEEB;--1:#403F53"> [fmt] The module system of your application. </span><span style="--1:#3C63B3"><span style="--0:#ECC48D">`</span><span style="--0:#82AAFF">cjs</span><span style="--0:#ECC48D">`</span></span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3C63B3">or</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--1:#3C63B3"><span style="--0:#ECC48D">`</span><span style="--0:#82AAFF">esm</span><span style="--0:#ECC48D">`</span></span><span style="--0:#D6DEEB;--1:#403F53"> (</span><span style="--0:#82AAFF;--1:#3C63B3">default:</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">esm</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">)</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3C63B3">-m</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3C63B3">--mode</span><span style="--0:#D6DEEB;--1:#403F53"> [mode] the mode </span><span style="--0:#C792EA;--1:#8D46B4">for</span><span style="--0:#D6DEEB;--1:#403F53"> sern to build in. </span><span style="--1:#3C63B3"><span style="--0:#ECC48D">`</span><span style="--0:#82AAFF">production</span><span style="--0:#ECC48D">`</span></span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3C63B3">or</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--1:#3C63B3"><span style="--0:#ECC48D">`</span><span style="--0:#82AAFF">development</span><span style="--0:#ECC48D">`</span></span><span style="--0:#D6DEEB;--1:#403F53"> (</span><span style="--0:#82AAFF;--1:#3C63B3">default:</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">development</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">)</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3C63B3">-W</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3C63B3">--suppress-warnings</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3C63B3">suppress</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3C63B3">experimental</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3C63B3">warning</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3C63B3">-p</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3C63B3">--project</span><span style="--0:#D6DEEB;--1:#403F53"> [filePath] build with this sern.build file</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#82AAFF;--1:#3C63B3">-h,</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3C63B3">--help</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3C63B3">display</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3C63B3">help</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3C63B3">for</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3C63B3">command</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="Usage: sern build [options]Build your botOptions: -f --format [fmt] The module system of your application. `cjs` or `esm` (default: "esm") -m --mode [mode] the mode for sern to build in. `production` or `development` (default: "development") -W --suppress-warnings suppress experimental warning -p --project [filePath] build with this sern.build file -h, --help display help for command"><div></div></button></div></figure></div>
|
||
<h2 id="guiding-principles">Guiding Principles</h2>
|
||
<p>When designing the <code dir="auto">sern build</code> command, our aim was to make building bot applications as simple as possible for the majority of developers. The setup process has been streamlined, and most of the configuration details have been handled for you. Here are some key points to keep in mind:</p>
|
||
<ol>
|
||
<li>
|
||
<p><strong>Minimal Configuration</strong>: In the vast majority (99%) of use cases, developers do not need to configure the bot application building process. We believe that simplicity is key, so only a few decisions need to be made on the developer’s end.</p>
|
||
</li>
|
||
<li>
|
||
<p><strong>Optimal Defaults</strong>: We’ve chosen sensible defaults. This means you can get started without getting bogged down by complex, unneeded configurations.</p>
|
||
</li>
|
||
<li>
|
||
<p><strong>Finetuned for production bots</strong>: Our CLI leverages an opinionated build solution powered by esbuild. This ensures that bots are built without issues and can be shipped easily.</p>
|
||
</li>
|
||
</ol>
|
||
<h2 id="experimental-features">Experimental Features</h2>
|
||
<p>Both the <code dir="auto">sern build</code> and <code dir="auto">sern publish</code> commands are marked as experimental. While they might not be completely stable, they are designed to work for the majority of users. We appreciate any feedback in helping us make these features even better.</p>
|
||
<h2 id="features">Features</h2>
|
||
<p>The <code dir="auto">sern build</code> command comes equipped with a range of features designed to enhance your development process. Here’s a glimpse of what it offers:</p>
|
||
<ul>
|
||
<li>
|
||
<p><strong>esbuild Integration</strong>: our CLI takes inspiration from the efficiency of SvelteKit, ensuring your bot application is built effectively and with type safety. Leverage the <a href="https://github.com/esbuild/community-plugins">esbuild plugin ecosystem</a>.</p>
|
||
</li>
|
||
<li>
|
||
<p><strong>Zero Configuration</strong>: Building your bot application without additional configuration. The CLI handles most of the setup for you.</p>
|
||
</li>
|
||
<li>
|
||
<p><strong>Experimental Image Support</strong>: We’ve introduced experimental support for top-level imports of PNG and JPG files, making it easier to include images in your bot application.</p>
|
||
</li>
|
||
<li>
|
||
<p><strong>Compile Time Constants</strong>: Customize your build with constants such as <code dir="auto">__DEV__</code>, <code dir="auto">__PROD__</code>, allowing you to tailor your application to different production stages.</p>
|
||
</li>
|
||
<li>
|
||
<p><strong>Development and Production Modes</strong>: The CLI supports both development and production modes, enabling you to tailor your bot application for different stages of development.</p>
|
||
</li>
|
||
<li>
|
||
<p><strong>Type-safe <code dir="auto">process.env</code></strong>: The CLI generates a type-safe <code dir="auto">process.env</code>, reducing potential errors.</p>
|
||
</li>
|
||
</ul>
|
||
<h2 id="implicits">Implicits</h2>
|
||
<ul>
|
||
<li>command line arguments take precendence over sern.build configuration file</li>
|
||
<li>default build format is ESM</li>
|
||
<li>defineVersion = true</li>
|
||
<li><strong>DEV</strong> AND <strong>PROD</strong> constants are configured.</li>
|
||
<li>only a <a href="https://esbuild.github.io/content-types/#tsconfig-json">few tsconfig options</a> are respected.</li>
|
||
</ul>
|
||
<h3 id="sernbuildjs">sern.build.js</h3>
|
||
<ul>
|
||
<li>For any extra configuration you may need</li>
|
||
<li>the cli was intentionally made to be installed globally, and we can’t provide typings at a project level. If you need typings, here they are:</li>
|
||
</ul>
|
||
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></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">type</span><span style="--0:#D6DEEB;--1:#403F53"> BuildOptions </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">2</div></div><div class="code"><span class="indent"> </span><span style="--0:#809191;--1:#616671">/**</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">3</div></div><div class="code"><span class="indent"><span style="--0:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">* Define __VERSION__</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:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">* This option is a quick switch to defining the __VERSION__ constant which will be a string of the version provided in</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:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">* cwd's package.json</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:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">*/</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">defineVersion</span><span style="--0:#7FDBCA;--1:#097174">?:</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C5E478;--1:#3C63B3">boolean</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><span style="--0:#809191;--1:#616671">/**</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:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">* default = esm</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:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">*/</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:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">format</span><span style="--0:#7FDBCA;--1:#097174">?:</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">cjs</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#7FDBCA;--1:#097174">|</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">esm</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">12</div></div><div class="code"><span class="indent"> </span><span style="--0:#809191;--1:#616671">/**</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">13</div></div><div class="code"><span class="indent"><span style="--0:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">* extra esbuild plugins to build with sern.</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:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">*/</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">esbuildPlugins</span><span style="--0:#7FDBCA;--1:#097174">?:</span><span style="--0:#D6DEEB;--1:#403F53"> esbuild</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#FFCB8B;--1:#111111">Plugin</span><span style="--0:#D6DEEB;--1:#403F53">[];</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">16</div></div><div class="code"><span class="indent"> </span><span style="--0:#809191;--1:#616671">/**</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:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">* https://esbuild.github.io/api/#drop-labels</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">18</div></div><div class="code"><span class="indent"><span style="--0:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">**/</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">19</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">dropLabels</span><span style="--0:#7FDBCA;--1:#097174">?:</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C5E478;--1:#3C63B3">string</span><span style="--0:#D6DEEB;--1:#403F53">[];</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">20</div></div><div class="code"><span class="indent"> </span><span style="--0:#809191;--1:#616671">/**</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">21</div></div><div class="code"><span class="indent"><span style="--0:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">* https://esbuild.github.io/api/#define</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">22</div></div><div class="code"><span class="indent"><span style="--0:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">**/</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">23</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">define</span><span style="--0:#7FDBCA;--1:#097174">?:</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#FFCB8B;--1:#111111">Record</span><span style="--0:#D6DEEB;--1:#403F53"><</span><span style="--0:#C5E478;--1:#3C63B3">string</span><span style="--0:#D6DEEB;--1:#403F53">, </span><span style="--0:#C5E478;--1:#3C63B3">string</span><span style="--0:#D6DEEB;--1:#403F53">>;</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">24</div></div><div class="code"><span class="indent"> </span><span style="--0:#809191;--1:#616671">/**</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">25</div></div><div class="code"><span class="indent"><span style="--0:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">* Path to tsconfig</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">26</div></div><div class="code"><span class="indent"><span style="--0:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">**/</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">27</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">tsconfig</span><span style="--0:#7FDBCA;--1:#097174">?:</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C5E478;--1:#3C63B3">string</span><span style="--0:#D6DEEB;--1:#403F53">;</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">28</div></div><div class="code"><span class="indent"> </span><span style="--0:#809191;--1:#616671">/**</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">29</div></div><div class="code"><span class="indent"><span style="--0:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">* default = 'development'</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">30</div></div><div class="code"><span class="indent"><span style="--0:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">*/</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">31</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">mode</span><span style="--0:#7FDBCA;--1:#097174">:</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">production</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#7FDBCA;--1:#097174">|</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">development</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">32</div></div><div class="code"><span class="indent"> </span><span style="--0:#809191;--1:#616671">/**</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">33</div></div><div class="code"><span class="indent"><span style="--0:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">* will search for env file. If none exists,</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">34</div></div><div class="code"><span class="indent"><span style="--0:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">* default to .env.</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">35</div></div><div class="code"><span class="indent"><span style="--0:#809191;--1:#616671"> </span></span><span style="--0:#809191;--1:#616671">*/</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">36</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">env</span><span style="--0:#7FDBCA;--1:#097174">?:</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#C5E478;--1:#3C63B3">string</span><span style="--0:#D6DEEB;--1:#403F53">;</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">37</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="type BuildOptions = { /** * Define __VERSION__ * This option is a quick switch to defining the __VERSION__ constant which will be a string of the version provided in * cwd's package.json */ defineVersion?: boolean; /** * default = esm */ format?: "cjs" | "esm"; /** * extra esbuild plugins to build with sern. */ esbuildPlugins?: esbuild.Plugin[]; /** * https://esbuild.github.io/api/#drop-labels **/ dropLabels?: string[]; /** * https://esbuild.github.io/api/#define **/ define?: Record<string, string>; /** * Path to tsconfig **/ tsconfig?: string; /** * default = 'development' */ mode: "production" | "development"; /** * will search for env file. If none exists, * default to .env. */ env?: string;};"><div></div></button></div></figure></div>
|
||
<h2 id="usage">Usage</h2>
|
||
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">sern build</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="sern build"><div></div></button></div></figure></div>
|
||
<p>(that was easy)</p>
|
||
<h2 id="adapting-older-projects">Adapting older projects</h2>
|
||
<ul>
|
||
<li>Change your tsconfig.json to extend our generated one.</li>
|
||
</ul>
|
||
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="json"><code><div class="ec-line"><div class="code"><span style="--0:#D6DEEB;--1:#403F53">{</span></div></div><div class="ec-line highlight mark"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#086164">"extends"</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#C789D6;--1:#6b4a74">./.sern/tsconfig.json</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53">,</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#097174">"compilerOptions"</span><span style="--0:#D6DEEB;--1:#403F53">: {</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#809191;--1:#5E6578">// all of your old fields</span></div></div><div class="ec-line"><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="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="{ "extends": "./.sern/tsconfig.json", "compilerOptions": { // all of your old fields }}"><div></div></button></div></figure></div>
|
||
<h2 id="in-depth">In depth</h2>
|
||
<p>We use the <code dir="auto">define</code> and <code dir="auto">drop labels</code> api in C style macros to have easy development stage differences.
|
||
<a href="https://esbuild.github.io/api/#drop-labels">Here</a> is the esbuild full API documentation</p>
|
||
<h3 id="drop-labels">drop labels</h3>
|
||
<div class="expressive-code"><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="sh"><code><div class="ec-line"><div class="code"><span style="--0:#809191;--1:#616671"># mode is set to production</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3C63B3">sern</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3C63B3">build</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="sern build"><div></div></button></div></figure></div>
|
||
|
||
<starlight-tabs 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-0" id="tab-0" aria-selected="true" tabindex="0" class="astro-esqgolmp"> Input </a> </li><li role="presentation" class="tab astro-esqgolmp"> <a role="tab" href="#tab-panel-1" id="tab-1" aria-selected="false" tabindex="-1" class="astro-esqgolmp"> Running build for production </a> </li><li role="presentation" class="tab astro-esqgolmp"> <a role="tab" href="#tab-panel-2" id="tab-2" aria-selected="false" tabindex="-1" class="astro-esqgolmp"> Output </a> </li> </ul> </div> <section id="tab-panel-0" aria-labelledby="tab-0" role="tabpanel"> <div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></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:#D6DEEB;--1:#403F53">__DEV__: 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:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">This is for production only</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:#D6DEEB;--1:#403F53">__PROD__: 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:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">This is for either mode</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="__DEV__: console.log("This is for production only");__PROD__: console.log("This is for either mode");"><div></div></button></div></figure></div> </section><section id="tab-panel-1" aria-labelledby="tab-1" role="tabpanel" hidden> <div class="expressive-code"><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="sh"><code><div class="ec-line"><div class="code"><span style="--0:#809191;--1:#616671"># mode is set to production</span></div></div><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3C63B3">sern</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3C63B3">build</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="sern build"><div></div></button></div></figure></div> </section><section id="tab-panel-2" aria-labelledby="tab-2" role="tabpanel" hidden> <div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></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:#D6DEEB;--1:#403F53">__PROD__ 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:#D9F5DD;--1:#111111">'</span><span style="--0:#ECC48D;--1:#9B504E">This is for either mode</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="__PROD__ console.log('This is for either mode')"><div></div></button></div></figure></div> </section> </starlight-tabs>
|
||
<h3 id="constants">constants</h3>
|
||
<p>sern builds with three default constants. <code dir="auto">__DEV__</code>, <code dir="auto">__PROD__</code>, <code dir="auto">__VERSION__</code>.</p>
|
||
<starlight-tabs 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-5" id="tab-5" aria-selected="true" tabindex="0" class="astro-esqgolmp"> Preprocess </a> </li><li role="presentation" class="tab astro-esqgolmp"> <a role="tab" href="#tab-panel-6" id="tab-6" aria-selected="false" tabindex="-1" class="astro-esqgolmp"> Constants available and typesafe! </a> </li> </ul> </div> <section id="tab-panel-5" aria-labelledby="tab-5" role="tabpanel"> <div class="expressive-code"><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="sh"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3C63B3">sern</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3C63B3">build</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="sern build"><div></div></button></div></figure></div> </section><section id="tab-panel-6" aria-labelledby="tab-6" role="tabpanel" hidden> <div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></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">if</span><span style="--0:#D6DEEB;--1:#403F53"> (__PROD__) {</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">2</div></div><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">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:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#9B504E">Bot version: </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"> __VERSION__);</span></div></div><div class="ec-line"><div class="gutter"><div class="ln">3</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="if (__PROD__) { console.log("Bot version: " + __VERSION__);}"><div></div></button></div></figure></div> </section> </starlight-tabs>
|
||
<p>Full esbuild documentation <a href="https://esbuild.github.io/api/#define">here</a>
|
||
Add more to the <code dir="auto">define</code> field in build options (only availible with a <code dir="auto">sern.build</code> file at the moment.</p>
|
||
<h3 id="processenv">process.env</h3>
|
||
<p>We generate your process.env with <code dir="auto">dotenv</code> and generate typings for process.env. Less hassle!</p>
|
||
<starlight-tabs 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-3" id="tab-3" aria-selected="true" tabindex="0" class="astro-esqgolmp"> .env </a> </li><li role="presentation" class="tab astro-esqgolmp"> <a role="tab" href="#tab-panel-4" id="tab-4" aria-selected="false" tabindex="-1" class="astro-esqgolmp"> sern build </a> </li> </ul> </div> <section id="tab-panel-3" aria-labelledby="tab-3" role="tabpanel"> <div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="sh"><code><div class="ec-line"><div class="code"><span style="--0:#C5E478;--1:#3C63B3">DISCORD_TOKEN</span><span style="--0:#C792EA;--1:#8D46B4">=</span><span style="--0:#ECC48D;--1:#3C63B3"><your</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#82AAFF;--1:#3C63B3">token></span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="DISCORD_TOKEN=<your token>"><div></div></button></div></figure></div><div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></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:#D6DEEB;--1:#403F53">process</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#FAF39F;--1:#111111">env</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#82AAFF;--1:#3C63B3">DISCORD_TOKEN</span><span style="--0:#D6DEEB;--1:#403F53">; </span><span style="--0:#809191;--1:#5E6578">// string | undefined (not typesafe :()</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="process.env.DISCORD_TOKEN; // string | undefined (not typesafe :()"><div></div></button></div></figure></div> </section><section id="tab-panel-4" aria-labelledby="tab-4" role="tabpanel" hidden> <div class="expressive-code"><figure class="frame is-terminal not-content"><figcaption class="header"><span class="title"></span><span class="sr-only">Terminal window</span></figcaption><pre data-language="sh"><code><div class="ec-line"><div class="code"><span style="--0:#82AAFF;--1:#3C63B3">sern</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#ECC48D;--1:#3C63B3">build</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="sern build"><div></div></button></div></figure></div><div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></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:#D6DEEB;--1:#403F53">process</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#FAF39F;--1:#111111">env</span><span style="--0:#C792EA;--1:#8D46B4">.</span><span style="--0:#82AAFF;--1:#3C63B3">DISCORD_TOKEN</span><span style="--0:#D6DEEB;--1:#403F53">; </span><span style="--0:#809191;--1:#5E6578">// string (typesafe :))</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="process.env.DISCORD_TOKEN; // string (typesafe :))"><div></div></button></div></figure></div> </section> </starlight-tabs> </div> <footer class="astro-3yyafb3n"> <div class="meta sl-flex astro-3yyafb3n"> </div> <div class="pagination-links astro-u2l5gyhi" dir="ltr"> <a href="/cli/about/" 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">About the CLI</span> </span> </a> <a href="/cli/clear/" 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">Clear</span> </span> </a> </div> </footer> </div> </div> </main> </div> </div> </div> </div> </body></html> |