From 5f7771398ca7761925d55984bbecacefc723738c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Jul 2024 16:47:08 +0000 Subject: [PATCH] deploy: b4a95d374f5b4525c3bda470d42a2602b3089d69 --- 404.html | 2 +- assets/js/1ac1bfe9.0d260689.js | 1 - assets/js/1ac1bfe9.b9bc5d58.js | 1 + .../js/{runtime~main.15d9890c.js => runtime~main.cb353efb.js} | 2 +- blog.html | 2 +- blog/1.2.0.html | 2 +- blog/2.0.0.html | 2 +- blog/2.5.0.html | 2 +- blog/3.0.0.html | 2 +- blog/archive.html | 2 +- blog/getting-started.html | 2 +- blog/newlogo.html | 2 +- blog/railway-deploy.html | 2 +- blog/tags.html | 2 +- blog/tags/branding.html | 2 +- blog/tags/guides.html | 2 +- blog/tags/release.html | 2 +- docs/api.html | 2 +- docs/api/classes/CommandExecutable.html | 2 +- docs/api/classes/Context.html | 2 +- docs/api/classes/DefaultErrorHandling.html | 2 +- docs/api/classes/DefaultLogging.html | 2 +- docs/api/classes/DefaultModuleManager.html | 2 +- docs/api/classes/EventExecutable.html | 2 +- docs/api/classes/ModuleStore.html | 2 +- docs/api/classes/SernEmitter.html | 2 +- docs/api/enums/CommandType.html | 2 +- docs/api/enums/EventType.html | 2 +- docs/api/enums/PayloadType.html | 2 +- docs/api/enums/PluginType.html | 2 +- docs/api/enums/SernError.html | 2 +- docs/api/interfaces/AutocompleteCommand.html | 2 +- docs/api/interfaces/AutocompletePlugin.html | 2 +- docs/api/interfaces/BothCommand.html | 2 +- docs/api/interfaces/ButtonCommand.html | 2 +- docs/api/interfaces/ChannelSelectCommand.html | 2 +- docs/api/interfaces/CommandError.Response.html | 2 +- docs/api/interfaces/CommandModuleDefs.html | 2 +- docs/api/interfaces/CommandPlugin.html | 2 +- docs/api/interfaces/ContextMenuMsg.html | 2 +- docs/api/interfaces/ContextMenuUser.html | 2 +- docs/api/interfaces/ControlPlugin.html | 2 +- docs/api/interfaces/Controller.html | 2 +- docs/api/interfaces/CoreDependencies.html | 2 +- docs/api/interfaces/CoreModuleStore.html | 2 +- docs/api/interfaces/Dependencies.html | 2 +- docs/api/interfaces/DependencyConfiguration.html | 2 +- docs/api/interfaces/DiscordEmitterPlugin.html | 2 +- docs/api/interfaces/DiscordEventCommand.html | 2 +- docs/api/interfaces/DiscordEventPlugin.html | 2 +- docs/api/interfaces/Disposable.html | 2 +- docs/api/interfaces/Emitter.html | 2 +- docs/api/interfaces/ErrorHandling.html | 2 +- docs/api/interfaces/EventModuleDefs.html | 2 +- docs/api/interfaces/EventPlugin.html | 2 +- docs/api/interfaces/ExternalEmitterPlugin.html | 2 +- docs/api/interfaces/ExternalEventCommand.html | 2 +- docs/api/interfaces/ExternalEventPlugin.html | 2 +- docs/api/interfaces/Init.html | 2 +- docs/api/interfaces/InitArgs.html | 2 +- docs/api/interfaces/InitPlugin.html | 2 +- docs/api/interfaces/Logging.html | 2 +- docs/api/interfaces/MentionableSelectCommand.html | 2 +- docs/api/interfaces/ModalSubmitCommand.html | 2 +- docs/api/interfaces/Module.html | 2 +- docs/api/interfaces/ModuleManager.html | 2 +- docs/api/interfaces/Plugin.html | 2 +- docs/api/interfaces/Presence.Result.html | 2 +- docs/api/interfaces/RoleSelectCommand.html | 2 +- docs/api/interfaces/SernAutocompleteData.html | 2 +- docs/api/interfaces/SernEmitterPlugin.html | 2 +- docs/api/interfaces/SernEventCommand.html | 2 +- docs/api/interfaces/SernEventPlugin.html | 2 +- docs/api/interfaces/SernEventsMapping.html | 2 +- docs/api/interfaces/SernSubCommandData.html | 2 +- docs/api/interfaces/SernSubCommandGroupData.html | 2 +- docs/api/interfaces/SlashCommand.html | 2 +- docs/api/interfaces/StringSelectCommand.html | 2 +- docs/api/interfaces/TextCommand.html | 2 +- docs/api/interfaces/UserSelectCommand.html | 2 +- docs/api/interfaces/Wrapper.html | 2 +- docs/api/modules.html | 2 +- docs/api/namespaces/CommandError.html | 2 +- docs/api/namespaces/Presence.html | 2 +- docs/api/namespaces/Sern.html | 2 +- docs/cli.html | 2 +- docs/cli/build.html | 2 +- docs/cli/clear.html | 2 +- docs/cli/extra.html | 2 +- docs/cli/publish.html | 2 +- docs/guide.html | 2 +- docs/guide/getting-started/choose-ide.html | 2 +- docs/guide/getting-started/preparing.html | 2 +- docs/guide/walkthrough/autocomplete.html | 2 +- docs/guide/walkthrough/cli.html | 2 +- docs/guide/walkthrough/conclusion.html | 2 +- docs/guide/walkthrough/dependency-injection.html | 2 +- docs/guide/walkthrough/first-command.html | 2 +- docs/guide/walkthrough/first-event.html | 2 +- docs/guide/walkthrough/goal.html | 2 +- docs/guide/walkthrough/good-to-know.html | 2 +- docs/guide/walkthrough/new-project.html | 2 +- docs/guide/walkthrough/plugins.html | 4 ++-- docs/guide/walkthrough/sern-emitter.html | 2 +- docs/guide/walkthrough/services.html | 2 +- docs/guide/walkthrough/transition.html | 2 +- docs/intro.html | 2 +- index.html | 2 +- markdown-page.html | 2 +- plugins.html | 2 +- search.html | 2 +- sponsors.html | 2 +- 112 files changed, 112 insertions(+), 112 deletions(-) delete mode 100644 assets/js/1ac1bfe9.0d260689.js create mode 100644 assets/js/1ac1bfe9.b9bc5d58.js rename assets/js/{runtime~main.15d9890c.js => runtime~main.cb353efb.js} (99%) diff --git a/404.html b/404.html index 6f23a2737..8b558deeb 100644 --- a/404.html +++ b/404.html @@ -11,7 +11,7 @@ - +
diff --git a/assets/js/1ac1bfe9.0d260689.js b/assets/js/1ac1bfe9.0d260689.js deleted file mode 100644 index 4c2803c86..000000000 --- a/assets/js/1ac1bfe9.0d260689.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunksern_website=self.webpackChunksern_website||[]).push([[8811],{7348:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>t,metadata:()=>l,toc:()=>c});var s=i(4848),r=i(8453);const t={sidebar_position:6},o="Plugins",l={id:"guide/walkthrough/plugins",title:"Plugins",description:"TLDR: Plugins help reduce code repetition and are installable via sern plugins. Put them onto the plugins field of a command/event module.",source:"@site/docs/guide/walkthrough/plugins.md",sourceDirName:"guide/walkthrough",slug:"/guide/walkthrough/plugins",permalink:"/docs/guide/walkthrough/plugins",draft:!1,unlisted:!1,editUrl:"https://github.com/sern-handler/website/edit/main/docs/guide/walkthrough/plugins.md",tags:[],version:"current",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"tutorialSidebar",previous:{title:"First Event Module",permalink:"/docs/guide/walkthrough/first-event"},next:{title:"Services",permalink:"/docs/guide/walkthrough/services"}},d={},c=[{value:"Installing",id:"installing",level:2},{value:"\u2517|\uff40O\u2032|\u251b perfect, your first plugin!",id:"o-perfect-your-first-plugin",level:4},{value:"Creating your own plugins",id:"creating-your-own-plugins",level:2},{value:"The controller object",id:"the-controller-object",level:3},{value:"Init Plugins",id:"init-plugins",level:2},{value:"Event Plugins",id:"event-plugins",level:2}];function a(e){const n={admonition:"admonition",br:"br",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"plugins",children:"Plugins"}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["TLDR: Plugins help reduce code repetition and are installable via ",(0,s.jsx)(n.code,{children:"sern plugins"}),". Put them onto the plugins field of a command/event module."]})}),"\n",(0,s.jsx)(n.h2,{id:"installing",children:"Installing"}),"\n",(0,s.jsx)(n.p,{children:"Chances are, you just want your bot to work. Plugins can preprocess and create reusable conditions for modules."}),"\n",(0,s.jsx)(n.p,{children:"run:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:"sern plugins\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Install your favorite(s) (or the ones that look the coolest). In my imaginary mind, I installed the ownerOnly plugin.\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["This should install in ",(0,s.jsx)(n.code,{children:"plugins"})," directory in ",(0,s.jsx)(n.code,{children:"src"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.li,{children:"Some plugins only work with specific types. Most are targeted towards slash / both modules."}),"\n",(0,s.jsx)(n.li,{children:"Add to your module."}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-ts",children:"import { commandModule, CommandType } from '@sern/handler'\nimport { ownerOnly } from '../plugins'\n\nexport default commandModule({ \n type: CommandType.Both,\n plugins: [ownerOnly(['182326315813306368')],\n description: 'ping command',\n execute: (ctx) => {\n ctx.reply('hello, owner');\n }\n})\n\n"})}),"\n",(0,s.jsx)(n.h4,{id:"o-perfect-your-first-plugin",children:"\u2517|\uff40O\u2032|\u251b perfect, your first plugin!"}),"\n",(0,s.jsx)(n.h2,{id:"creating-your-own-plugins",children:"Creating your own plugins"}),"\n",(0,s.jsx)(n.p,{children:"The controller determines in plugins whether to continue or fail."}),"\n",(0,s.jsx)(n.h3,{id:"the-controller-object",children:"The controller object"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",children:"export interface Controller {\n next: () => Okimport { commandModule, CommandType } from '@sern/handler'
import { ownerOnly } from '../plugins'
export default commandModule({
type: CommandType.Both,
plugins: [ownerOnly(['182326315813306368')],
description: 'ping command',
execute: (ctx) => {
ctx.reply('hello, owner');
}
})
import { commandModule, CommandType } from '@sern/handler'
import { ownerOnly } from '../plugins'
export default commandModule({
type: CommandType.Both,
plugins: [ownerOnly(['182326315813306368'])],
description: 'ping command',
execute: (ctx) => {
ctx.reply('hello, owner');
}
})
The controller determines in plugins whether to continue or fail.
diff --git a/docs/guide/walkthrough/sern-emitter.html b/docs/guide/walkthrough/sern-emitter.html index f594e1d6f..535b97934 100644 --- a/docs/guide/walkthrough/sern-emitter.html +++ b/docs/guide/walkthrough/sern-emitter.html @@ -11,7 +11,7 @@ - + diff --git a/docs/guide/walkthrough/services.html b/docs/guide/walkthrough/services.html index dbed7a837..b210d22f9 100644 --- a/docs/guide/walkthrough/services.html +++ b/docs/guide/walkthrough/services.html @@ -11,7 +11,7 @@ - + diff --git a/docs/guide/walkthrough/transition.html b/docs/guide/walkthrough/transition.html index bfd27eea5..09122e99e 100644 --- a/docs/guide/walkthrough/transition.html +++ b/docs/guide/walkthrough/transition.html @@ -11,7 +11,7 @@ - + diff --git a/docs/intro.html b/docs/intro.html index 3c53d9bf0..4dfa63140 100644 --- a/docs/intro.html +++ b/docs/intro.html @@ -11,7 +11,7 @@ - + diff --git a/index.html b/index.html index 143dd6b71..c060ba34b 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ - + diff --git a/markdown-page.html b/markdown-page.html index 2f90c62c0..7cdd3e8bb 100644 --- a/markdown-page.html +++ b/markdown-page.html @@ -11,7 +11,7 @@ - + diff --git a/plugins.html b/plugins.html index e433433a2..3995bcfdd 100644 --- a/plugins.html +++ b/plugins.html @@ -11,7 +11,7 @@ - + diff --git a/search.html b/search.html index feee0045a..246a8922f 100644 --- a/search.html +++ b/search.html @@ -11,7 +11,7 @@ - + diff --git a/sponsors.html b/sponsors.html index 0976ddb1c..2c43f26fb 100644 --- a/sponsors.html +++ b/sponsors.html @@ -11,7 +11,7 @@ - +