Skip to content
The framework used in GamesROB.
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
jars
src
.gitignore
DepsJDAFramework.iml
README.md
pom.xml

README.md

DepsJDAFramework

A command framework for JDA (Java Discord API) with modern and simple syntax.

Usage Example

public void loadFramework() {
  CommandFramework framework = new CommandFramework(jda, settings);

  // Adding commands
  framework.command("hello", this::hello).setUsage("!hello <message>");
  framework.command("ping", this::ping);

  framework.listenEvents();
}

private String ping(CommandContext context) {
    long start = System.currentTimeMillis();
    context.send("Ping..").then(message -> 
    context.edit(String.format("Pong! Took **%s**ms.", System.currentTimeMillis() - start)));
    return null;
}

private String hello(CommandContext context) {
    return String.format("Hello %s! Your input was %s.", context.getAuthor().getAsMention(), context.next());
}

Other examples:
Reflection
SubCommands

Features

  • Straightforward sintax
  • CommandContext instance with simple argument methods like nextInt(), nextDouble() and remaining()
  • Reflection command executions

Start using it

"# JDAFramework"

You can’t perform that action at this time.