Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Command Package

A easy to use, powerful, and highly flexible command framework for bots using JDA.

This package includes all the tools necessary to start a fully functioning JDA bot with commands, making use of the Command Client.

public class MyBot 
{
    public static void main(String[] args)
    {
        CommandClientBuilder builder = new CommandClientBuilder();
        
        // Set your bot's prefix
        builder.setPrefix("!");
        builder.setAlternatePrefix("+");
        
        // Add commands
        builder.addCommand(new CoolCommand());
        
        // Customize per-guild unique settings
        builder.setGuildSettingsManager(new MyBotsGuildSettingsManager());
        
        CommandClient client = builder.build();
        
        new JDABuilder(AccountType.BOT)
            // ...
            .addEventListener(client) // Add the new CommandClient as a listener
            // ...
            .buildAsync();
    }
}