deploy: 300afed700
@@ -17,7 +17,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"sDYgKdFh\",\"mobot_index.md\":\"Be0Zoetq\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"MoBot Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"tEfotoPq\",\"mobot_commands_command-arguments.md\":\"Cuc3b3v9\",\"mobot_commands_creating-a-command.md\":\"DrPP2R0G\",\"mobot_configuration_custom-configs.md\":\"BBg-YrVf\",\"mobot_configuration_default-config.md\":\"CWK17AB-\",\"mobot_configuration_non-yaml-configs.md\":\"D1wDyLf4\",\"mobot_creating-a-module_module-lifecycle.md\":\"BfG9RjVD\",\"mobot_creating-a-module_modules-introduction.md\":\"BWpvzdqx\",\"mobot_events_creating-a-listener.md\":\"By59Lqsu\",\"mobot_events_events-introduction.md\":\"cEArHWcq\",\"mobot_index.md\":\"Bklchsn4\",\"mobot_introduction_installation.md\":\"D8x3Ns7p\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"Introduction\",\"items\":[{\"text\":\"Installation\",\"link\":\"/mobot/introduction/installation\"}]},{\"text\":\"Creating a Module\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot/creating-a-module/modules-introduction\"},{\"text\":\"Module Lifecycle\",\"link\":\"/mobot/creating-a-module/module-lifecycle\"}]},{\"text\":\"Commands\",\"collapsed\":false,\"items\":[{\"text\":\"Creating a Command\",\"link\":\"/mobot/commands/creating-a-command\"},{\"text\":\"Command Arguments\",\"link\":\"/mobot/commands/command-arguments\"}]},{\"text\":\"Events\",\"collapsed\":false,\"items\":[{\"text\":\"What are Events?\",\"link\":\"/mobot/events/events-introduction\"},{\"text\":\"Creating a Listener\",\"link\":\"/mobot/events/creating-a-listener\"}]},{\"text\":\"Configs\",\"collapsed\":false,\"items\":[{\"text\":\"Default Config\",\"link\":\"/mobot/configuration/default-config\"},{\"text\":\"Custom Configs\",\"link\":\"/mobot/configuration/custom-configs\"},{\"text\":\"Non Yaml Configs\",\"link\":\"/mobot/configuration/non-yaml-configs\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 658 KiB |
|
After Width: | Height: | Size: 659 KiB |
|
After Width: | Height: | Size: 637 KiB |
|
After Width: | Height: | Size: 636 KiB |
|
After Width: | Height: | Size: 637 KiB |
|
After Width: | Height: | Size: 656 KiB |
|
After Width: | Height: | Size: 653 KiB |
|
After Width: | Height: | Size: 638 KiB |
|
After Width: | Height: | Size: 637 KiB |
|
Before Width: | Height: | Size: 674 KiB After Width: | Height: | Size: 663 KiB |
|
After Width: | Height: | Size: 650 KiB |
@@ -0,0 +1 @@
|
||||
import{V as i}from"./chunks/theme.B0m-fXrT.js";import{c as r,j as t,a as n,G as s,k as o,o as l}from"./chunks/framework.p2VkXzrt.js";const b=JSON.parse('{"title":"Our Team","description":"","frontmatter":{"banner_title":"Pixel Services Documentation","banner_description":"Explore the documentation for all public Pixel Services projects","layout":"home","hero":{"name":"Pixel Services Documentation","text":"","tagline":"Explore the documentation for all public Pixel Services projects","actions":[{"theme":"brand","text":"Support Us","link":"https://buymeacoffee.com/pixelservices"},{"theme":"alt","text":"Check out our Github","link":"https://github.com/Pixel-Services"}]},"features":[{"title":"Flash","details":"Simple, modern and fast expressive web framework written in Java.","link":"/flash"},{"title":"ServerLibraries","details":"A Library made to ease server-side Fabric mod development.","link":"/serverlibraries"},{"title":"MoBot","details":"A modular Discord bot written in Java, with a feature-rich API.","link":"/mobot"}],"head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/index.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/index.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),m={name:"index.md"},h=Object.assign(m,{setup(c){const a=[{avatar:"https://avatars.githubusercontent.com/u/83401018?v=4",name:"Relism",title:"Backend Developer",links:[{icon:"github",link:"https://github.com/Relism"}]},{avatar:"https://avatars.githubusercontent.com/u/69807609?v=4",name:"Sieadev",title:"Developer",links:[{icon:"github",link:"https://github.com/sieadev"}]}];return(u,e)=>(l(),r("div",null,[e[0]||(e[0]=t("br",null,null,-1)),e[1]||(e[1]=t("hr",null,null,-1)),e[2]||(e[2]=t("br",null,null,-1)),e[3]||(e[3]=t("h1",{id:"our-team",tabindex:"-1"},[n("Our Team "),t("a",{class:"header-anchor",href:"#our-team","aria-label":'Permalink to "Our Team"'},"")],-1)),e[4]||(e[4]=t("p",null,"Say hello to the Pixel Services team !",-1)),s(o(i),{size:"small",members:a})]))}});export{b as __pageData,h as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{V as i}from"./chunks/theme.B0m-fXrT.js";import{c as r,j as t,a as n,G as s,k as o,o as l}from"./chunks/framework.p2VkXzrt.js";const b=JSON.parse('{"title":"Our Team","description":"","frontmatter":{"banner_title":"Pixel Services Documentation","banner_description":"Explore the documentation for all public Pixel Services projects","layout":"home","hero":{"name":"Pixel Services Documentation","text":"","tagline":"Explore the documentation for all public Pixel Services projects","actions":[{"theme":"brand","text":"Support Us","link":"https://buymeacoffee.com/pixelservices"},{"theme":"alt","text":"Check out our Github","link":"https://github.com/Pixel-Services"}]},"features":[{"title":"Flash","details":"Simple, modern and fast expressive web framework written in Java.","link":"/flash"},{"title":"ServerLibraries","details":"A Library made to ease server-side Fabric mod development.","link":"/serverlibraries"},{"title":"MoBot","details":"A modular Discord bot written in Java, with a feature-rich API.","link":"/mobot"}],"head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/index.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/index.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),m={name:"index.md"},h=Object.assign(m,{setup(c){const a=[{avatar:"https://avatars.githubusercontent.com/u/83401018?v=4",name:"Relism",title:"Backend Developer",links:[{icon:"github",link:"https://github.com/Relism"}]},{avatar:"https://avatars.githubusercontent.com/u/69807609?v=4",name:"Sieadev",title:"Developer",links:[{icon:"github",link:"https://github.com/sieadev"}]}];return(u,e)=>(l(),r("div",null,[e[0]||(e[0]=t("br",null,null,-1)),e[1]||(e[1]=t("hr",null,null,-1)),e[2]||(e[2]=t("br",null,null,-1)),e[3]||(e[3]=t("h1",{id:"our-team",tabindex:"-1"},[n("Our Team "),t("a",{class:"header-anchor",href:"#our-team","aria-label":'Permalink to "Our Team"'},"")],-1)),e[4]||(e[4]=t("p",null,"Say hello to the Pixel Services team !",-1)),s(o(i),{size:"small",members:a})]))}});export{b as __pageData,h as default};
|
||||
@@ -0,0 +1,19 @@
|
||||
import{_ as a,c as i,a0 as t,o as n}from"./chunks/framework.p2VkXzrt.js";const m=JSON.parse('{"title":"🛠️ Command Arguments","description":"","frontmatter":{"banner_title":"MoBot - Command Arguments","banner_description":"Learn how to use command arguments in MoBot","head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-commands-command-arguments.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-commands-command-arguments.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/commands/command-arguments.md","filePath":"mobot/commands/command-arguments.md"}'),e={name:"mobot/commands/command-arguments.md"};function h(l,s,p,r,d,k){return n(),i("div",null,s[0]||(s[0]=[t(`<h1 id="🛠️-command-arguments" tabindex="-1">🛠️ Command Arguments <a class="header-anchor" href="#🛠️-command-arguments" aria-label="Permalink to "🛠️ Command Arguments""></a></h1><p>Command arguments allow you to pass additional information to your commands when they are invoked. This is useful for creating dynamic commands that can perform different actions based on user input.</p><h2 id="📜-slashcommandargument-annotation" tabindex="-1">📜 <code>@SlashCommandArgument</code> Annotation <a class="header-anchor" href="#📜-slashcommandargument-annotation" aria-label="Permalink to "📜 \`@SlashCommandArgument\` Annotation""></a></h2><p>The <code>@SlashCommandArgument</code> annotation is used to define an argument for a slash command. You can specify the name, description, type, and whether the argument is required or optional. You can add it to the method that handles the command, and it will automatically parse the argument from the command invocation. <code>SlashCommandArgument</code>'s can also be stacked, so you can have multiple arguments for a single command.</p><p>Optionally you can add a <code>Map<String, Object></code> to the method signature to get all arguments as a Map. If you prefer to retrieve the arguments from the event, you can use <code>#event.getOptions()</code>.</p><table tabindex="0"><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>The name of the argument. This is what users will type to provide the value.</td></tr><tr><td><code>description</code></td><td>A short description of what the argument does.</td></tr><tr><td><code>type</code></td><td>The type of the argument. This can be a string, integer, etc.</td></tr><tr><td><code>required</code></td><td>Whether the argument is required or optional.</td></tr><tr><td><code>autoComplete</code></td><td>Whether the argument should be auto-completed.</td></tr></tbody></table><p>Here’s an example of a command with an argument using the <code>@SlashCommandArgument</code> annotation:</p><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MyCommand</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> implements</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> SlashCommandHandler</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">SlashCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> name</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "greet"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> description</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Greet a user"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">SlashCommandArgument</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> name</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "user"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> description</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "The user to greet"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> type</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> OptionType.USER,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> required</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> true</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onGreetCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(SlashCommandInteractionEvent </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">event</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Map<</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">String</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Object</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">> </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">args</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Get the user argument</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> User user </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (User) args.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"user"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> </span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Reply to the command</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> event.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">reply</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Hello, "</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> +</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> user.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getName</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "!"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">queue</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div>`,8)]))}const g=a(e,[["render",h]]);export{m as __pageData,g as default};
|
||||
@@ -0,0 +1,19 @@
|
||||
import{_ as a,c as i,a0 as t,o as n}from"./chunks/framework.p2VkXzrt.js";const m=JSON.parse('{"title":"🛠️ Command Arguments","description":"","frontmatter":{"banner_title":"MoBot - Command Arguments","banner_description":"Learn how to use command arguments in MoBot","head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-commands-command-arguments.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-commands-command-arguments.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/commands/command-arguments.md","filePath":"mobot/commands/command-arguments.md"}'),e={name:"mobot/commands/command-arguments.md"};function h(l,s,p,r,d,k){return n(),i("div",null,s[0]||(s[0]=[t(`<h1 id="🛠️-command-arguments" tabindex="-1">🛠️ Command Arguments <a class="header-anchor" href="#🛠️-command-arguments" aria-label="Permalink to "🛠️ Command Arguments""></a></h1><p>Command arguments allow you to pass additional information to your commands when they are invoked. This is useful for creating dynamic commands that can perform different actions based on user input.</p><h2 id="📜-slashcommandargument-annotation" tabindex="-1">📜 <code>@SlashCommandArgument</code> Annotation <a class="header-anchor" href="#📜-slashcommandargument-annotation" aria-label="Permalink to "📜 \`@SlashCommandArgument\` Annotation""></a></h2><p>The <code>@SlashCommandArgument</code> annotation is used to define an argument for a slash command. You can specify the name, description, type, and whether the argument is required or optional. You can add it to the method that handles the command, and it will automatically parse the argument from the command invocation. <code>SlashCommandArgument</code>'s can also be stacked, so you can have multiple arguments for a single command.</p><p>Optionally you can add a <code>Map<String, Object></code> to the method signature to get all arguments as a Map. If you prefer to retrieve the arguments from the event, you can use <code>#event.getOptions()</code>.</p><table tabindex="0"><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>The name of the argument. This is what users will type to provide the value.</td></tr><tr><td><code>description</code></td><td>A short description of what the argument does.</td></tr><tr><td><code>type</code></td><td>The type of the argument. This can be a string, integer, etc.</td></tr><tr><td><code>required</code></td><td>Whether the argument is required or optional.</td></tr><tr><td><code>autoComplete</code></td><td>Whether the argument should be auto-completed.</td></tr></tbody></table><p>Here’s an example of a command with an argument using the <code>@SlashCommandArgument</code> annotation:</p><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MyCommand</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> implements</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> SlashCommandHandler</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">SlashCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> name</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "greet"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> description</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Greet a user"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">SlashCommandArgument</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> name</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "user"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> description</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "The user to greet"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> type</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> OptionType.USER,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> required</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> true</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onGreetCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(SlashCommandInteractionEvent </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">event</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, Map<</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">String</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Object</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">> </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">args</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Get the user argument</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> User user </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (User) args.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">get</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"user"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> </span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Reply to the command</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> event.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">reply</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Hello, "</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> +</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> user.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getName</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "!"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">queue</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div>`,8)]))}const g=a(e,[["render",h]]);export{m as __pageData,g as default};
|
||||
@@ -0,0 +1,14 @@
|
||||
import{_ as s,c as i,a0 as n,o as t}from"./chunks/framework.p2VkXzrt.js";const c=JSON.parse('{"title":"🛠️ Creating a Command","description":"","frontmatter":{"banner_title":"MoBot - Creating a Command","banner_description":"Learn how to create custom commands for MoBot","head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-commands-creating-a-command.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-commands-creating-a-command.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/commands/creating-a-command.md","filePath":"mobot/commands/creating-a-command.md"}'),e={name:"mobot/commands/creating-a-command.md"};function o(h,a,d,l,r,p){return t(),i("div",null,a[0]||(a[0]=[n(`<h1 id="🛠️-creating-a-command" tabindex="-1">🛠️ Creating a Command <a class="header-anchor" href="#🛠️-creating-a-command" aria-label="Permalink to "🛠️ Creating a Command""></a></h1><p>Commands are a core feature of Discord Bots. They allow users to interact with the bot and perform various actions. In MoBot, creating a command is straightforward and flexible, allowing you to define custom behavior for your bot.</p><h2 id="🚀-commands-in-the-mobot-api" tabindex="-1">🚀 Commands in the MoBot API <a class="header-anchor" href="#🚀-commands-in-the-mobot-api" aria-label="Permalink to "🚀 Commands in the MoBot API""></a></h2><p>To make commands easy to use, MoBot provides a extensive API for creating and managing commands. Apart from the <code>SlashCommandHandler</code> interface, the SlashCommand System is build entirely from annotations.</p><div class="warning custom-block"><p class="custom-block-title">NOTE</p><p>You will have to implement the <code>SlashCommandHandler</code> interface if you want to use <code>@SlashCommand</code> and other annotations.</p></div><h2 id="📜-slashcommand-annotation" tabindex="-1">📜 <code>@SlashCommand</code> Annotation <a class="header-anchor" href="#📜-slashcommand-annotation" aria-label="Permalink to "📜 \`@SlashCommand\` Annotation""></a></h2><p>The <code>@SlashCommand</code> annotation is used to define a slash command. Apart from the name and description, you can also specify aliases and required permissions. This annotation is placed on a method that will handle the command when it is invoked. The method should accept a <code>SlashCommandInteractionEvent</code> parameter, which contains information about the command invocation and allows you to respond to the user.</p><table tabindex="0"><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>The name of the command. This is what users will type to invoke the command.</td></tr><tr><td><code>description</code></td><td>A short description of what the command does.</td></tr><tr><td><code>aliases</code></td><td>An array of alternative names for the command.</td></tr><tr><td><code>permissions</code></td><td>The permission required to use the command.</td></tr></tbody></table><p>Here’s an example of a simple <code>PingCommand</code> using the <code>@SlashCommand</code> annotation:</p><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PingCommand</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> implements</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> SlashCommandHandler</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">SlashCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> name</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "ping"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> description</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Ping the bot to check if it's alive"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onPingCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(SlashCommandInteractionEvent </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">event</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> event.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">reply</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Pong!"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">queue</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="🛠️-registering-the-command" tabindex="-1">🛠️ Registering the Command <a class="header-anchor" href="#🛠️-registering-the-command" aria-label="Permalink to "🛠️ Registering the Command""></a></h2><p>To register the command, you need to create an instance of your command class and register it using the <code>#registerSlashCommandHandler</code> method in your module's main class.</p><p>Here's an example of how to register the <code>PingCommand</code> in your module:</p><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MyModule</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> extends</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MbModule</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Override</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onEnable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> registerSlashCommandHandler</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">new</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PingCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">());</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div>`,14)]))}const k=s(e,[["render",o]]);export{c as __pageData,k as default};
|
||||
@@ -0,0 +1,14 @@
|
||||
import{_ as s,c as i,a0 as n,o as t}from"./chunks/framework.p2VkXzrt.js";const c=JSON.parse('{"title":"🛠️ Creating a Command","description":"","frontmatter":{"banner_title":"MoBot - Creating a Command","banner_description":"Learn how to create custom commands for MoBot","head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-commands-creating-a-command.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-commands-creating-a-command.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/commands/creating-a-command.md","filePath":"mobot/commands/creating-a-command.md"}'),e={name:"mobot/commands/creating-a-command.md"};function o(h,a,d,l,r,p){return t(),i("div",null,a[0]||(a[0]=[n(`<h1 id="🛠️-creating-a-command" tabindex="-1">🛠️ Creating a Command <a class="header-anchor" href="#🛠️-creating-a-command" aria-label="Permalink to "🛠️ Creating a Command""></a></h1><p>Commands are a core feature of Discord Bots. They allow users to interact with the bot and perform various actions. In MoBot, creating a command is straightforward and flexible, allowing you to define custom behavior for your bot.</p><h2 id="🚀-commands-in-the-mobot-api" tabindex="-1">🚀 Commands in the MoBot API <a class="header-anchor" href="#🚀-commands-in-the-mobot-api" aria-label="Permalink to "🚀 Commands in the MoBot API""></a></h2><p>To make commands easy to use, MoBot provides a extensive API for creating and managing commands. Apart from the <code>SlashCommandHandler</code> interface, the SlashCommand System is build entirely from annotations.</p><div class="warning custom-block"><p class="custom-block-title">NOTE</p><p>You will have to implement the <code>SlashCommandHandler</code> interface if you want to use <code>@SlashCommand</code> and other annotations.</p></div><h2 id="📜-slashcommand-annotation" tabindex="-1">📜 <code>@SlashCommand</code> Annotation <a class="header-anchor" href="#📜-slashcommand-annotation" aria-label="Permalink to "📜 \`@SlashCommand\` Annotation""></a></h2><p>The <code>@SlashCommand</code> annotation is used to define a slash command. Apart from the name and description, you can also specify aliases and required permissions. This annotation is placed on a method that will handle the command when it is invoked. The method should accept a <code>SlashCommandInteractionEvent</code> parameter, which contains information about the command invocation and allows you to respond to the user.</p><table tabindex="0"><thead><tr><th>Option</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>The name of the command. This is what users will type to invoke the command.</td></tr><tr><td><code>description</code></td><td>A short description of what the command does.</td></tr><tr><td><code>aliases</code></td><td>An array of alternative names for the command.</td></tr><tr><td><code>permissions</code></td><td>The permission required to use the command.</td></tr></tbody></table><p>Here’s an example of a simple <code>PingCommand</code> using the <code>@SlashCommand</code> annotation:</p><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PingCommand</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> implements</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> SlashCommandHandler</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">SlashCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> name</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "ping"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> description</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Ping the bot to check if it's alive"</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onPingCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(SlashCommandInteractionEvent </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">event</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> event.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">reply</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Pong!"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">queue</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="🛠️-registering-the-command" tabindex="-1">🛠️ Registering the Command <a class="header-anchor" href="#🛠️-registering-the-command" aria-label="Permalink to "🛠️ Registering the Command""></a></h2><p>To register the command, you need to create an instance of your command class and register it using the <code>#registerSlashCommandHandler</code> method in your module's main class.</p><p>Here's an example of how to register the <code>PingCommand</code> in your module:</p><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MyModule</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> extends</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MbModule</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Override</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onEnable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> registerSlashCommandHandler</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">new</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PingCommand</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">());</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div>`,14)]))}const k=s(e,[["render",o]]);export{c as __pageData,k as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as t,c as e,o}from"./chunks/framework.p2VkXzrt.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-configuration-custom-configs.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-configuration-custom-configs.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/configuration/custom-configs.md","filePath":"mobot/configuration/custom-configs.md"}'),n={name:"mobot/configuration/custom-configs.md"};function a(c,i,s,m,r,g){return o(),e("div")}const p=t(n,[["render",a]]);export{d as __pageData,p as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as t,c as e,o}from"./chunks/framework.p2VkXzrt.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-configuration-custom-configs.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-configuration-custom-configs.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/configuration/custom-configs.md","filePath":"mobot/configuration/custom-configs.md"}'),n={name:"mobot/configuration/custom-configs.md"};function a(c,i,s,m,r,g){return o(),e("div")}const p=t(n,[["render",a]]);export{d as __pageData,p as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as t,c as e,o as a}from"./chunks/framework.p2VkXzrt.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{"head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-configuration-default-config.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-configuration-default-config.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/configuration/default-config.md","filePath":"mobot/configuration/default-config.md"}'),n={name:"mobot/configuration/default-config.md"};function o(i,c,r,m,s,f){return a(),e("div")}const p=t(n,[["render",o]]);export{g as __pageData,p as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as t,c as e,o as a}from"./chunks/framework.p2VkXzrt.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{"head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-configuration-default-config.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-configuration-default-config.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/configuration/default-config.md","filePath":"mobot/configuration/default-config.md"}'),n={name:"mobot/configuration/default-config.md"};function o(i,c,r,m,s,f){return a(),e("div")}const p=t(n,[["render",o]]);export{g as __pageData,p as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as t,c as n,o as e}from"./chunks/framework.p2VkXzrt.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-configuration-non-yaml-configs.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-configuration-non-yaml-configs.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/configuration/non-yaml-configs.md","filePath":"mobot/configuration/non-yaml-configs.md"}'),a={name:"mobot/configuration/non-yaml-configs.md"};function o(i,m,c,r,s,g){return e(),n("div")}const p=t(a,[["render",o]]);export{d as __pageData,p as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as t,c as n,o as e}from"./chunks/framework.p2VkXzrt.js";const d=JSON.parse('{"title":"","description":"","frontmatter":{"head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-configuration-non-yaml-configs.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-configuration-non-yaml-configs.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/configuration/non-yaml-configs.md","filePath":"mobot/configuration/non-yaml-configs.md"}'),a={name:"mobot/configuration/non-yaml-configs.md"};function o(i,m,c,r,s,g){return e(),n("div")}const p=t(a,[["render",o]]);export{d as __pageData,p as default};
|
||||
@@ -0,0 +1,21 @@
|
||||
import{_ as s,c as a,a0 as i,o as t}from"./chunks/framework.p2VkXzrt.js";const k=JSON.parse('{"title":"📦 Module Lifecycle","description":"","frontmatter":{"banner_title":"MoBot - Module Lifecycle","banner_description":"Learn about the lifecycle of a MoBot module","head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-creating-a-module-module-lifecycle.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-creating-a-module-module-lifecycle.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/creating-a-module/module-lifecycle.md","filePath":"mobot/creating-a-module/module-lifecycle.md"}'),l={name:"mobot/creating-a-module/module-lifecycle.md"};function n(o,e,h,d,r,p){return t(),a("div",null,e[0]||(e[0]=[i(`<h1 id="📦-module-lifecycle" tabindex="-1">📦 Module Lifecycle <a class="header-anchor" href="#📦-module-lifecycle" aria-label="Permalink to "📦 Module Lifecycle""></a></h1><p>MoBot modules follow a specific lifecycle to ensure proper initialization, operation, and cleanup. Understanding this lifecycle is crucial for creating reliable and efficient modules.</p><h2 id="🔄-lifecycle-phases" tabindex="-1">🔄 Lifecycle Phases <a class="header-anchor" href="#🔄-lifecycle-phases" aria-label="Permalink to "🔄 Lifecycle Phases""></a></h2><p>The lifecycle of a MoBot module consists of several phases, each with its own purpose and responsibilities. Here’s a breakdown of each phase:</p><h3 id="_1-initialization" tabindex="-1">1. Initialization <a class="header-anchor" href="#_1-initialization" aria-label="Permalink to "1. Initialization""></a></h3><p>When MoBot starts, it scans the modules directory for JAR files. Each module is loaded, and its MbModule class is instantiated. During this phase, the module's dependencies are resolved, and its configuration is loaded.</p><h3 id="_2-pre-enable" tabindex="-1">2. Pre-Enable <a class="header-anchor" href="#_2-pre-enable" aria-label="Permalink to "2. Pre-Enable""></a></h3><p>Before the Discord Bot is fully initialized, the <code>preEnable()</code> method of the module's main class is called. This is where you can perform actions that involve the <code>BotBuilder</code>. This includes stuff like setting the bots status or other tasks that can not be performed after the bot is fully initialized.</p><h3 id="_3-enable" tabindex="-1">3. Enable <a class="header-anchor" href="#_3-enable" aria-label="Permalink to "3. Enable""></a></h3><p>After initialization, the <code>onEnable()</code> method of the module's main class is called. This is where you should set up your module's main functionality, such as registering commands, listeners, or tasks.</p><h3 id="_4-disable" tabindex="-1">4. Disable <a class="header-anchor" href="#_4-disable" aria-label="Permalink to "4. Disable""></a></h3><p>When MoBot shuts down or the module is unloaded, the <code>onDisable()</code> method is called. Use this phase to clean up resources, save data, and gracefully stop any ongoing tasks.</p><h3 id="_5-post-disable" tabindex="-1">5. Post-Disable <a class="header-anchor" href="#_5-post-disable" aria-label="Permalink to "5. Post-Disable""></a></h3><p>After the Discord Bot is fully disabled, the <code>postDisable()</code> method of the module's main class is called. You can use this phase to perform any final cleanup tasks that require the bot to be fully disabled.</p><div class="warning custom-block"><p class="custom-block-title">NOTE</p><p>All of these methods are optional, and you can choose to implement only the ones you need.</p></div><h2 id="usage-example" tabindex="-1">Usage Example <a class="header-anchor" href="#usage-example" aria-label="Permalink to "Usage Example""></a></h2><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MyModule</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> extends</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MbModule</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Override</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> preEnable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Perform actions before the bot is fully initialized</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> </span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Override</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onEnable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Register commands, listeners, etc.</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> </span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Override</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onDisable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Save data, stop tasks, etc.</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Override</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> postDisable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Final cleanup tasks</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="🛠️-cheat-sheet" tabindex="-1">🛠️ Cheat Sheet <a class="header-anchor" href="#🛠️-cheat-sheet" aria-label="Permalink to "🛠️ Cheat Sheet""></a></h2><table tabindex="0"><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>preEnable()</code></td><td>Called before the bot is fully initialized. Use this to set up the bot.</td></tr><tr><td><code>onEnable()</code></td><td>Called when the module is enabled. Use this to register commands, listeners, etc.</td></tr><tr><td><code>onDisable()</code></td><td>Called when the module is disabled. Use this to save data, clean up resources etc.</td></tr><tr><td><code>postDisable()</code></td><td>Called after the bot is fully disabled. Use this for final cleanup tasks.</td></tr></tbody></table>`,19)]))}const u=s(l,[["render",n]]);export{k as __pageData,u as default};
|
||||
@@ -0,0 +1,21 @@
|
||||
import{_ as s,c as a,a0 as i,o as t}from"./chunks/framework.p2VkXzrt.js";const k=JSON.parse('{"title":"📦 Module Lifecycle","description":"","frontmatter":{"banner_title":"MoBot - Module Lifecycle","banner_description":"Learn about the lifecycle of a MoBot module","head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-creating-a-module-module-lifecycle.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-creating-a-module-module-lifecycle.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/creating-a-module/module-lifecycle.md","filePath":"mobot/creating-a-module/module-lifecycle.md"}'),l={name:"mobot/creating-a-module/module-lifecycle.md"};function n(o,e,h,d,r,p){return t(),a("div",null,e[0]||(e[0]=[i(`<h1 id="📦-module-lifecycle" tabindex="-1">📦 Module Lifecycle <a class="header-anchor" href="#📦-module-lifecycle" aria-label="Permalink to "📦 Module Lifecycle""></a></h1><p>MoBot modules follow a specific lifecycle to ensure proper initialization, operation, and cleanup. Understanding this lifecycle is crucial for creating reliable and efficient modules.</p><h2 id="🔄-lifecycle-phases" tabindex="-1">🔄 Lifecycle Phases <a class="header-anchor" href="#🔄-lifecycle-phases" aria-label="Permalink to "🔄 Lifecycle Phases""></a></h2><p>The lifecycle of a MoBot module consists of several phases, each with its own purpose and responsibilities. Here’s a breakdown of each phase:</p><h3 id="_1-initialization" tabindex="-1">1. Initialization <a class="header-anchor" href="#_1-initialization" aria-label="Permalink to "1. Initialization""></a></h3><p>When MoBot starts, it scans the modules directory for JAR files. Each module is loaded, and its MbModule class is instantiated. During this phase, the module's dependencies are resolved, and its configuration is loaded.</p><h3 id="_2-pre-enable" tabindex="-1">2. Pre-Enable <a class="header-anchor" href="#_2-pre-enable" aria-label="Permalink to "2. Pre-Enable""></a></h3><p>Before the Discord Bot is fully initialized, the <code>preEnable()</code> method of the module's main class is called. This is where you can perform actions that involve the <code>BotBuilder</code>. This includes stuff like setting the bots status or other tasks that can not be performed after the bot is fully initialized.</p><h3 id="_3-enable" tabindex="-1">3. Enable <a class="header-anchor" href="#_3-enable" aria-label="Permalink to "3. Enable""></a></h3><p>After initialization, the <code>onEnable()</code> method of the module's main class is called. This is where you should set up your module's main functionality, such as registering commands, listeners, or tasks.</p><h3 id="_4-disable" tabindex="-1">4. Disable <a class="header-anchor" href="#_4-disable" aria-label="Permalink to "4. Disable""></a></h3><p>When MoBot shuts down or the module is unloaded, the <code>onDisable()</code> method is called. Use this phase to clean up resources, save data, and gracefully stop any ongoing tasks.</p><h3 id="_5-post-disable" tabindex="-1">5. Post-Disable <a class="header-anchor" href="#_5-post-disable" aria-label="Permalink to "5. Post-Disable""></a></h3><p>After the Discord Bot is fully disabled, the <code>postDisable()</code> method of the module's main class is called. You can use this phase to perform any final cleanup tasks that require the bot to be fully disabled.</p><div class="warning custom-block"><p class="custom-block-title">NOTE</p><p>All of these methods are optional, and you can choose to implement only the ones you need.</p></div><h2 id="usage-example" tabindex="-1">Usage Example <a class="header-anchor" href="#usage-example" aria-label="Permalink to "Usage Example""></a></h2><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MyModule</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> extends</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MbModule</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Override</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> preEnable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Perform actions before the bot is fully initialized</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> </span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Override</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onEnable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Register commands, listeners, etc.</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> </span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Override</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onDisable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Save data, stop tasks, etc.</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Override</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> postDisable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Final cleanup tasks</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="🛠️-cheat-sheet" tabindex="-1">🛠️ Cheat Sheet <a class="header-anchor" href="#🛠️-cheat-sheet" aria-label="Permalink to "🛠️ Cheat Sheet""></a></h2><table tabindex="0"><thead><tr><th>Method</th><th>Description</th></tr></thead><tbody><tr><td><code>preEnable()</code></td><td>Called before the bot is fully initialized. Use this to set up the bot.</td></tr><tr><td><code>onEnable()</code></td><td>Called when the module is enabled. Use this to register commands, listeners, etc.</td></tr><tr><td><code>onDisable()</code></td><td>Called when the module is disabled. Use this to save data, clean up resources etc.</td></tr><tr><td><code>postDisable()</code></td><td>Called after the bot is fully disabled. Use this for final cleanup tasks.</td></tr></tbody></table>`,19)]))}const u=s(l,[["render",n]]);export{k as __pageData,u as default};
|
||||
@@ -0,0 +1,35 @@
|
||||
import{_ as i,c as a,a0 as e,o as t}from"./chunks/framework.p2VkXzrt.js";const c=JSON.parse('{"title":"🧩 Creating a Module","description":"","frontmatter":{"banner_title":"MoBot - Creating a Module","banner_description":"Learn how to create a module for MoBot","head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-creating-a-module-modules-introduction.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-creating-a-module-modules-introduction.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/creating-a-module/modules-introduction.md","filePath":"mobot/creating-a-module/modules-introduction.md"}'),n={name:"mobot/creating-a-module/modules-introduction.md"};function l(o,s,h,p,r,d){return t(),a("div",null,s[0]||(s[0]=[e(`<h1 id="🧩-creating-a-module" tabindex="-1">🧩 Creating a Module <a class="header-anchor" href="#🧩-creating-a-module" aria-label="Permalink to "🧩 Creating a Module""></a></h1><p>MoBot is designed to be modular, allowing you to create your own modules to extend its functionality. This guide will walk you through the process of creating a module for MoBot.</p><h2 id="🧠-prerequisites" tabindex="-1">🧠 Prerequisites <a class="header-anchor" href="#🧠-prerequisites" aria-label="Permalink to "🧠 Prerequisites""></a></h2><p>Before we begin, make sure you’re comfortable with:</p><ul><li>Basic <strong>Java</strong> programming</li><li>Using <strong>Maven</strong> (or any preferred Java build tool)</li><li>Understanding the basics of how MoBot operates</li></ul><p>If you're new to Java or Maven, we recommend checking out a few beginner tutorials first.</p><p>Also, make sure you've reviewed the <a href="/mobot/introduction/installation.html">MoBot Installation Guide</a> to understand how the bot is structured and how modules fit into it.</p><h2 id="🧩-what-makes-a-module" tabindex="-1">🧩 What Makes a Module? <a class="header-anchor" href="#🧩-what-makes-a-module" aria-label="Permalink to "🧩 What Makes a Module?""></a></h2><p>For a module to be recognized and loaded by MoBot, it needs <strong>two essential parts</strong>:</p><ol><li>A <strong>Main class</strong> that extends <code>MbModule</code></li><li>A <strong><code>module.yml</code></strong> configuration file that defines metadata about the module</li></ol><p>Additionally, you’ll need to include the <strong>MoBot API</strong> as a dependency in your project.</p><h2 id="🛠-step-1-set-up-your-maven-project" tabindex="-1">🛠 Step 1: Set Up Your Maven Project <a class="header-anchor" href="#🛠-step-1-set-up-your-maven-project" aria-label="Permalink to "🛠 Step 1: Set Up Your Maven Project""></a></h2><p>To create a module, you need to set up a Maven project. You can do this using your favorite IDE or by using the command line. If you're using the command line, you can create a new Maven project with the following command:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">mvn</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> archetype:generate</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -DgroupId=com.example</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -DartifactId=MyModule</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -DarchetypeArtifactId=maven-archetype-quickstart</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -DinteractiveMode=false</span></span></code></pre></div><p>This will create a new Maven project looking something like this:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">MyModule/</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">├──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> pom.xml</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">└──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> src/</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> └──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> main/</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> └──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> java/</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> └──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> com/</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> └──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> example/</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> └──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> MyModule/</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> └──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> App.java</span></span></code></pre></div><h3 id="add-mobot-api-dependency" tabindex="-1">Add MoBot API Dependency <a class="header-anchor" href="#add-mobot-api-dependency" aria-label="Permalink to "Add MoBot API Dependency""></a></h3><p>To use the MoBot API in your module, you need to add it as a dependency in your <code>pom.xml</code> file. Open the <code>pom.xml</code> file and add the following lines inside the <code><repositories></code> and <code><dependencies></code> sections:</p><div class="language-xml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">xml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">repository</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">id</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>pixel-services-releases</</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">id</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">name</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>Pixel Services</</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">name</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">url</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>https://maven.pixel-services.com/releases</</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">url</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"></</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">repository</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">dependency</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">groupId</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>com.pixelservices.mobot</</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">groupId</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifactId</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>mobot-api</</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifactId</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">version</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>VERSION</</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">version</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">> </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"><!-- Replace VERSION --></span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"></</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">dependency</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p>Make sure to replace <code>VERSION</code> with the latest version of the MoBot API.</p><p><a href="https://maven.pixel-services.com/#/releases/com/pixelservices/mobot/mobot-api" target="_blank" rel="noreferrer"><img src="https://img.shields.io/maven-metadata/v?metadataUrl=https://maven.pixel-services.com/releases/com/pixelservices/mobot/mobot-api/maven-metadata.xml" alt="Latest Version"></a></p><h2 id="🧱-step-2-create-your-main-class" tabindex="-1">🧱 Step 2: Create Your Main Class <a class="header-anchor" href="#🧱-step-2-create-your-main-class" aria-label="Permalink to "🧱 Step 2: Create Your Main Class""></a></h2><p>Either locate your existing main class or create a new one. This class will be the entry point for your module and should extend <code>MbModule</code>.</p><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MyModule</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> extends</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MbModule</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Override</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onEnable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> //Do something</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Override</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onDisable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> //Do something</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="📜-step-3-create-the-module-yml-file" tabindex="-1">📜 Step 3: Create the <code>module.yml</code> File <a class="header-anchor" href="#📜-step-3-create-the-module-yml-file" aria-label="Permalink to "📜 Step 3: Create the \`module.yml\` File""></a></h2><p>The <code>module.yml</code> file contains metadata about your module, such as its name, version, and description. Create a new file named <code>module.yml</code> in the <code>src/main/resources</code> directory of your project.</p><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">name</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">MyModule</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">version</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1.0.0</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">description</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">This is a sample module for MoBot.</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">main</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">com.example.MyModule</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">authors</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Your Name</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">license</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">MIT</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">depedencies</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: []</span></span></code></pre></div><h3 id="explanation-of-the-fields" tabindex="-1">Explanation of the Fields <a class="header-anchor" href="#explanation-of-the-fields" aria-label="Permalink to "Explanation of the Fields""></a></h3><ul><li><strong>name</strong>: The name of your module.</li><li><strong>version</strong>: The version of your module.</li><li><strong>description</strong>: A brief description of your module.</li><li><strong>main</strong>: The fully qualified name of your main class.</li><li><strong>authors</strong>: A list of authors for your module.</li><li><strong>license</strong>: The license under which your module is distributed.</li><li><strong>dependencies</strong>: A list of other modules that your module depends on. This is optional and can be left empty if your module has no dependencies.</li></ul><h2 id="🚀-step-4-build-your-module" tabindex="-1">🚀 Step 4: Build Your Module <a class="header-anchor" href="#🚀-step-4-build-your-module" aria-label="Permalink to "🚀 Step 4: Build Your Module""></a></h2><p>Once you have created your main class and <code>module.yml</code> file, you can build your module using Maven. Open a terminal in the root directory of your project and run the following command:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">mvn</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clean</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> package</span></span></code></pre></div><p>This will create a JAR file for your module in the <code>target</code> directory. The JAR file will be named <code>MyModule-1.0.0.jar</code> (or whatever version you specified in the <code>module.yml</code> file).</p><p>Congratulations! You have successfully created a module for MoBot. Now you can load it into your MoBot instance and start using it.</p><h2 id="🔌-step-5-load-your-module-into-mobot" tabindex="-1">🔌 Step 5: Load Your Module into MoBot <a class="header-anchor" href="#🔌-step-5-load-your-module-into-mobot" aria-label="Permalink to "🔌 Step 5: Load Your Module into MoBot""></a></h2><p>To load your module into MoBot, simply place the JAR file you just created into the <code>modules</code> directory of your MoBot instance. When you start MoBot, it will automatically detect and load your module.</p><p>Need help? Join our <a href="https://discord.gg/KTF3Wsk85G" target="_blank" rel="noreferrer">Discord server</a> for support and to connect with other MoBot users.</p>`,37)]))}const u=i(n,[["render",l]]);export{c as __pageData,u as default};
|
||||
@@ -0,0 +1,35 @@
|
||||
import{_ as i,c as a,a0 as e,o as t}from"./chunks/framework.p2VkXzrt.js";const c=JSON.parse('{"title":"🧩 Creating a Module","description":"","frontmatter":{"banner_title":"MoBot - Creating a Module","banner_description":"Learn how to create a module for MoBot","head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-creating-a-module-modules-introduction.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-creating-a-module-modules-introduction.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/creating-a-module/modules-introduction.md","filePath":"mobot/creating-a-module/modules-introduction.md"}'),n={name:"mobot/creating-a-module/modules-introduction.md"};function l(o,s,h,p,r,d){return t(),a("div",null,s[0]||(s[0]=[e(`<h1 id="🧩-creating-a-module" tabindex="-1">🧩 Creating a Module <a class="header-anchor" href="#🧩-creating-a-module" aria-label="Permalink to "🧩 Creating a Module""></a></h1><p>MoBot is designed to be modular, allowing you to create your own modules to extend its functionality. This guide will walk you through the process of creating a module for MoBot.</p><h2 id="🧠-prerequisites" tabindex="-1">🧠 Prerequisites <a class="header-anchor" href="#🧠-prerequisites" aria-label="Permalink to "🧠 Prerequisites""></a></h2><p>Before we begin, make sure you’re comfortable with:</p><ul><li>Basic <strong>Java</strong> programming</li><li>Using <strong>Maven</strong> (or any preferred Java build tool)</li><li>Understanding the basics of how MoBot operates</li></ul><p>If you're new to Java or Maven, we recommend checking out a few beginner tutorials first.</p><p>Also, make sure you've reviewed the <a href="/mobot/introduction/installation.html">MoBot Installation Guide</a> to understand how the bot is structured and how modules fit into it.</p><h2 id="🧩-what-makes-a-module" tabindex="-1">🧩 What Makes a Module? <a class="header-anchor" href="#🧩-what-makes-a-module" aria-label="Permalink to "🧩 What Makes a Module?""></a></h2><p>For a module to be recognized and loaded by MoBot, it needs <strong>two essential parts</strong>:</p><ol><li>A <strong>Main class</strong> that extends <code>MbModule</code></li><li>A <strong><code>module.yml</code></strong> configuration file that defines metadata about the module</li></ol><p>Additionally, you’ll need to include the <strong>MoBot API</strong> as a dependency in your project.</p><h2 id="🛠-step-1-set-up-your-maven-project" tabindex="-1">🛠 Step 1: Set Up Your Maven Project <a class="header-anchor" href="#🛠-step-1-set-up-your-maven-project" aria-label="Permalink to "🛠 Step 1: Set Up Your Maven Project""></a></h2><p>To create a module, you need to set up a Maven project. You can do this using your favorite IDE or by using the command line. If you're using the command line, you can create a new Maven project with the following command:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">mvn</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> archetype:generate</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -DgroupId=com.example</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -DartifactId=MyModule</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -DarchetypeArtifactId=maven-archetype-quickstart</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -DinteractiveMode=false</span></span></code></pre></div><p>This will create a new Maven project looking something like this:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">MyModule/</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">├──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> pom.xml</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">└──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> src/</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> └──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> main/</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> └──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> java/</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> └──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> com/</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> └──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> example/</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> └──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> MyModule/</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> └──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> App.java</span></span></code></pre></div><h3 id="add-mobot-api-dependency" tabindex="-1">Add MoBot API Dependency <a class="header-anchor" href="#add-mobot-api-dependency" aria-label="Permalink to "Add MoBot API Dependency""></a></h3><p>To use the MoBot API in your module, you need to add it as a dependency in your <code>pom.xml</code> file. Open the <code>pom.xml</code> file and add the following lines inside the <code><repositories></code> and <code><dependencies></code> sections:</p><div class="language-xml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">xml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">repository</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">id</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>pixel-services-releases</</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">id</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">name</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>Pixel Services</</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">name</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">url</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>https://maven.pixel-services.com/releases</</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">url</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"></</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">repository</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">dependency</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">groupId</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>com.pixelservices.mobot</</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">groupId</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifactId</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>mobot-api</</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">artifactId</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">version</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>VERSION</</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">version</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">> </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"><!-- Replace VERSION --></span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"></</span><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">dependency</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">></span></span></code></pre></div><p>Make sure to replace <code>VERSION</code> with the latest version of the MoBot API.</p><p><a href="https://maven.pixel-services.com/#/releases/com/pixelservices/mobot/mobot-api" target="_blank" rel="noreferrer"><img src="https://img.shields.io/maven-metadata/v?metadataUrl=https://maven.pixel-services.com/releases/com/pixelservices/mobot/mobot-api/maven-metadata.xml" alt="Latest Version"></a></p><h2 id="🧱-step-2-create-your-main-class" tabindex="-1">🧱 Step 2: Create Your Main Class <a class="header-anchor" href="#🧱-step-2-create-your-main-class" aria-label="Permalink to "🧱 Step 2: Create Your Main Class""></a></h2><p>Either locate your existing main class or create a new one. This class will be the entry point for your module and should extend <code>MbModule</code>.</p><div class="language-java vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">java</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MyModule</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> extends</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MbModule</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Override</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onEnable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> //Do something</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> @</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">Override</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> public</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onDisable</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> //Do something</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="📜-step-3-create-the-module-yml-file" tabindex="-1">📜 Step 3: Create the <code>module.yml</code> File <a class="header-anchor" href="#📜-step-3-create-the-module-yml-file" aria-label="Permalink to "📜 Step 3: Create the \`module.yml\` File""></a></h2><p>The <code>module.yml</code> file contains metadata about your module, such as its name, version, and description. Create a new file named <code>module.yml</code> in the <code>src/main/resources</code> directory of your project.</p><div class="language-yaml vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">yaml</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">name</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">MyModule</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">version</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1.0.0</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">description</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">This is a sample module for MoBot.</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">main</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">com.example.MyModule</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">authors</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">Your Name</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">license</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">MIT</span></span>
|
||||
<span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">depedencies</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: []</span></span></code></pre></div><h3 id="explanation-of-the-fields" tabindex="-1">Explanation of the Fields <a class="header-anchor" href="#explanation-of-the-fields" aria-label="Permalink to "Explanation of the Fields""></a></h3><ul><li><strong>name</strong>: The name of your module.</li><li><strong>version</strong>: The version of your module.</li><li><strong>description</strong>: A brief description of your module.</li><li><strong>main</strong>: The fully qualified name of your main class.</li><li><strong>authors</strong>: A list of authors for your module.</li><li><strong>license</strong>: The license under which your module is distributed.</li><li><strong>dependencies</strong>: A list of other modules that your module depends on. This is optional and can be left empty if your module has no dependencies.</li></ul><h2 id="🚀-step-4-build-your-module" tabindex="-1">🚀 Step 4: Build Your Module <a class="header-anchor" href="#🚀-step-4-build-your-module" aria-label="Permalink to "🚀 Step 4: Build Your Module""></a></h2><p>Once you have created your main class and <code>module.yml</code> file, you can build your module using Maven. Open a terminal in the root directory of your project and run the following command:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">mvn</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clean</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> package</span></span></code></pre></div><p>This will create a JAR file for your module in the <code>target</code> directory. The JAR file will be named <code>MyModule-1.0.0.jar</code> (or whatever version you specified in the <code>module.yml</code> file).</p><p>Congratulations! You have successfully created a module for MoBot. Now you can load it into your MoBot instance and start using it.</p><h2 id="🔌-step-5-load-your-module-into-mobot" tabindex="-1">🔌 Step 5: Load Your Module into MoBot <a class="header-anchor" href="#🔌-step-5-load-your-module-into-mobot" aria-label="Permalink to "🔌 Step 5: Load Your Module into MoBot""></a></h2><p>To load your module into MoBot, simply place the JAR file you just created into the <code>modules</code> directory of your MoBot instance. When you start MoBot, it will automatically detect and load your module.</p><p>Need help? Join our <a href="https://discord.gg/KTF3Wsk85G" target="_blank" rel="noreferrer">Discord server</a> for support and to connect with other MoBot users.</p>`,37)]))}const u=i(n,[["render",l]]);export{c as __pageData,u as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as e,c as t,o as a}from"./chunks/framework.p2VkXzrt.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{"head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-events-creating-a-listener.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-events-creating-a-listener.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/events/creating-a-listener.md","filePath":"mobot/events/creating-a-listener.md"}'),n={name:"mobot/events/creating-a-listener.md"};function r(s,i,o,c,m,d){return a(),t("div")}const l=e(n,[["render",r]]);export{p as __pageData,l as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as e,c as t,o as a}from"./chunks/framework.p2VkXzrt.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{"head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-events-creating-a-listener.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-events-creating-a-listener.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/events/creating-a-listener.md","filePath":"mobot/events/creating-a-listener.md"}'),n={name:"mobot/events/creating-a-listener.md"};function r(s,i,o,c,m,d){return a(),t("div")}const l=e(n,[["render",r]]);export{p as __pageData,l as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as t,c as e,o as n}from"./chunks/framework.p2VkXzrt.js";const v=JSON.parse('{"title":"","description":"","frontmatter":{"head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-events-events-introduction.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-events-events-introduction.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/events/events-introduction.md","filePath":"mobot/events/events-introduction.md"}'),o={name:"mobot/events/events-introduction.md"};function a(s,r,i,c,m,d){return n(),e("div")}const _=t(o,[["render",a]]);export{v as __pageData,_ as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as t,c as e,o as n}from"./chunks/framework.p2VkXzrt.js";const v=JSON.parse('{"title":"","description":"","frontmatter":{"head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-events-events-introduction.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-events-events-introduction.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/events/events-introduction.md","filePath":"mobot/events/events-introduction.md"}'),o={name:"mobot/events/events-introduction.md"};function a(s,r,i,c,m,d){return n(),e("div")}const _=t(o,[["render",a]]);export{v as __pageData,_ as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as a,c as n,j as e,a as t,o as r}from"./chunks/framework.p2VkXzrt.js";const h=JSON.parse('{"title":"MoBot","description":"","frontmatter":{"banner_title":"MoBot - A Modular Discord Bot","banner_description":"MoBot is a modular Discord bot written in Java, with a feature rich API.","head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-index.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-index.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/index.md","filePath":"mobot/index.md"}'),i={name:"mobot/index.md"};function s(d,o,l,m,c,u){return r(),n("div",null,o[0]||(o[0]=[e("h1",{id:"mobot",tabindex:"-1"},[t("MoBot "),e("a",{class:"header-anchor",href:"#mobot","aria-label":'Permalink to "MoBot"'},"")],-1),e("p",null,"MoBot is a modular, extensible Discord bot framework built in Java. It's designed to give developers full control over bot behavior through a clean and powerful API, while keeping setup and module development approachable—even for beginners.",-1),e("p",null,"At its core, MoBot supports a plugin-like architecture that allows you to build and manage independent modules, each with its own logic, commands, event listeners, and dependencies. Whether you're creating small utilities or full-featured systems, MoBot provides the structure and flexibility to support your ideas.",-1),e("p",null,"Modules are easy to configure and hot-load, and the framework handles startup order, logging, and lifecycle management out of the box. With a strong focus on developer experience, MoBot includes detailed documentation and examples to help you get started quickly.",-1),e("p",null,[t("Ready to get started? Follow the "),e("a",{href:"/mobot/introduction/installation.html"},"Installation guide"),t(". Interested in building your own modules? Head over to "),e("a",{href:"/mobot/creating-a-module/modules-introduction.html"},"Creating a Module"),t(" to learn more.")],-1)]))}const g=a(i,[["render",s]]);export{h as __pageData,g as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{_ as a,c as n,j as e,a as t,o as r}from"./chunks/framework.p2VkXzrt.js";const h=JSON.parse('{"title":"MoBot","description":"","frontmatter":{"banner_title":"MoBot - A Modular Discord Bot","banner_description":"MoBot is a modular Discord bot written in Java, with a feature rich API.","head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-index.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-index.png"}],["meta",{"name":"twitter:card","content":"summary_large_image"}],["meta",{"name":"twitter:image:height","content":"1280"}],["meta",{"name":"twitter:image:width","content":"669"}],["meta",{"name":"twitter:description","content":""}]]},"headers":[],"relativePath":"mobot/index.md","filePath":"mobot/index.md"}'),i={name:"mobot/index.md"};function s(d,o,l,m,c,u){return r(),n("div",null,o[0]||(o[0]=[e("h1",{id:"mobot",tabindex:"-1"},[t("MoBot "),e("a",{class:"header-anchor",href:"#mobot","aria-label":'Permalink to "MoBot"'},"")],-1),e("p",null,"MoBot is a modular, extensible Discord bot framework built in Java. It's designed to give developers full control over bot behavior through a clean and powerful API, while keeping setup and module development approachable—even for beginners.",-1),e("p",null,"At its core, MoBot supports a plugin-like architecture that allows you to build and manage independent modules, each with its own logic, commands, event listeners, and dependencies. Whether you're creating small utilities or full-featured systems, MoBot provides the structure and flexibility to support your ideas.",-1),e("p",null,"Modules are easy to configure and hot-load, and the framework handles startup order, logging, and lifecycle management out of the box. With a strong focus on developer experience, MoBot includes detailed documentation and examples to help you get started quickly.",-1),e("p",null,[t("Ready to get started? Follow the "),e("a",{href:"/mobot/introduction/installation.html"},"Installation guide"),t(". Interested in building your own modules? Head over to "),e("a",{href:"/mobot/creating-a-module/modules-introduction.html"},"Creating a Module"),t(" to learn more.")],-1)]))}const g=a(i,[["render",s]]);export{h as __pageData,g as default};
|
||||
@@ -54,7 +54,7 @@
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> server.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">start</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h3 id="🚀-package-and-deploy-your-app" tabindex="-1">🚀 Package and Deploy your app! <a class="header-anchor" href="#🚀-package-and-deploy-your-app" aria-label="Permalink to "🚀 Package and Deploy your app!""></a></h3><p>With the frontend and backend code in place, you can now build the JAR file and deploy it to your server. The JAR file will contain both the frontend and backend code, making it easy to deploy and run your fullstack application.</p><p>All you've left to do is run the jarfile on any machine that has Java installed, and your fullstack application will be up and running!</p></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/flash/advanced/handler-default-implementations.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Handler Default Implementations</span><!--]--></a></div><div class="pager" data-v-1bcd8184><!----></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"sDYgKdFh\",\"mobot_index.md\":\"Be0Zoetq\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"MoBot Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"tEfotoPq\",\"mobot_commands_command-arguments.md\":\"Cuc3b3v9\",\"mobot_commands_creating-a-command.md\":\"DrPP2R0G\",\"mobot_configuration_custom-configs.md\":\"BBg-YrVf\",\"mobot_configuration_default-config.md\":\"CWK17AB-\",\"mobot_configuration_non-yaml-configs.md\":\"D1wDyLf4\",\"mobot_creating-a-module_module-lifecycle.md\":\"BfG9RjVD\",\"mobot_creating-a-module_modules-introduction.md\":\"BWpvzdqx\",\"mobot_events_creating-a-listener.md\":\"By59Lqsu\",\"mobot_events_events-introduction.md\":\"cEArHWcq\",\"mobot_index.md\":\"Bklchsn4\",\"mobot_introduction_installation.md\":\"D8x3Ns7p\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"Introduction\",\"items\":[{\"text\":\"Installation\",\"link\":\"/mobot/introduction/installation\"}]},{\"text\":\"Creating a Module\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot/creating-a-module/modules-introduction\"},{\"text\":\"Module Lifecycle\",\"link\":\"/mobot/creating-a-module/module-lifecycle\"}]},{\"text\":\"Commands\",\"collapsed\":false,\"items\":[{\"text\":\"Creating a Command\",\"link\":\"/mobot/commands/creating-a-command\"},{\"text\":\"Command Arguments\",\"link\":\"/mobot/commands/command-arguments\"}]},{\"text\":\"Events\",\"collapsed\":false,\"items\":[{\"text\":\"What are Events?\",\"link\":\"/mobot/events/events-introduction\"},{\"text\":\"Creating a Listener\",\"link\":\"/mobot/events/creating-a-listener\"}]},{\"text\":\"Configs\",\"collapsed\":false,\"items\":[{\"text\":\"Default Config\",\"link\":\"/mobot/configuration/default-config\"},{\"text\":\"Custom Configs\",\"link\":\"/mobot/configuration/custom-configs\"},{\"text\":\"Non Yaml Configs\",\"link\":\"/mobot/configuration/non-yaml-configs\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -127,7 +127,7 @@
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "{</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">username</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> +</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> user.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getUsername</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\"</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><hr><p>For reference, here's a visual representation of how an HDI chain operates: <br></p><p><img src="/assets/hdichain.FX-X2Mhu.png" alt="HDI Chain"></p></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/flash/file-serving/dynamic-file-server.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Dynamic Files Server</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/flash/advanced/fullstack-development.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Fullstack Development</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"sDYgKdFh\",\"mobot_index.md\":\"Be0Zoetq\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"MoBot Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"tEfotoPq\",\"mobot_commands_command-arguments.md\":\"Cuc3b3v9\",\"mobot_commands_creating-a-command.md\":\"DrPP2R0G\",\"mobot_configuration_custom-configs.md\":\"BBg-YrVf\",\"mobot_configuration_default-config.md\":\"CWK17AB-\",\"mobot_configuration_non-yaml-configs.md\":\"D1wDyLf4\",\"mobot_creating-a-module_module-lifecycle.md\":\"BfG9RjVD\",\"mobot_creating-a-module_modules-introduction.md\":\"BWpvzdqx\",\"mobot_events_creating-a-listener.md\":\"By59Lqsu\",\"mobot_events_events-introduction.md\":\"cEArHWcq\",\"mobot_index.md\":\"Bklchsn4\",\"mobot_introduction_installation.md\":\"D8x3Ns7p\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"Introduction\",\"items\":[{\"text\":\"Installation\",\"link\":\"/mobot/introduction/installation\"}]},{\"text\":\"Creating a Module\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot/creating-a-module/modules-introduction\"},{\"text\":\"Module Lifecycle\",\"link\":\"/mobot/creating-a-module/module-lifecycle\"}]},{\"text\":\"Commands\",\"collapsed\":false,\"items\":[{\"text\":\"Creating a Command\",\"link\":\"/mobot/commands/creating-a-command\"},{\"text\":\"Command Arguments\",\"link\":\"/mobot/commands/command-arguments\"}]},{\"text\":\"Events\",\"collapsed\":false,\"items\":[{\"text\":\"What are Events?\",\"link\":\"/mobot/events/events-introduction\"},{\"text\":\"Creating a Listener\",\"link\":\"/mobot/events/creating-a-listener\"}]},{\"text\":\"Configs\",\"collapsed\":false,\"items\":[{\"text\":\"Default Config\",\"link\":\"/mobot/configuration/default-config\"},{\"text\":\"Custom Configs\",\"link\":\"/mobot/configuration/custom-configs\"},{\"text\":\"Non Yaml Configs\",\"link\":\"/mobot/configuration/non-yaml-configs\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -37,7 +37,7 @@
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> response;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>Any logic that needs to be executed before the request handler is registered must be done within the constructor.</p></div><h2 id="request-handler-methods" tabindex="-1">Request Handler methods <a class="header-anchor" href="#request-handler-methods" aria-label="Permalink to "Request Handler methods""></a></h2><p>The <code>RequestHandler</code> class provides several methods that can be used to interact with the request and response objects easily and safely. Following are listed the methods available in the <code>RequestHandler</code> class, with a brief description of their purpose:</p><table tabindex="0"><thead><tr><th>Method</th><th>Params</th><th>Description</th></tr></thead><tbody><tr><td><code>getRequestBody()</code></td><td><code>none</code></td><td>Returns a <code>JSONObject</code> representation of the request body.</td></tr><tr><td><code>getSpecification()</code></td><td><code>none</code></td><td>Returns an instance of <code>HandlerSpecification</code> containing all sorts of information about the handler.</td></tr><tr><td><code>expectedRequestParameter()</code></td><td><code>String name, description</code></td><td>Returns an instance of <code>ExpectedRequestParameter</code> for the specified parameter name.</td></tr><tr><td><code>expectedBodyField()</code></td><td><code>String name, description</code></td><td>Returns an instance of <code>ExpectedBodyField</code> for the specified field name.</td></tr><tr><td><code>expectedBodyFile()</code></td><td><code>String name, description</code></td><td>Returns an instance of <code>ExpectedBodyFile</code> for the specified file name.</td></tr></tbody></table><p>(More on the <code>ExpectedRequestParameter</code>, <code>ExpectedBodyField</code>, and <code>ExpectedBodyFile</code> classes in the next section).</p></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/flash/core-concepts/handlers.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Handlers</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/flash/core-concepts/request-response.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Request and Response</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"sDYgKdFh\",\"mobot_index.md\":\"Be0Zoetq\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"MoBot Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"tEfotoPq\",\"mobot_commands_command-arguments.md\":\"Cuc3b3v9\",\"mobot_commands_creating-a-command.md\":\"DrPP2R0G\",\"mobot_configuration_custom-configs.md\":\"BBg-YrVf\",\"mobot_configuration_default-config.md\":\"CWK17AB-\",\"mobot_configuration_non-yaml-configs.md\":\"D1wDyLf4\",\"mobot_creating-a-module_module-lifecycle.md\":\"BfG9RjVD\",\"mobot_creating-a-module_modules-introduction.md\":\"BWpvzdqx\",\"mobot_events_creating-a-listener.md\":\"By59Lqsu\",\"mobot_events_events-introduction.md\":\"cEArHWcq\",\"mobot_index.md\":\"Bklchsn4\",\"mobot_introduction_installation.md\":\"D8x3Ns7p\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"Introduction\",\"items\":[{\"text\":\"Installation\",\"link\":\"/mobot/introduction/installation\"}]},{\"text\":\"Creating a Module\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot/creating-a-module/modules-introduction\"},{\"text\":\"Module Lifecycle\",\"link\":\"/mobot/creating-a-module/module-lifecycle\"}]},{\"text\":\"Commands\",\"collapsed\":false,\"items\":[{\"text\":\"Creating a Command\",\"link\":\"/mobot/commands/creating-a-command\"},{\"text\":\"Command Arguments\",\"link\":\"/mobot/commands/command-arguments\"}]},{\"text\":\"Events\",\"collapsed\":false,\"items\":[{\"text\":\"What are Events?\",\"link\":\"/mobot/events/events-introduction\"},{\"text\":\"Creating a Listener\",\"link\":\"/mobot/events/creating-a-listener\"}]},{\"text\":\"Configs\",\"collapsed\":false,\"items\":[{\"text\":\"Default Config\",\"link\":\"/mobot/configuration/default-config\"},{\"text\":\"Custom Configs\",\"link\":\"/mobot/configuration/custom-configs\"},{\"text\":\"Non Yaml Configs\",\"link\":\"/mobot/configuration/non-yaml-configs\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -92,7 +92,7 @@
|
||||
<span class="line highlighted"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "File saved at: "</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> +</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> myFile.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getAbsolutePath</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>This time, you will need to use a tool like <code>Postman</code> to send a POST request to <code>/helloFile</code> with a multipart form data body containing a file named <code>myFile</code>. You should receive a response like <code>File saved at: <path></code> where <code><path></code> is the location where the server saved the file.</p></details></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/flash/core-concepts/request-handler.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>RequestHandler</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/flash/core-concepts/server-router.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Server Router</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"sDYgKdFh\",\"mobot_index.md\":\"Be0Zoetq\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"MoBot Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"tEfotoPq\",\"mobot_commands_command-arguments.md\":\"Cuc3b3v9\",\"mobot_commands_creating-a-command.md\":\"DrPP2R0G\",\"mobot_configuration_custom-configs.md\":\"BBg-YrVf\",\"mobot_configuration_default-config.md\":\"CWK17AB-\",\"mobot_configuration_non-yaml-configs.md\":\"D1wDyLf4\",\"mobot_creating-a-module_module-lifecycle.md\":\"BfG9RjVD\",\"mobot_creating-a-module_modules-introduction.md\":\"BWpvzdqx\",\"mobot_events_creating-a-listener.md\":\"By59Lqsu\",\"mobot_events_events-introduction.md\":\"cEArHWcq\",\"mobot_index.md\":\"Bklchsn4\",\"mobot_introduction_installation.md\":\"D8x3Ns7p\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"Introduction\",\"items\":[{\"text\":\"Installation\",\"link\":\"/mobot/introduction/installation\"}]},{\"text\":\"Creating a Module\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot/creating-a-module/modules-introduction\"},{\"text\":\"Module Lifecycle\",\"link\":\"/mobot/creating-a-module/module-lifecycle\"}]},{\"text\":\"Commands\",\"collapsed\":false,\"items\":[{\"text\":\"Creating a Command\",\"link\":\"/mobot/commands/creating-a-command\"},{\"text\":\"Command Arguments\",\"link\":\"/mobot/commands/command-arguments\"}]},{\"text\":\"Events\",\"collapsed\":false,\"items\":[{\"text\":\"What are Events?\",\"link\":\"/mobot/events/events-introduction\"},{\"text\":\"Creating a Listener\",\"link\":\"/mobot/events/creating-a-listener\"}]},{\"text\":\"Configs\",\"collapsed\":false,\"items\":[{\"text\":\"Default Config\",\"link\":\"/mobot/configuration/default-config\"},{\"text\":\"Custom Configs\",\"link\":\"/mobot/configuration/custom-configs\"},{\"text\":\"Non Yaml Configs\",\"link\":\"/mobot/configuration/non-yaml-configs\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -49,7 +49,7 @@
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> response;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>In the example above, we create an <code>/api</code> router and register the <code>MyHandler</code> class to handle requests on the <code>/api/hello</code> endpoint.</p><p>This is because the <code>path</code> property of the <code>RouteInfo</code> annotation is relative to the base path of the router, which in this case is <code>/api</code>.</p><p>Visiting <code>/api/hello</code> from your browser will result in the response <code>Hello, world!</code>.</p></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/flash/core-concepts/request-response.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Request and Response</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/flash/core-concepts/websockets.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Websockets</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"sDYgKdFh\",\"mobot_index.md\":\"Be0Zoetq\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"MoBot Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"tEfotoPq\",\"mobot_commands_command-arguments.md\":\"Cuc3b3v9\",\"mobot_commands_creating-a-command.md\":\"DrPP2R0G\",\"mobot_configuration_custom-configs.md\":\"BBg-YrVf\",\"mobot_configuration_default-config.md\":\"CWK17AB-\",\"mobot_configuration_non-yaml-configs.md\":\"D1wDyLf4\",\"mobot_creating-a-module_module-lifecycle.md\":\"BfG9RjVD\",\"mobot_creating-a-module_modules-introduction.md\":\"BWpvzdqx\",\"mobot_events_creating-a-listener.md\":\"By59Lqsu\",\"mobot_events_events-introduction.md\":\"cEArHWcq\",\"mobot_index.md\":\"Bklchsn4\",\"mobot_introduction_installation.md\":\"D8x3Ns7p\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"Introduction\",\"items\":[{\"text\":\"Installation\",\"link\":\"/mobot/introduction/installation\"}]},{\"text\":\"Creating a Module\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot/creating-a-module/modules-introduction\"},{\"text\":\"Module Lifecycle\",\"link\":\"/mobot/creating-a-module/module-lifecycle\"}]},{\"text\":\"Commands\",\"collapsed\":false,\"items\":[{\"text\":\"Creating a Command\",\"link\":\"/mobot/commands/creating-a-command\"},{\"text\":\"Command Arguments\",\"link\":\"/mobot/commands/command-arguments\"}]},{\"text\":\"Events\",\"collapsed\":false,\"items\":[{\"text\":\"What are Events?\",\"link\":\"/mobot/events/events-introduction\"},{\"text\":\"Creating a Listener\",\"link\":\"/mobot/events/creating-a-listener\"}]},{\"text\":\"Configs\",\"collapsed\":false,\"items\":[{\"text\":\"Default Config\",\"link\":\"/mobot/configuration/default-config\"},{\"text\":\"Custom Configs\",\"link\":\"/mobot/configuration/custom-configs\"},{\"text\":\"Non Yaml Configs\",\"link\":\"/mobot/configuration/non-yaml-configs\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -58,7 +58,7 @@
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> server.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">start</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="interacting-with-websockets-sessions" tabindex="-1">Interacting with Websockets sessions <a class="header-anchor" href="#interacting-with-websockets-sessions" aria-label="Permalink to "Interacting with Websockets sessions""></a></h2><p>The <code>WebSocketSession</code> object provides methods to interact with the Websocket session, such as sending messages, closing the connection, and getting the remote address and session ID.</p><table tabindex="0"><thead><tr><th>Method</th><th>Params</th><th>Description</th></tr></thead><tbody><tr><td><code>getChannel()</code></td><td><code>none</code></td><td>Returns an instance of <code>AsynchronousSocketChannel</code> useful for retrieving info about the client .</td></tr><tr><td><code>getRequestInfo()</code></td><td><code>none</code></td><td>Returns an instance of <code>RequestInfo</code> containing all sorts of information about the request (headers, method, path etc.) .</td></tr><tr><td><code>getPath()</code></td><td><code>none</code></td><td>Returns the path to the websocket endpoint as a <code>String</code>.</td></tr><tr><td><code>getId()</code></td><td><code>none</code></td><td>Returns the id of the websocket session as a <code>String</code>, useful if you want to keep track of the connected clients in a custom manager.</td></tr><tr><td><code>getBuffer()</code></td><td><code>none</code></td><td>Returns the ByteBuffer for that session.</td></tr><tr><td><code>sendMessage()</code></td><td><code>String message</code></td><td>Sends the <code>message</code> to the client as a <code>String</code>. it's up to the developer to stringify and de-stringify any data you want to send back and forth</td></tr><tr><td><code>close()</code></td><td><code>none</code></td><td>Closes the websocket session.</td></tr></tbody></table><div class="warning custom-block"><p class="custom-block-title">NOTE</p><p><code>WebsocketHandler</code> includes a <code>setId(String id)</code> method for overriding the default session ID. Unless you have a specific reason to change it, it's best to leave it as is.</p><p>Similarly, the <code>setBuffer(ByteBuffer buffer)</code> method allows you to override the default buffer. If you're unsure about this, it's recommended to keep the default setting.</p></div></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/flash/core-concepts/server-router.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Server Router</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/flash/file-serving/static-file-server.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Static Files Server</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"sDYgKdFh\",\"mobot_index.md\":\"Be0Zoetq\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"MoBot Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"tEfotoPq\",\"mobot_commands_command-arguments.md\":\"Cuc3b3v9\",\"mobot_commands_creating-a-command.md\":\"DrPP2R0G\",\"mobot_configuration_custom-configs.md\":\"BBg-YrVf\",\"mobot_configuration_default-config.md\":\"CWK17AB-\",\"mobot_configuration_non-yaml-configs.md\":\"D1wDyLf4\",\"mobot_creating-a-module_module-lifecycle.md\":\"BfG9RjVD\",\"mobot_creating-a-module_modules-introduction.md\":\"BWpvzdqx\",\"mobot_events_creating-a-listener.md\":\"By59Lqsu\",\"mobot_events_events-introduction.md\":\"cEArHWcq\",\"mobot_index.md\":\"Bklchsn4\",\"mobot_introduction_installation.md\":\"D8x3Ns7p\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"Introduction\",\"items\":[{\"text\":\"Installation\",\"link\":\"/mobot/introduction/installation\"}]},{\"text\":\"Creating a Module\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot/creating-a-module/modules-introduction\"},{\"text\":\"Module Lifecycle\",\"link\":\"/mobot/creating-a-module/module-lifecycle\"}]},{\"text\":\"Commands\",\"collapsed\":false,\"items\":[{\"text\":\"Creating a Command\",\"link\":\"/mobot/commands/creating-a-command\"},{\"text\":\"Command Arguments\",\"link\":\"/mobot/commands/command-arguments\"}]},{\"text\":\"Events\",\"collapsed\":false,\"items\":[{\"text\":\"What are Events?\",\"link\":\"/mobot/events/events-introduction\"},{\"text\":\"Creating a Listener\",\"link\":\"/mobot/events/creating-a-listener\"}]},{\"text\":\"Configs\",\"collapsed\":false,\"items\":[{\"text\":\"Default Config\",\"link\":\"/mobot/configuration/default-config\"},{\"text\":\"Custom Configs\",\"link\":\"/mobot/configuration/custom-configs\"},{\"text\":\"Non Yaml Configs\",\"link\":\"/mobot/configuration/non-yaml-configs\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -53,7 +53,7 @@
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ));</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/flash/file-serving/static-file-server.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Static Files Server</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/flash/advanced/handler-default-implementations.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Handler Default Implementations</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"sDYgKdFh\",\"mobot_index.md\":\"Be0Zoetq\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"MoBot Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"tEfotoPq\",\"mobot_commands_command-arguments.md\":\"Cuc3b3v9\",\"mobot_commands_creating-a-command.md\":\"DrPP2R0G\",\"mobot_configuration_custom-configs.md\":\"BBg-YrVf\",\"mobot_configuration_default-config.md\":\"CWK17AB-\",\"mobot_configuration_non-yaml-configs.md\":\"D1wDyLf4\",\"mobot_creating-a-module_module-lifecycle.md\":\"BfG9RjVD\",\"mobot_creating-a-module_modules-introduction.md\":\"BWpvzdqx\",\"mobot_events_creating-a-listener.md\":\"By59Lqsu\",\"mobot_events_events-introduction.md\":\"cEArHWcq\",\"mobot_index.md\":\"Bklchsn4\",\"mobot_introduction_installation.md\":\"D8x3Ns7p\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"Introduction\",\"items\":[{\"text\":\"Installation\",\"link\":\"/mobot/introduction/installation\"}]},{\"text\":\"Creating a Module\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot/creating-a-module/modules-introduction\"},{\"text\":\"Module Lifecycle\",\"link\":\"/mobot/creating-a-module/module-lifecycle\"}]},{\"text\":\"Commands\",\"collapsed\":false,\"items\":[{\"text\":\"Creating a Command\",\"link\":\"/mobot/commands/creating-a-command\"},{\"text\":\"Command Arguments\",\"link\":\"/mobot/commands/command-arguments\"}]},{\"text\":\"Events\",\"collapsed\":false,\"items\":[{\"text\":\"What are Events?\",\"link\":\"/mobot/events/events-introduction\"},{\"text\":\"Creating a Listener\",\"link\":\"/mobot/events/creating-a-listener\"}]},{\"text\":\"Configs\",\"collapsed\":false,\"items\":[{\"text\":\"Default Config\",\"link\":\"/mobot/configuration/default-config\"},{\"text\":\"Custom Configs\",\"link\":\"/mobot/configuration/custom-configs\"},{\"text\":\"Non Yaml Configs\",\"link\":\"/mobot/configuration/non-yaml-configs\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -53,7 +53,7 @@
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ));</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/flash/core-concepts/websockets.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Websockets</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/flash/file-serving/dynamic-file-server.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Dynamic Files Server</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"sDYgKdFh\",\"mobot_index.md\":\"Be0Zoetq\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"MoBot Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"tEfotoPq\",\"mobot_commands_command-arguments.md\":\"Cuc3b3v9\",\"mobot_commands_creating-a-command.md\":\"DrPP2R0G\",\"mobot_configuration_custom-configs.md\":\"BBg-YrVf\",\"mobot_configuration_default-config.md\":\"CWK17AB-\",\"mobot_configuration_non-yaml-configs.md\":\"D1wDyLf4\",\"mobot_creating-a-module_module-lifecycle.md\":\"BfG9RjVD\",\"mobot_creating-a-module_modules-introduction.md\":\"BWpvzdqx\",\"mobot_events_creating-a-listener.md\":\"By59Lqsu\",\"mobot_events_events-introduction.md\":\"cEArHWcq\",\"mobot_index.md\":\"Bklchsn4\",\"mobot_introduction_installation.md\":\"D8x3Ns7p\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"Introduction\",\"items\":[{\"text\":\"Installation\",\"link\":\"/mobot/introduction/installation\"}]},{\"text\":\"Creating a Module\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot/creating-a-module/modules-introduction\"},{\"text\":\"Module Lifecycle\",\"link\":\"/mobot/creating-a-module/module-lifecycle\"}]},{\"text\":\"Commands\",\"collapsed\":false,\"items\":[{\"text\":\"Creating a Command\",\"link\":\"/mobot/commands/creating-a-command\"},{\"text\":\"Command Arguments\",\"link\":\"/mobot/commands/command-arguments\"}]},{\"text\":\"Events\",\"collapsed\":false,\"items\":[{\"text\":\"What are Events?\",\"link\":\"/mobot/events/events-introduction\"},{\"text\":\"Creating a Listener\",\"link\":\"/mobot/events/creating-a-listener\"}]},{\"text\":\"Configs\",\"collapsed\":false,\"items\":[{\"text\":\"Default Config\",\"link\":\"/mobot/configuration/default-config\"},{\"text\":\"Custom Configs\",\"link\":\"/mobot/configuration/custom-configs\"},{\"text\":\"Non Yaml Configs\",\"link\":\"/mobot/configuration/non-yaml-configs\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -44,7 +44,7 @@
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></li><li><p>And the dependency :</p><div class="language-groovy vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">groovy</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">dependencies {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> implementation </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">'com.pixelservices:flash:{{ latestVersion }}'</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></li></ol><div> ⚡ Latest version: <a href="https://maven.pixel-services.com/#/releases/com/pixelservices/flash" style="text-decoration:underline;color:#007bff;"><strong></strong></a></div></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/flash.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Getting Started</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/flash/core-concepts/handlers.html" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Handlers</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"sDYgKdFh\",\"mobot_index.md\":\"Be0Zoetq\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"MoBot Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"flash_advanced_fullstack-development.md\":\"DFJ2Nfm_\",\"flash_advanced_handler-default-implementations.md\":\"CRxyEpV6\",\"flash_core-concepts_handlers.md\":\"BZuBmBSX\",\"flash_core-concepts_request-handler.md\":\"fjZWLpOw\",\"flash_core-concepts_request-response.md\":\"BuTSfkDO\",\"flash_core-concepts_server-router.md\":\"DIWo49Yl\",\"flash_core-concepts_websockets.md\":\"ByGVX96c\",\"flash_file-serving_dynamic-file-server.md\":\"DY_r4ecH\",\"flash_file-serving_static-file-server.md\":\"BvN0FZB2\",\"flash_index.md\":\"CAxgiNVz\",\"flash_introduction_installation.md\":\"BEOKwAAp\",\"index.md\":\"tEfotoPq\",\"mobot_commands_command-arguments.md\":\"Cuc3b3v9\",\"mobot_commands_creating-a-command.md\":\"DrPP2R0G\",\"mobot_configuration_custom-configs.md\":\"BBg-YrVf\",\"mobot_configuration_default-config.md\":\"CWK17AB-\",\"mobot_configuration_non-yaml-configs.md\":\"D1wDyLf4\",\"mobot_creating-a-module_module-lifecycle.md\":\"BfG9RjVD\",\"mobot_creating-a-module_modules-introduction.md\":\"BWpvzdqx\",\"mobot_events_creating-a-listener.md\":\"By59Lqsu\",\"mobot_events_events-introduction.md\":\"cEArHWcq\",\"mobot_index.md\":\"Bklchsn4\",\"mobot_introduction_installation.md\":\"D8x3Ns7p\",\"serverlibraries_index.md\":\"CeIqSPIs\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Pixel Services Docs\",\"description\":\"Documentation for all public Pixel Services projects.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"https://static.pixel-services.com/static/assets/pservices_logo.png\",\"sidebar\":{\"/flash/\":[{\"text\":\"Introduction\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/flash\"},{\"text\":\"Installation\",\"link\":\"/flash/introduction/installation\"}]},{\"text\":\"Core Concepts\",\"collapsed\":false,\"items\":[{\"text\":\"Handlers\",\"link\":\"/flash/core-concepts/handlers\"},{\"text\":\"RequestHandler\",\"link\":\"/flash/core-concepts/request-handler\"},{\"text\":\"Request and Response\",\"link\":\"/flash/core-concepts/request-response\"},{\"text\":\"Server Router\",\"link\":\"/flash/core-concepts/server-router\"},{\"text\":\"Websockets\",\"link\":\"/flash/core-concepts/websockets\"}]},{\"text\":\"File Serving\",\"collapsed\":false,\"items\":[{\"text\":\"Static Files Server\",\"link\":\"/flash/file-serving/static-file-server\"},{\"text\":\"Dynamic Files Server\",\"link\":\"/flash/file-serving/dynamic-file-server\"}]},{\"text\":\"Advanced\",\"collapsed\":false,\"items\":[{\"text\":\"Handler Default Implementations\",\"link\":\"/flash/advanced/handler-default-implementations\"},{\"text\":\"Fullstack Development\",\"link\":\"/flash/advanced/fullstack-development\"}]}],\"/mobot/\":[{\"text\":\"Introduction\",\"items\":[{\"text\":\"Installation\",\"link\":\"/mobot/introduction/installation\"}]},{\"text\":\"Creating a Module\",\"collapsed\":false,\"items\":[{\"text\":\"Getting Started\",\"link\":\"/mobot/creating-a-module/modules-introduction\"},{\"text\":\"Module Lifecycle\",\"link\":\"/mobot/creating-a-module/module-lifecycle\"}]},{\"text\":\"Commands\",\"collapsed\":false,\"items\":[{\"text\":\"Creating a Command\",\"link\":\"/mobot/commands/creating-a-command\"},{\"text\":\"Command Arguments\",\"link\":\"/mobot/commands/command-arguments\"}]},{\"text\":\"Events\",\"collapsed\":false,\"items\":[{\"text\":\"What are Events?\",\"link\":\"/mobot/events/events-introduction\"},{\"text\":\"Creating a Listener\",\"link\":\"/mobot/events/creating-a-listener\"}]},{\"text\":\"Configs\",\"collapsed\":false,\"items\":[{\"text\":\"Default Config\",\"link\":\"/mobot/configuration/default-config\"},{\"text\":\"Custom Configs\",\"link\":\"/mobot/configuration/custom-configs\"},{\"text\":\"Non Yaml Configs\",\"link\":\"/mobot/configuration/non-yaml-configs\"}]}],\"/serverlibraries/\":[{\"text\":\"ServerLibraries Documentation\",\"items\":[{\"text\":\"Getting Started\",\"link\":\"/serverlibraries\"}]}]}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +1 @@
|
||||
{"flash_advanced_fullstack-development.md":"DFJ2Nfm_","flash_advanced_handler-default-implementations.md":"CRxyEpV6","flash_core-concepts_handlers.md":"BZuBmBSX","flash_core-concepts_request-handler.md":"fjZWLpOw","flash_core-concepts_request-response.md":"BuTSfkDO","flash_core-concepts_server-router.md":"DIWo49Yl","flash_core-concepts_websockets.md":"ByGVX96c","flash_file-serving_dynamic-file-server.md":"DY_r4ecH","flash_file-serving_static-file-server.md":"BvN0FZB2","flash_index.md":"CAxgiNVz","flash_introduction_installation.md":"BEOKwAAp","index.md":"sDYgKdFh","mobot_index.md":"Be0Zoetq","serverlibraries_index.md":"CeIqSPIs"}
|
||||
{"flash_advanced_fullstack-development.md":"DFJ2Nfm_","flash_advanced_handler-default-implementations.md":"CRxyEpV6","flash_core-concepts_handlers.md":"BZuBmBSX","flash_core-concepts_request-handler.md":"fjZWLpOw","flash_core-concepts_request-response.md":"BuTSfkDO","flash_core-concepts_server-router.md":"DIWo49Yl","flash_core-concepts_websockets.md":"ByGVX96c","flash_file-serving_dynamic-file-server.md":"DY_r4ecH","flash_file-serving_static-file-server.md":"BvN0FZB2","flash_index.md":"CAxgiNVz","flash_introduction_installation.md":"BEOKwAAp","index.md":"tEfotoPq","mobot_commands_command-arguments.md":"Cuc3b3v9","mobot_commands_creating-a-command.md":"DrPP2R0G","mobot_configuration_custom-configs.md":"BBg-YrVf","mobot_configuration_default-config.md":"CWK17AB-","mobot_configuration_non-yaml-configs.md":"D1wDyLf4","mobot_creating-a-module_module-lifecycle.md":"BfG9RjVD","mobot_creating-a-module_modules-introduction.md":"BWpvzdqx","mobot_events_creating-a-listener.md":"By59Lqsu","mobot_events_events-introduction.md":"cEArHWcq","mobot_index.md":"Bklchsn4","mobot_introduction_installation.md":"D8x3Ns7p","serverlibraries_index.md":"CeIqSPIs"}
|
||||
|
||||