From 694ebded2e0bab226ccf819e229260eb4c96e5b0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 14 Jun 2024 17:40:11 +0000 Subject: [PATCH] deploy: 2dae930ba8d3f23266e6ec5187c698de8b75159c --- 404.html | 2 +- assets/js/{7b758ddf.bebefb7e.js => 7b758ddf.f6b10005.js} | 2 +- .../js/{runtime~main.c95cd048.js => runtime~main.c4f65f90.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 | 4 ++-- 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 | 2 +- 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 +- 111 files changed, 112 insertions(+), 112 deletions(-) rename assets/js/{7b758ddf.bebefb7e.js => 7b758ddf.f6b10005.js} (76%) rename assets/js/{runtime~main.c95cd048.js => runtime~main.c4f65f90.js} (98%) diff --git a/404.html b/404.html index 5c56e562f..336638176 100644 --- a/404.html +++ b/404.html @@ -11,7 +11,7 @@ - +
diff --git a/assets/js/7b758ddf.bebefb7e.js b/assets/js/7b758ddf.f6b10005.js similarity index 76% rename from assets/js/7b758ddf.bebefb7e.js rename to assets/js/7b758ddf.f6b10005.js index f0b915e3f..be9194304 100644 --- a/assets/js/7b758ddf.bebefb7e.js +++ b/assets/js/7b758ddf.f6b10005.js @@ -1 +1 @@ -"use strict";(self.webpackChunksern_website=self.webpackChunksern_website||[]).push([[5938],{6942:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>a,default:()=>d,frontMatter:()=>s,metadata:()=>c,toc:()=>l});var o=n(4848),i=n(8453);const s={sidebar_position:7},a="Autocomplete",c={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,unlisted:!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"}},r={},l=[{value:"Example",id:"example",level:2}];function p(e){const t={code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"autocomplete",children:"Autocomplete"}),"\n",(0,o.jsx)(t.p,{children:"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."}),"\n",(0,o.jsx)(t.h2,{id:"example",children:"Example"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-ts",metastring:'title="src/commands/cheese.ts" {11-18}',children:"export default commandModule({ \n type: CommandType.Slash,\n description: \"show me cheese\",\n options: [\n { \n name: \"list\",\n\t type: ApplicationCommandOptionType.String,\n\t description: \"pick a cheese to show\",\n\t required: true,\n\t autocomplete: true,\n\t 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\t }\n\t}\n\t}\n ],\n execute: (ctx, [, args]) => {\n const cheese = args.getString('list', true); \n ctx.reply('selected cheese');\n }\n})\n\n\n"})}),"\n",(0,o.jsx)(t.p,{children:"Sern will handle autocomplete interactions at arbitrary depths and subcommand levels."})]})}function d(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(p,{...e})}):p(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>c});var o=n(6540);const i={},s=o.createContext(i);function a(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunksern_website=self.webpackChunksern_website||[]).push([[5938],{6942:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>a,default:()=>d,frontMatter:()=>s,metadata:()=>c,toc:()=>l});var o=n(4848),i=n(8453);const s={sidebar_position:7},a="Autocomplete",c={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,unlisted:!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"}},r={},l=[{value:"Example",id:"example",level:2}];function p(e){const t={code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h1,{id:"autocomplete",children:"Autocomplete"}),"\n",(0,o.jsx)(t.p,{children:"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."}),"\n",(0,o.jsx)(t.h2,{id:"example",children:"Example"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-ts",metastring:'title="src/commands/cheese.ts" {11-18}',children:"export default commandModule({ \n type: CommandType.Slash,\n description: \"show me cheese\",\n options: [\n { \n name: \"list\",\n\t type: ApplicationCommandOptionType.String,\n\t description: \"pick a cheese to show\",\n\t required: true,\n\t autocomplete: true,\n\t 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\t }\n\t}\n\t}\n ],\n execute: (ctx, [, args]) => {\n const cheese = args.getString('list', true); \n ctx.reply('selected: ' + cheese);\n }\n})\n\n\n"})}),"\n",(0,o.jsx)(t.p,{children:"Sern will handle autocomplete interactions at arbitrary depths and subcommand levels."})]})}function d(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(p,{...e})}):p(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>c});var o=n(6540);const i={},s=o.createContext(i);function a(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.c95cd048.js b/assets/js/runtime~main.c4f65f90.js similarity index 98% rename from assets/js/runtime~main.c95cd048.js rename to assets/js/runtime~main.c4f65f90.js index acdc5fed3..b955933de 100644 --- a/assets/js/runtime~main.c95cd048.js +++ b/assets/js/runtime~main.c4f65f90.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,c,f,d,b={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var c=t[e]={id:e,loaded:!1,exports:{}};return b[e].call(c.exports,c,c.exports,r),c.loaded=!0,c.exports}r.m=b,r.c=t,e=[],r.O=(a,c,f,d)=>{if(!c){var b=1/0;for(i=0;iAutocomplete is a special interaction where it can happen on multiple options on a single command. We've handled this with a simple tree search algorithm in a nested options tree.
export default commandModule({
type: CommandType.Slash,
description: "show me cheese",
options: [
{
name: "list",
type: ApplicationCommandOptionType.String,
description: "pick a cheese to show",
required: true,
autocomplete: true,
command: {
onEvent: [],
execute: (ctx) => {
const focus = ctx.options.getFocused();
ctx.respond(['gouda', 'parmesan', 'harvati']
.map((cheese) => ({ name: cheese, value: cheese })));
}
}
}
],
execute: (ctx, [, args]) => {
const cheese = args.getString('list', true);
ctx.reply('selected cheese');
}
})
export default commandModule({
type: CommandType.Slash,
description: "show me cheese",
options: [
{
name: "list",
type: ApplicationCommandOptionType.String,
description: "pick a cheese to show",
required: true,
autocomplete: true,
command: {
onEvent: [],
execute: (ctx) => {
const focus = ctx.options.getFocused();
ctx.respond(['gouda', 'parmesan', 'harvati']
.map((cheese) => ({ name: cheese, value: cheese })));
}
}
}
],
execute: (ctx, [, args]) => {
const cheese = args.getString('list', true);
ctx.reply('selected: ' + cheese);
}
})
Sern will handle autocomplete interactions at arbitrary depths and subcommand levels.