Skip to content

Creating a Command

Rax Ixor edited this page Oct 17, 2017 · 2 revisions
  • All Commands need at least one trigger
  • You must have a @CommandAttribute(key = "description", value = "yourDescription") attribute, otherwise it will not be detected as a valid Command by the CommandHandler.

package your.package.here

import com.raxixor.jdaddons.command.*;

@CommandDescription(name = "yourCommandName", triggers = { "yourTrigger", "yourTriggerTwo" }, attributes = 
@CommandAttribute(key = "description", value = "yourDescription"))
public class YourCommand implements Command {
    
    @Override
    public void execute(Message trigger, String args) {
        // Your Command Content here.
    }
}

Example

Clone this wiki locally