You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
overlisted 9db858f001
a fix of a fix
4 years ago
.idea some idea configurations 4 years ago
gradle/wrapper init 4 years ago
src/main/java/net/overlisted/botlib a fix of a fix 4 years ago
.gitignore gitignore 4 years ago Update 4 years ago
build.gradle again i forgot to change the version in build.gradle 4 years ago
gradlew init 4 years ago
gradlew.bat init 4 years ago
settings.gradle init 4 years ago


Start by adding a class with commands:

package net.overlisted.mybot;

import net.overlisted.botlib.command.CommandTrigger;
import net.overlisted.botlib.command.CommandsController;

  token = "USE YOUR TOKEN",
  commandsGroup = "mybot"
public class MyBotCommands {
  public String test(Message message, String text) {
    return text;

To initialize BotLib create a new instance of it:

package net.overlisted.mybot;

import net.overlisted.botlib.BotLib;

public class StaticRunner {
  public static void main(String... args) {
    new BotLib("net.overlisted.mybot");

Then add your bot to a Discord server and send "/mybot test anyText", bot will answer "anyText".

You can add unlimited amount of arguments (you will have to separate them with space to use the command) to commands, for example:

public void test(Message message, String text, String moreText, String text2) {
  message.getChannel().sendMessage(text).append(' ').append(moreText).append(' ').append(text2).submit();

Ad-Hoc also works for commands.