This commit is contained in:
github-actions[bot]
2024-03-15 16:10:34 +00:00
parent 655130e7cf
commit 0a60209635
137 changed files with 531 additions and 484 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[2639],{5680:(e,t,r)=>{r.d(t,{xA:()=>p,yg:()=>f});var n=r(6540);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},p=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(r),g=i,f=u["".concat(s,".").concat(g)]||u[g]||d[g]||o;return r?n.createElement(f,a(a({ref:t},p),{},{components:r})):n.createElement(f,a({ref:t},p))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,a=new Array(o);a[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:i,a[1]=l;for(var c=2;c<o;c++)a[c]=r[c];return n.createElement.apply(null,a)}return n.createElement.apply(null,r)}g.displayName="MDXCreateElement"},4873:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var n=r(8168),i=(r(6540),r(5680));const o={sidebar_position:3},a="transition from v2 to v3",l={unversionedId:"guide/walkthrough/transition",id:"guide/walkthrough/transition",title:"transition from v2 to v3",description:"v3 comes with the new Service api. To make sure to enable intellisense",source:"@site/docs/guide/walkthrough/transition.md",sourceDirName:"guide/walkthrough",slug:"/guide/walkthrough/transition",permalink:"/docs/guide/walkthrough/transition",draft:!1,editUrl:"https://github.com/sern-handler/website/edit/main/docs/guide/walkthrough/transition.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"CLI",permalink:"/docs/guide/walkthrough/cli"},next:{title:"First Command",permalink:"/docs/guide/walkthrough/first-command"}},s={},c=[],p={toc:c},u="wrapper";function d(e){let{components:t,...o}=e;return(0,i.yg)(u,(0,n.A)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,i.yg)("h1",{id:"transition-from-v2-to-v3"},"transition from v2 to v3"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-diff",metastring:'title="src/index.ts"',title:'"src/index.ts"'},"- Sern.makeDependencies({ build: () => {} })\n+ await makeDependencies({ build: () => {} })\n")),(0,i.yg)("p",null,"v3 comes with the new ",(0,i.yg)("a",{parentName:"p",href:"../walkthrough/services"},"Service api"),". To make sure to enable intellisense\ninclude a dependencies.d.ts file into compilation. ",(0,i.yg)("a",{parentName:"p",href:"../../../blog/3.0.0"},"Click here for all new features")),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-ts"},"/**\n * This file serves as intellisense for sern projects.\n * Types are declared here for dependencies to function properly\n * Service(s) api rely on this file to provide a better developer experience.\n */\n\nimport { SernEmitter, Logging, CoreModuleStore, ModuleManager, ErrorHandling, CoreDependencies, Singleton } from '@sern/handler'\nimport { Client } from 'discord.js'\n\ndeclare global {\n interface Dependencies extends CoreDependencies {\n '@sern/client': Singleton<Client>\n }\n}\n\nexport {}\n\n")),(0,i.yg)("p",null,"A standard project file tree: ",(0,i.yg)("br",null)),(0,i.yg)("p",null,(0,i.yg)("img",{alt:"file tree",src:r(1256).A,width:"314",height:"311"})))}d.isMDXComponent=!0},1256:(e,t,r)=>{r.d(t,{A:()=>n});const n=r.p+"assets/images/fs-1675f5c97d48bdee5c5937e7a51a9489.png"}}]);
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[2639],{5680:(e,t,r)=>{r.d(t,{xA:()=>p,yg:()=>f});var n=r(6540);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},p=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(r),g=i,f=u["".concat(s,".").concat(g)]||u[g]||d[g]||o;return r?n.createElement(f,a(a({ref:t},p),{},{components:r})):n.createElement(f,a({ref:t},p))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,a=new Array(o);a[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:i,a[1]=l;for(var c=2;c<o;c++)a[c]=r[c];return n.createElement.apply(null,a)}return n.createElement.apply(null,r)}g.displayName="MDXCreateElement"},4873:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var n=r(8168),i=(r(6540),r(5680));const o={sidebar_position:3},a="Transition from v2 to v3",l={unversionedId:"guide/walkthrough/transition",id:"guide/walkthrough/transition",title:"Transition from v2 to v3",description:"v3 comes with the new Service api. To make sure to enable intellisense",source:"@site/docs/guide/walkthrough/transition.md",sourceDirName:"guide/walkthrough",slug:"/guide/walkthrough/transition",permalink:"/docs/guide/walkthrough/transition",draft:!1,editUrl:"https://github.com/sern-handler/website/edit/main/docs/guide/walkthrough/transition.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"CLI",permalink:"/docs/guide/walkthrough/cli"},next:{title:"First Command",permalink:"/docs/guide/walkthrough/first-command"}},s={},c=[],p={toc:c},u="wrapper";function d(e){let{components:t,...o}=e;return(0,i.yg)(u,(0,n.A)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,i.yg)("h1",{id:"transition-from-v2-to-v3"},"Transition from v2 to v3"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-diff",metastring:'title="src/index.ts"',title:'"src/index.ts"'},"- Sern.makeDependencies({ build: () => {} })\n+ await makeDependencies({ build: () => {} })\n")),(0,i.yg)("p",null,"v3 comes with the new ",(0,i.yg)("a",{parentName:"p",href:"../walkthrough/services"},"Service api"),". To make sure to enable intellisense\ninclude a dependencies.d.ts file into compilation. ",(0,i.yg)("a",{parentName:"p",href:"../../../blog/3.0.0"},"Click here for all new features")),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-ts"},"/**\n * This file serves as intellisense for sern projects.\n * Types are declared here for dependencies to function properly\n * Service(s) api rely on this file to provide a better developer experience.\n */\n\nimport { SernEmitter, Logging, CoreModuleStore, ModuleManager, ErrorHandling, CoreDependencies, Singleton } from '@sern/handler'\nimport { Client } from 'discord.js'\n\ndeclare global {\n interface Dependencies extends CoreDependencies {\n '@sern/client': Singleton<Client>\n }\n}\n\nexport {}\n\n")),(0,i.yg)("p",null,"A standard project file tree: ",(0,i.yg)("br",null)),(0,i.yg)("p",null,(0,i.yg)("img",{alt:"file tree",src:r(1256).A,width:"314",height:"311"})))}d.isMDXComponent=!0},1256:(e,t,r)=>{r.d(t,{A:()=>n});const n=r.p+"assets/images/fs-1675f5c97d48bdee5c5937e7a51a9489.png"}}]);

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[8312],{5680:(e,t,r)=>{r.d(t,{xA:()=>p,yg:()=>d});var n=r(6540);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var u=n.createContext({}),s=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(u.Provider,{value:t},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},y=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,u=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=s(r),y=o,d=c["".concat(u,".").concat(y)]||c[y]||g[y]||i;return r?n.createElement(d,a(a({ref:t},p),{},{components:r})):n.createElement(d,a({ref:t},p))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[0]=y;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l[c]="string"==typeof e?e:o,a[1]=l;for(var s=2;s<i;s++)a[s]=r[s];return n.createElement.apply(null,a)}return n.createElement.apply(null,r)}y.displayName="MDXCreateElement"},9002:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>a,default:()=>g,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var n=r(8168),o=(r(6540),r(5680));const i={sidebar_position:2},a="CLI",l={unversionedId:"guide/walkthrough/cli",id:"guide/walkthrough/cli",title:"CLI",description:"Setting up the CLI is easy.",source:"@site/docs/guide/walkthrough/cli.md",sourceDirName:"guide/walkthrough",slug:"/guide/walkthrough/cli",permalink:"/docs/guide/walkthrough/cli",draft:!1,editUrl:"https://github.com/sern-handler/website/edit/main/docs/guide/walkthrough/cli.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Create a new project",permalink:"/docs/guide/walkthrough/new-project"},next:{title:"transition from v2 to v3",permalink:"/docs/guide/walkthrough/transition"}},u={},s=[],p={toc:s},c="wrapper";function g(e){let{components:t,...r}=e;return(0,o.yg)(c,(0,n.A)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.yg)("h1",{id:"cli"},"CLI"),(0,o.yg)("p",null,"Setting up the ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/sern-handler/cli"},"CLI")," is easy. ",(0,o.yg)("br",null),"\nThe cli is your plug to the sern ecosystem. This will allow you to install plugins with ease, install extra utilities, and much more.\nIf you haven't yet: "),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-sh"},"npm install -g @sern/cli\n")),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"To install ",(0,o.yg)("a",{parentName:"li",href:"/docs/guide/walkthrough/plugins"},"plugins")," maintained by the community ",(0,o.yg)("a",{parentName:"li",href:"https://github.com/sern-handler/awesome-plugins"},"repository"),",")),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre"},"sern plugins\n")),(0,o.yg)("admonition",{type:"info"},(0,o.yg)("p",{parentName:"admonition"},"Make sure to have a correct ",(0,o.yg)("a",{parentName:"p",href:"/docs/guide/walkthrough/good-to-know#sernconfigjson"},"sern.config.json"))),(0,o.yg)("p",null,"This will display a menu selection of all installable plugins. ",(0,o.yg)("br",null)),(0,o.yg)("p",null,(0,o.yg)("strong",{parentName:"p"},"Note"),": You must have a ",(0,o.yg)("a",{parentName:"p",href:"/docs/guide/walkthrough/good-to-know"},"sern.config.json")," to use this command.\nIf you want to view plugins, visit the repository linked above."),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"To install extra utilities into your project")),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre"},"sern extra\n")),(0,o.yg)("p",null,"We have a more in depth ",(0,o.yg)("a",{parentName:"p",href:"/docs/cli/"},"guide")," of the CLI"))}g.isMDXComponent=!0}}]);
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[8312],{5680:(e,t,r)=>{r.d(t,{xA:()=>p,yg:()=>d});var n=r(6540);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var u=n.createContext({}),s=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(u.Provider,{value:t},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},y=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,u=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),c=s(r),y=o,d=c["".concat(u,".").concat(y)]||c[y]||g[y]||i;return r?n.createElement(d,a(a({ref:t},p),{},{components:r})):n.createElement(d,a({ref:t},p))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[0]=y;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l[c]="string"==typeof e?e:o,a[1]=l;for(var s=2;s<i;s++)a[s]=r[s];return n.createElement.apply(null,a)}return n.createElement.apply(null,r)}y.displayName="MDXCreateElement"},9002:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>a,default:()=>g,frontMatter:()=>i,metadata:()=>l,toc:()=>s});var n=r(8168),o=(r(6540),r(5680));const i={sidebar_position:2},a="CLI",l={unversionedId:"guide/walkthrough/cli",id:"guide/walkthrough/cli",title:"CLI",description:"Setting up the CLI is easy.",source:"@site/docs/guide/walkthrough/cli.md",sourceDirName:"guide/walkthrough",slug:"/guide/walkthrough/cli",permalink:"/docs/guide/walkthrough/cli",draft:!1,editUrl:"https://github.com/sern-handler/website/edit/main/docs/guide/walkthrough/cli.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"tutorialSidebar",previous:{title:"Create a new project",permalink:"/docs/guide/walkthrough/new-project"},next:{title:"Transition from v2 to v3",permalink:"/docs/guide/walkthrough/transition"}},u={},s=[],p={toc:s},c="wrapper";function g(e){let{components:t,...r}=e;return(0,o.yg)(c,(0,n.A)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.yg)("h1",{id:"cli"},"CLI"),(0,o.yg)("p",null,"Setting up the ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/sern-handler/cli"},"CLI")," is easy. ",(0,o.yg)("br",null),"\nThe cli is your plug to the sern ecosystem. This will allow you to install plugins with ease, install extra utilities, and much more.\nIf you haven't yet: "),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-sh"},"npm install -g @sern/cli\n")),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"To install ",(0,o.yg)("a",{parentName:"li",href:"/docs/guide/walkthrough/plugins"},"plugins")," maintained by the community ",(0,o.yg)("a",{parentName:"li",href:"https://github.com/sern-handler/awesome-plugins"},"repository"),",")),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre"},"sern plugins\n")),(0,o.yg)("admonition",{type:"info"},(0,o.yg)("p",{parentName:"admonition"},"Make sure to have a correct ",(0,o.yg)("a",{parentName:"p",href:"/docs/guide/walkthrough/good-to-know#sernconfigjson"},"sern.config.json"))),(0,o.yg)("p",null,"This will display a menu selection of all installable plugins. ",(0,o.yg)("br",null)),(0,o.yg)("p",null,(0,o.yg)("strong",{parentName:"p"},"Note"),": You must have a ",(0,o.yg)("a",{parentName:"p",href:"/docs/guide/walkthrough/good-to-know"},"sern.config.json")," to use this command.\nIf you want to view plugins, visit the repository linked above."),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"To install extra utilities into your project")),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre"},"sern extra\n")),(0,o.yg)("p",null,"We have a more in depth ",(0,o.yg)("a",{parentName:"p",href:"/docs/cli/"},"guide")," of the CLI"))}g.isMDXComponent=!0}}]);

View File

@@ -1 +1 @@
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[9934],{2705:e=>{e.exports=JSON.parse('{"label":"guides","permalink":"/blog/tags/guides","allTagsPath":"/blog/tags","count":1}')}}]);
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[9934],{2705:e=>{e.exports=JSON.parse('{"label":"guides","permalink":"/blog/tags/guides","allTagsPath":"/blog/tags","count":2}')}}]);

View File

@@ -1 +1 @@
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[5938],{5680:(e,t,n)=>{n.d(t,{xA:()=>p,yg:()=>h});var r=n(6540);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=s(n),d=o,h=u["".concat(l,".").concat(d)]||u[d]||m[d]||a;return n?r.createElement(h,i(i({ref:t},p),{},{components:n})):r.createElement(h,i({ref:t},p))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:o,i[1]=c;for(var s=2;s<a;s++)i[s]=n[s];return r.createElement.apply(null,i)}return r.createElement.apply(null,n)}d.displayName="MDXCreateElement"},7722:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>c,toc:()=>s});var r=n(8168),o=(n(6540),n(5680));const a={sidebar_position:7},i="Autocomplete",c={unversionedId:"guide/walkthrough/autocomplete",id:"guide/walkthrough/autocomplete",title:"Autocomplete",description:"Autocomplete is a special interaction where it can happen on multiple options on a single command. We've handled this with a simple",source:"@site/docs/guide/walkthrough/autocomplete.md",sourceDirName:"guide/walkthrough",slug:"/guide/walkthrough/autocomplete",permalink:"/docs/guide/walkthrough/autocomplete",draft:!1,editUrl:"https://github.com/sern-handler/website/edit/main/docs/guide/walkthrough/autocomplete.md",tags:[],version:"current",sidebarPosition:7,frontMatter:{sidebar_position:7},sidebar:"tutorialSidebar",previous:{title:"Services",permalink:"/docs/guide/walkthrough/services"},next:{title:"dependency-injection",permalink:"/docs/guide/walkthrough/dependency-injection"}},l={},s=[{value:"Example",id:"example",level:2}],p={toc:s},u="wrapper";function m(e){let{components:t,...n}=e;return(0,o.yg)(u,(0,r.A)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,o.yg)("h1",{id:"autocomplete"},"Autocomplete"),(0,o.yg)("p",null,"Autocomplete is a special interaction where it can happen on multiple options on a single command. We've handled this with a simple\ntree search algorithm in a nested options tree. "),(0,o.yg)("h2",{id:"example"},"Example"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-ts",metastring:'title="src/commands/cheese.ts" {11-18}',title:'"src/commands/cheese.ts"',"{11-18}":!0},"export default commandModule({ \n type: CommandType.Slash,\n description: \"show me cheese\",\n options: [\n { \n name: \"list\",\n type: ApplicationCommandOptionType.String,\n description: \"pick a cheese to show\",\n required: true,\n autocomplete: true,\n command: {\n onEvent: [],\n execute: (ctx) => {\n const focus = ctx.options.getFocused();\n ctx.respond(['gouda', 'parmesan', 'harvati']\n .map((cheese) => ({ name: cheese, value: cheese })));\n }\n }\n }\n ],\n execute: (ctx, [, args]) => {\n const cheese = args.getString('list', true); \n ctx.reply('selected cheese');\n }\n})\n\n\n")),(0,o.yg)("p",null,"Sern will handle autocomplete interactions at arbitrary depths and subcommand levels."))}m.isMDXComponent=!0}}]);
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[5938],{5680:(e,t,n)=>{n.d(t,{xA:()=>p,yg:()=>h});var r=n(6540);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),s=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=s(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),u=s(n),d=o,h=u["".concat(l,".").concat(d)]||u[d]||m[d]||a;return n?r.createElement(h,i(i({ref:t},p),{},{components:n})):r.createElement(h,i({ref:t},p))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:o,i[1]=c;for(var s=2;s<a;s++)i[s]=n[s];return r.createElement.apply(null,i)}return r.createElement.apply(null,n)}d.displayName="MDXCreateElement"},7722:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>m,frontMatter:()=>a,metadata:()=>c,toc:()=>s});var r=n(8168),o=(n(6540),n(5680));const a={sidebar_position:7},i="Autocomplete",c={unversionedId:"guide/walkthrough/autocomplete",id:"guide/walkthrough/autocomplete",title:"Autocomplete",description:"Autocomplete is a special interaction where it can happen on multiple options on a single command. We've handled this with a simple",source:"@site/docs/guide/walkthrough/autocomplete.md",sourceDirName:"guide/walkthrough",slug:"/guide/walkthrough/autocomplete",permalink:"/docs/guide/walkthrough/autocomplete",draft:!1,editUrl:"https://github.com/sern-handler/website/edit/main/docs/guide/walkthrough/autocomplete.md",tags:[],version:"current",sidebarPosition:7,frontMatter:{sidebar_position:7},sidebar:"tutorialSidebar",previous:{title:"Services",permalink:"/docs/guide/walkthrough/services"},next:{title:"Dependency Injection",permalink:"/docs/guide/walkthrough/dependency-injection"}},l={},s=[{value:"Example",id:"example",level:2}],p={toc:s},u="wrapper";function m(e){let{components:t,...n}=e;return(0,o.yg)(u,(0,r.A)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,o.yg)("h1",{id:"autocomplete"},"Autocomplete"),(0,o.yg)("p",null,"Autocomplete is a special interaction where it can happen on multiple options on a single command. We've handled this with a simple\ntree search algorithm in a nested options tree. "),(0,o.yg)("h2",{id:"example"},"Example"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-ts",metastring:'title="src/commands/cheese.ts" {11-18}',title:'"src/commands/cheese.ts"',"{11-18}":!0},"export default commandModule({ \n type: CommandType.Slash,\n description: \"show me cheese\",\n options: [\n { \n name: \"list\",\n type: ApplicationCommandOptionType.String,\n description: \"pick a cheese to show\",\n required: true,\n autocomplete: true,\n command: {\n onEvent: [],\n execute: (ctx) => {\n const focus = ctx.options.getFocused();\n ctx.respond(['gouda', 'parmesan', 'harvati']\n .map((cheese) => ({ name: cheese, value: cheese })));\n }\n }\n }\n ],\n execute: (ctx, [, args]) => {\n const cheese = args.getString('list', true); \n ctx.reply('selected cheese');\n }\n})\n\n\n")),(0,o.yg)("p",null,"Sern will handle autocomplete interactions at arbitrary depths and subcommand levels."))}m.isMDXComponent=!0}}]);

View File

@@ -0,0 +1 @@
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[7472],{5513:e=>{e.exports=JSON.parse('{"title":"Recent posts","items":[{"title":"Deploying sern with Railway","permalink":"/blog/railway-deploy"},{"title":"New logo!","permalink":"/blog/newlogo"},{"title":"Release 3.0.0","permalink":"/blog/3.0.0"},{"title":"Release 2.5.0","permalink":"/blog/2.5.0"},{"title":"Release 2.0.0","permalink":"/blog/2.0.0"},{"title":"How to get started with sern!","permalink":"/blog/getting-started"},{"title":"Release 1.2.0","permalink":"/blog/1.2.0"}]}')}}]);

View File

@@ -1 +0,0 @@
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[7472],{5513:e=>{e.exports=JSON.parse('{"title":"Recent posts","items":[{"title":"New logo!","permalink":"/blog/newlogo"},{"title":"Release 3.0.0","permalink":"/blog/3.0.0"},{"title":"Release 2.5.0","permalink":"/blog/2.5.0"},{"title":"Release 2.0.0","permalink":"/blog/2.0.0"},{"title":"How to get started with sern!","permalink":"/blog/getting-started"}]}')}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[9267],{8289:e=>{e.exports=JSON.parse('[{"label":"branding","permalink":"/blog/tags/branding","count":1},{"label":"release","permalink":"/blog/tags/release","count":4},{"label":"guides","permalink":"/blog/tags/guides","count":1}]')}}]);

View File

@@ -0,0 +1 @@
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[9267],{8289:e=>{e.exports=JSON.parse('[{"label":"guides","permalink":"/blog/tags/guides","count":2},{"label":"branding","permalink":"/blog/tags/branding","count":1},{"label":"release","permalink":"/blog/tags/release","count":4}]')}}]);

View File

@@ -1 +1 @@
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[1991],{9775:e=>{e.exports=JSON.parse('{"permalink":"/blog","page":1,"postsPerPage":10,"totalPages":1,"totalCount":6,"blogDescription":"Blog","blogTitle":"Blog"}')}}]);
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[1991],{9775:e=>{e.exports=JSON.parse('{"permalink":"/blog","page":1,"postsPerPage":10,"totalPages":1,"totalCount":7,"blogDescription":"Blog","blogTitle":"Blog"}')}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[152],{5680:(e,t,r)=>{r.d(t,{xA:()=>c,yg:()=>g});var n=r(6540);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var l=n.createContext({}),u=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},c=function(e){var t=u(e.components);return n.createElement(l.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(r),m=i,g=p["".concat(l,".").concat(m)]||p[m]||d[m]||o;return r?n.createElement(g,a(a({ref:t},c),{},{components:r})):n.createElement(g,a({ref:t},c))}));function g(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,a=new Array(o);a[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:i,a[1]=s;for(var u=2;u<o;u++)a[u]=r[u];return n.createElement.apply(null,a)}return n.createElement.apply(null,r)}m.displayName="MDXCreateElement"},8445:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>u});var n=r(8168),i=(r(6540),r(5680));const o={sidebar_position:8},a="The SernEmitter class",s={unversionedId:"guide/walkthrough/sern-emitter",id:"guide/walkthrough/sern-emitter",title:"The SernEmitter class",description:"You're shipped with the SernEmitter. This EventEmitter listens to",source:"@site/docs/guide/walkthrough/sern-emitter.md",sourceDirName:"guide/walkthrough",slug:"/guide/walkthrough/sern-emitter",permalink:"/docs/guide/walkthrough/sern-emitter",draft:!1,editUrl:"https://github.com/sern-handler/website/edit/main/docs/guide/walkthrough/sern-emitter.md",tags:[],version:"current",sidebarPosition:8,frontMatter:{sidebar_position:8},sidebar:"tutorialSidebar",previous:{title:"dependency-injection",permalink:"/docs/guide/walkthrough/dependency-injection"},next:{title:"Conclusion",permalink:"/docs/guide/walkthrough/conclusion"}},l={},u=[],c={toc:u},p="wrapper";function d(e){let{components:t,...r}=e;return(0,i.yg)(p,(0,n.A)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,i.yg)("h1",{id:"the-sernemitter-class"},"The SernEmitter class"),(0,i.yg)("p",null,"You're shipped with the SernEmitter. This EventEmitter listens to"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"command modules executing and its status, the ",(0,i.yg)("inlineCode",{parentName:"li"},"module.activate")," event"),(0,i.yg)("li",{parentName:"ul"},"command modules registered and its status, the ",(0,i.yg)("inlineCode",{parentName:"li"},"module.register")," event"),(0,i.yg)("li",{parentName:"ul"},"On default, sern creates a single SernEmitter for your bot process."),(0,i.yg)("li",{parentName:"ul"},"any error that occurs, the ",(0,i.yg)("inlineCode",{parentName:"li"},"error")," event"),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"warn")," events, where it is possible to throw errors")),(0,i.yg)("p",null,"You can put these and other event listeners into ",(0,i.yg)("a",{parentName:"p",href:"/docs/guide/walkthrough/first-event"},"event modules"),"! "),(0,i.yg)("br",null),"View all ",(0,i.yg)("a",{href:"https://sern.dev/docs/api/modules#serneventsmapping"},"events"))}d.isMDXComponent=!0}}]);
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[152],{5680:(e,t,r)=>{r.d(t,{xA:()=>c,yg:()=>g});var n=r(6540);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var l=n.createContext({}),u=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},c=function(e){var t=u(e.components);return n.createElement(l.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(r),m=i,g=p["".concat(l,".").concat(m)]||p[m]||d[m]||o;return r?n.createElement(g,a(a({ref:t},c),{},{components:r})):n.createElement(g,a({ref:t},c))}));function g(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,a=new Array(o);a[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:i,a[1]=s;for(var u=2;u<o;u++)a[u]=r[u];return n.createElement.apply(null,a)}return n.createElement.apply(null,r)}m.displayName="MDXCreateElement"},8445:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>s,toc:()=>u});var n=r(8168),i=(r(6540),r(5680));const o={sidebar_position:8},a="The SernEmitter class",s={unversionedId:"guide/walkthrough/sern-emitter",id:"guide/walkthrough/sern-emitter",title:"The SernEmitter class",description:"You're shipped with the SernEmitter. This EventEmitter listens to",source:"@site/docs/guide/walkthrough/sern-emitter.md",sourceDirName:"guide/walkthrough",slug:"/guide/walkthrough/sern-emitter",permalink:"/docs/guide/walkthrough/sern-emitter",draft:!1,editUrl:"https://github.com/sern-handler/website/edit/main/docs/guide/walkthrough/sern-emitter.md",tags:[],version:"current",sidebarPosition:8,frontMatter:{sidebar_position:8},sidebar:"tutorialSidebar",previous:{title:"Dependency Injection",permalink:"/docs/guide/walkthrough/dependency-injection"},next:{title:"Conclusion",permalink:"/docs/guide/walkthrough/conclusion"}},l={},u=[],c={toc:u},p="wrapper";function d(e){let{components:t,...r}=e;return(0,i.yg)(p,(0,n.A)({},c,r,{components:t,mdxType:"MDXLayout"}),(0,i.yg)("h1",{id:"the-sernemitter-class"},"The SernEmitter class"),(0,i.yg)("p",null,"You're shipped with the SernEmitter. This EventEmitter listens to"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"command modules executing and its status, the ",(0,i.yg)("inlineCode",{parentName:"li"},"module.activate")," event"),(0,i.yg)("li",{parentName:"ul"},"command modules registered and its status, the ",(0,i.yg)("inlineCode",{parentName:"li"},"module.register")," event"),(0,i.yg)("li",{parentName:"ul"},"On default, sern creates a single SernEmitter for your bot process."),(0,i.yg)("li",{parentName:"ul"},"any error that occurs, the ",(0,i.yg)("inlineCode",{parentName:"li"},"error")," event"),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"warn")," events, where it is possible to throw errors")),(0,i.yg)("p",null,"You can put these and other event listeners into ",(0,i.yg)("a",{parentName:"p",href:"/docs/guide/walkthrough/first-event"},"event modules"),"! "),(0,i.yg)("br",null),"View all ",(0,i.yg)("a",{href:"https://sern.dev/docs/api/modules#serneventsmapping"},"events"))}d.isMDXComponent=!0}}]);

View File

@@ -1 +1 @@
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[6570],{2800:e=>{e.exports=JSON.parse('{"permalink":"/blog/tags/guides","page":1,"postsPerPage":10,"totalPages":1,"totalCount":1,"blogDescription":"Blog","blogTitle":"Blog"}')}}]);
"use strict";(self.webpackChunk_sern_website=self.webpackChunk_sern_website||[]).push([[6570],{2800:e=>{e.exports=JSON.parse('{"permalink":"/blog/tags/guides","page":1,"postsPerPage":10,"totalPages":1,"totalCount":2,"blogDescription":"Blog","blogTitle":"Blog"}')}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -2,11 +2,24 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>https://sern.dev/blog</id>
<title>sern - Handlers. Redefined. Blog</title>
<updated>2023-07-04T00:00:00.000Z</updated>
<updated>2024-02-23T00:00:00.000Z</updated>
<generator>https://github.com/jpmonette/feed</generator>
<link rel="alternate" href="https://sern.dev/blog"/>
<subtitle>sern - Handlers. Redefined. Blog</subtitle>
<icon>https://sern.dev/img/favicon.ico</icon>
<entry>
<title type="html"><![CDATA[Deploying sern with Railway]]></title>
<id>https://sern.dev/blog/railway-deploy</id>
<link href="https://sern.dev/blog/railway-deploy"/>
<updated>2024-02-23T00:00:00.000Z</updated>
<summary type="html"><![CDATA[In this guide, I'll be showing you how to deploy your sern bot with Railway.]]></summary>
<content type="html"><![CDATA[<p>In this guide, I'll be showing you how to deploy your sern bot with <a href="https://railway.app/" target="_blank" rel="noopener noreferrer">Railway</a>.</p><p>This guide assumes you have a sern bot already set up and ready to deploy. If you don't, you can follow the <a href="/blog/getting-started">Getting Started</a> guide to set up your bot.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="github-repository">GitHub Repository<a href="#github-repository" class="hash-link" aria-label="Direct link to GitHub Repository" title="Direct link to GitHub Repository"></a></h2><p>The first thing you'll need to deploy your bot is a GitHub repository for your bot. If you don't have one, you can create one by following the <a href="https://docs.github.com/en/get-started/quickstart/create-a-repo" target="_blank" rel="noopener noreferrer">GitHub guide</a>.</p><p>Once you have your repository set up, you can push your bot's code to the repository, and you're ready to deploy using Railway.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="railway-setup">Railway Setup<a href="#railway-setup" class="hash-link" aria-label="Direct link to Railway Setup" title="Direct link to Railway Setup"></a></h2><p>After you have your bot's code in a GitHub repository, you'll need to create an account on Railway. You can sign up using your GitHub account at <a href="https://railway.app/" target="_blank" rel="noopener noreferrer">railway.app</a>.</p><p>Once you've created your account, navigate to the <a href="https://railway.app/dashboard" target="_blank" rel="noopener noreferrer">dashboard</a> and click the "New Project" button. Click the "Deploy from GitHub repo" button, and select your bot's repository.</p><p>Once you've selected your repository, click the "Add Variables" button to add your bot's environment variables. You'll need your environment variables from your <code>.env</code> file to add to Railway. (You can also add these later if you want.)</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="deploy">Deploy<a href="#deploy" class="hash-link" aria-label="Direct link to Deploy" title="Direct link to Deploy"></a></h2><p>Once you've added your environment variables, click the "Deploy" button, and Railway will start deploying your bot. Once the deployment is complete, you'll be able to see your bot's URL and logs.</p><div class="theme-admonition theme-admonition-note alert alert--secondary admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>note</div><div class="admonitionContent_S0QG"><p>Make sure you add your environment variables, and your node start script is correct in your <code>package.json</code> file.</p><p>If you have any issues deploying your bot, you can check the logs for any errors.</p></div></div><p>That's it! Your bot is now deployed and running on Railway. If you have any issues or questions, feel free to ask in the <a href="https://sern.dev/discord" target="_blank" rel="noopener noreferrer">sern Discord server</a>.</p>]]></content>
<author>
<name>Duro</name>
<uri>https://github.com/DuroCodes</uri>
</author>
<category label="guides" term="guides"/>
</entry>
<entry>
<title type="html"><![CDATA[New logo!]]></title>
<id>https://sern.dev/blog/newlogo</id>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

23
blog/railway-deploy.html Normal file

File diff suppressed because one or more lines are too long

View File

@@ -4,10 +4,19 @@
<title>sern - Handlers. Redefined. Blog</title>
<link>https://sern.dev/blog</link>
<description>sern - Handlers. Redefined. Blog</description>
<lastBuildDate>Tue, 04 Jul 2023 00:00:00 GMT</lastBuildDate>
<lastBuildDate>Fri, 23 Feb 2024 00:00:00 GMT</lastBuildDate>
<docs>https://validator.w3.org/feed/docs/rss2.html</docs>
<generator>https://github.com/jpmonette/feed</generator>
<language>en</language>
<item>
<title><![CDATA[Deploying sern with Railway]]></title>
<link>https://sern.dev/blog/railway-deploy</link>
<guid>https://sern.dev/blog/railway-deploy</guid>
<pubDate>Fri, 23 Feb 2024 00:00:00 GMT</pubDate>
<description><![CDATA[In this guide, I'll be showing you how to deploy your sern bot with Railway.]]></description>
<content:encoded><![CDATA[<p>In this guide, I'll be showing you how to deploy your sern bot with <a href="https://railway.app/" target="_blank" rel="noopener noreferrer">Railway</a>.</p><p>This guide assumes you have a sern bot already set up and ready to deploy. If you don't, you can follow the <a href="/blog/getting-started">Getting Started</a> guide to set up your bot.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="github-repository">GitHub Repository<a href="#github-repository" class="hash-link" aria-label="Direct link to GitHub Repository" title="Direct link to GitHub Repository"></a></h2><p>The first thing you'll need to deploy your bot is a GitHub repository for your bot. If you don't have one, you can create one by following the <a href="https://docs.github.com/en/get-started/quickstart/create-a-repo" target="_blank" rel="noopener noreferrer">GitHub guide</a>.</p><p>Once you have your repository set up, you can push your bot's code to the repository, and you're ready to deploy using Railway.</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="railway-setup">Railway Setup<a href="#railway-setup" class="hash-link" aria-label="Direct link to Railway Setup" title="Direct link to Railway Setup"></a></h2><p>After you have your bot's code in a GitHub repository, you'll need to create an account on Railway. You can sign up using your GitHub account at <a href="https://railway.app/" target="_blank" rel="noopener noreferrer">railway.app</a>.</p><p>Once you've created your account, navigate to the <a href="https://railway.app/dashboard" target="_blank" rel="noopener noreferrer">dashboard</a> and click the "New Project" button. Click the "Deploy from GitHub repo" button, and select your bot's repository.</p><p>Once you've selected your repository, click the "Add Variables" button to add your bot's environment variables. You'll need your environment variables from your <code>.env</code> file to add to Railway. (You can also add these later if you want.)</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="deploy">Deploy<a href="#deploy" class="hash-link" aria-label="Direct link to Deploy" title="Direct link to Deploy"></a></h2><p>Once you've added your environment variables, click the "Deploy" button, and Railway will start deploying your bot. Once the deployment is complete, you'll be able to see your bot's URL and logs.</p><div class="theme-admonition theme-admonition-note alert alert--secondary admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>note</div><div class="admonitionContent_S0QG"><p>Make sure you add your environment variables, and your node start script is correct in your <code>package.json</code> file.</p><p>If you have any issues deploying your bot, you can check the logs for any errors.</p></div></div><p>That's it! Your bot is now deployed and running on Railway. If you have any issues or questions, feel free to ask in the <a href="https://sern.dev/discord" target="_blank" rel="noopener noreferrer">sern Discord server</a>.</p>]]></content:encoded>
<category>guides</category>
</item>
<item>
<title><![CDATA[New logo!]]></title>
<link>https://sern.dev/blog/newlogo</link>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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