6 lines
9.0 KiB
JavaScript
6 lines
9.0 KiB
JavaScript
import{_ as e,c as o,a0 as a,o as i}from"./chunks/framework.p2VkXzrt.js";const p=JSON.parse('{"title":"📦 Installation","description":"","frontmatter":{"banner_title":"MoBot - Installation","banner_description":"How to install MoBot and set up MoBot","head":[["meta",{"name":"twitter:image","content":"/assets/banner-cards/mobot-introduction-installation.png"}],["meta",{"name":"twitter:image:src","content":"https://docs.pixel-services.com/assets/banner-cards/mobot-introduction-installation.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/introduction/installation.md","filePath":"mobot/introduction/installation.md"}'),s={name:"mobot/introduction/installation.md"};function n(l,t,r,d,h,c){return i(),o("div",null,t[0]||(t[0]=[a(`<h1 id="📦-installation" tabindex="-1">📦 Installation <a class="header-anchor" href="#📦-installation" aria-label="Permalink to "📦 Installation""></a></h1><p>Follow these steps to install and set up MoBot on your machine. MoBot is designed to be easy to install and configure, so you can get started quickly.</p><h2 id="🔧-requirements" tabindex="-1">🔧 Requirements <a class="header-anchor" href="#🔧-requirements" aria-label="Permalink to "🔧 Requirements""></a></h2><ul><li>Java 17 or higher</li><li>A Discord Bot Token (You can create one by following the instructions below)</li></ul><h2 id="🤖-create-a-discord-bot" tabindex="-1">🤖 Create a Discord Bot <a class="header-anchor" href="#🤖-create-a-discord-bot" aria-label="Permalink to "🤖 Create a Discord Bot""></a></h2><p>If you already have a Discord bot, you can skip this step. If you don't have a bot yet, follow these steps to create one:</p><details class="details custom-block"><summary>Click to expand</summary><ol><li>Go to the <a href="https://discord.com/developers/applications" target="_blank" rel="noreferrer">Discord Developer Portal</a>.</li><li>Click on the "New Application" button.</li><li>Enter a name for your application and click "Create".</li><li>In the left sidebar, click on "Bot".</li><li>Click on the "Add Bot" button.</li><li>Under the "Token" section, click on "Copy" to copy your bot token. <strong>Keep this token secret!</strong> It is used to authenticate your bot with Discord.</li><li>Under the "Privileged Gateway Intents" section, enable the intents you need for your bot. For example, if your bot needs to read messages in channels, enable the "Message Content Intent".</li><li>Under the "OAuth2" section, select the "bot" scope and the permissions your bot needs. This will generate a URL that you can use to invite your bot to your server.</li><li>Copy the generated URL and paste it into your browser. Select the server you want to invite your bot to and click "Authorize".</li><li>Your bot is now created and invited to your server!</li></ol></details><h2 id="📥-download-mobot" tabindex="-1">📥 Download MoBot <a class="header-anchor" href="#📥-download-mobot" aria-label="Permalink to "📥 Download MoBot""></a></h2><p>Grab the latest release from the <a href="https://github.com/Pixel-Services/MoBot/releases" target="_blank" rel="noreferrer">Releases Page</a>.</p><ol><li>Go to the <a href="https://github.com/Pixel-Services/MoBot/releases" target="_blank" rel="noreferrer">Releases Page</a></li><li>Download the latest <code>MoBot.jar</code> file.</li></ol><h2 id="🚀-run-mobot-for-the-first-time" tabindex="-1">🚀 Run MoBot for the First Time <a class="header-anchor" href="#🚀-run-mobot-for-the-first-time" aria-label="Permalink to "🚀 Run MoBot for the First Time""></a></h2><p>In your terminal, navigate to the directory where you downloaded <code>MoBot.jar</code> 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;">java</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -jar</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> MoBot.jar</span></span></code></pre></div><p>When you run MoBot for the first time, MoBot will ask you for a <strong>Discord bot token</strong>. You can get your token from the <a href="https://discord.com/developers/applications" target="_blank" rel="noreferrer">Discord Developer Portal</a>.</p><p>Once you enter your token, MoBot will create a <code>bot.yml</code> file in the same directory. This file contains your bot's configuration settings. Additionally, MoBot will create a <code>modules</code> directory where you can place your custom modules.</p><p>It should look 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;">mobot/</span></span>
|
||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">├──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> MoBot.jar</span></span>
|
||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">├──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bot.yml</span></span>
|
||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">└──</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> modules/</span></span></code></pre></div><h2 id="⚙️-configure-mobot" tabindex="-1">⚙️ Configure MoBot <a class="header-anchor" href="#⚙️-configure-mobot" aria-label="Permalink to "⚙️ Configure MoBot""></a></h2><p>Open the <code>bot.yml</code> file in a text editor. This file contains the configuration settings for your bot. You can customize various settings, such as:</p><ul><li><strong>Token</strong>: Your Discord bot token.</li><li><strong>Gateway Intents</strong>: The intents your bot will use. You can add or remove intents as needed.</li><li><strong>Check Updates</strong>: Whether to check for updates on startup.</li></ul><p>Depending on what modules you have installed, you may need to enable specific intents. For example, if you have a module that requires the <code>GUILD_MEMBERS</code> intent, you need to add it in the <code>bot.yml</code> file.</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;">intents</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:#032F62;--shiki-dark:#9ECBFF;">GUILD_MEMBERS</span></span></code></pre></div><h2 id="🔌-install-modules" tabindex="-1">🔌 Install Modules <a class="header-anchor" href="#🔌-install-modules" aria-label="Permalink to "🔌 Install Modules""></a></h2><p>As of today, there is no official MoBot module repository. However, you can find some community modules on our Discord. To install a module, simply place the module's <code>.jar</code> file in the <code>modules</code> directory. MoBot will automatically load the module on startup.</p><p>You can also create your own modules! Check out the <a href="/mobot/creating-a-module/modules-introduction.html">Creating a Module</a> section for more information on how to create and manage your own modules.</p><h2 id="✅-start-the-bot" tabindex="-1">✅ Start the Bot <a class="header-anchor" href="#✅-start-the-bot" aria-label="Permalink to "✅ Start the Bot""></a></h2><p>Once you have configured your bot and installed any necessary modules, you can start the bot by running the following command in your terminal:</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;">java</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -jar</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> MoBot.jar</span></span></code></pre></div><p>You should see logs indicating that the bot and any modules have been loaded successfully.</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>`,30)]))}const m=e(s,[["render",n]]);export{p as __pageData,m as default};
|