Skip to content

Pixel-Services/MoBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Latest Version Documentation

Overview

MoBot is a modular Discord bot with a powerful, feature-rich API that lets developers build custom modules and extend the bot with all kinds of functionality.

📋 Table of Contents

Installation

To set up MoBot, download the latest release from the releases page and run it.

java -jar MoBot.jar

On the first run, MoBot will create a bot.yml file in the same directory. This file contains all the necessary configurations for the bot. Inside the bot.yml file, you will have to set the token.

For more information on Discord Bot Tokens check here.

Additionally to the bot.yml file, MoBot will create a modules folder. This folder is where you will place your modules.

Enjoy.

Creating a Module

To create a module for MoBot, follow these steps:

  1. Create a Java Project (Maven/Gradle):
  • Maven: Add the MoBot dependency in pom.xml:
<repository>
  <id>pixel-services-releases</id>
  <name>Pixel Services</name>
  <url>https://maven.pixel-services.com/releases</url>
</repository>

<dependency>
    <groupId>com.pixelservices.mobot</groupId>
    <artifactId>mobot-api</artifactId>
    <version>VERSION</version> <!-- Replace VERSION -->
</dependency>
  • Gradle: Add the dependency in build.gradle:
maven {
    name "pixelServicesReleases"
    url "https://maven.pixel-services.com/releases"
}

dependencies {
  implementation "com.pixelservices.mobot:mobot-api:VERSION"  // Replace VERSION
}
  1. Create Main Class: Extend the MbModule class and override the onEnable and onDisable methods:
public class WelcomeModule extends MbModule {
    @Override
    public void onEnable() {
        //Do something
    }

    @Override
    public void onDisable() {
        //Do something
    }
}
  1. Create module.yml: Add a module.yml file in the resources folder and define the module details:
name: WelcomeModule
version: 1.0.0
main: com.example.WelcomeModule
authors: ["author1", "author2"]
license: "MIT"
description: "A welcome module for MoBot"
dependencies: []