Skip to content

Raepheles/cmds4d4j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Commands For Discord4J

Simple Command API for Discord4j.

Seting up the API

IDiscordClient client = new ClientBuilder().withToken(token).build();
CommandManager manager = new CommandManager(client, "com.raepheles.discord.testbot", defaultPrefix);
try {
  client.login();
} catch(DiscordException e) {
  e.printStackTrace();
}

Sample Command

public class PingPongCommand extends Command {
  
  @Override
  public void execute(MessageReceivedEvent event) {
    event.getChannel().sendMessage("Pong!");
  }
  
  public PingPongCommand() {
    super("ping", "Test", "Simple ping-pong command", "ping");
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages