Make help command use descriptions and usages

This commit is contained in:
2022-12-20 17:51:28 +01:00
parent e08fefbda3
commit 496304c2c3
15 changed files with 258 additions and 13 deletions

View File

@@ -5,6 +5,7 @@ import net.dv8tion.jda.api.entities.Message;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import net.dv8tion.jda.api.interactions.components.buttons.Button;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import wtf.beatrice.hidekobot.Cache;
import wtf.beatrice.hidekobot.commands.base.ClearChat;
import wtf.beatrice.hidekobot.objects.commands.CommandCategory;
@@ -29,12 +30,25 @@ public class ClearCommand implements MessageCommand
public boolean passRawArgs() {
return false;
}
@NotNull
@Override
public CommandCategory getCategory() {
return CommandCategory.MODERATION;
}
@NotNull
@Override
public String getDescription() {
return "Clear the current channel's chat history.";
}
@Nullable
@Override
public String getUsage() {
return "[amount]";
}
@Override
public void runCommand(MessageReceivedEvent event, String label, String[] args)
{