https://github.com/Nekos-life/neko-bot-jda - Neko-Bot JDA (@IAmTails)
Command Example!
This is a command which echoes the input of the user if their sentence begins with the bot's prefix and echo, repeat or copy.
If the input was bot, echo hello! the output would be hello! (If the prefix was bot,)
import com.github.rainestormee.jdacommand.AbstractCommand;
import com.github.rainestormee.jdacommand.CommandAttribute;
import com.github.rainestormee.jdacommand.CommandDescription;
import net.dv8tion.jda.core.entities.Message;
@CommandDescription(
name = "echo",
triggers = {"echo", "repeat", "copy"},
description = "This command echoes what you say!",
attributes = {@CommandAttribute(key = "args", value = "1")}
)
public class HelpCommand implements AbstractCommand<Message> {
@Override
public void execute(Message message, String args) {
message.getChannel().sendMessage(args).queue();
}
}
The current promoted version is 1.1.3
<repository>
<id>jitpack.io</id>
<name>jitpack</name>
<url>https://jitpack.io</url>
</repository>
<!--Dependency for JDA-Command-->
<dependency>
<groupId>com.github.rainestormee</groupId>
<artifactId>JDA-Command</artifactId>
<version>1.1.3</version>
</dependency>
repositories {
//Make sure this repository is last.
maven { url 'https://jitpack.io' }
}
dependencies {
//JDA-Command dependency
compile 'com.github.rainestormee:JDA-Command:1.1.3'
}