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
To set up MoBot, download the latest release from the releases page and run it.
java -jar MoBot.jarOn 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.
To create a module for MoBot, follow these steps:
- 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
}- Create Main Class: Extend the
MbModuleclass and override theonEnableandonDisablemethods:
public class WelcomeModule extends MbModule {
@Override
public void onEnable() {
//Do something
}
@Override
public void onDisable() {
//Do something
}
}- Create
module.yml: Add amodule.ymlfile in theresourcesfolder 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: []