fix help command
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 42s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 42s
This commit is contained in:
@ -110,7 +110,7 @@ public class HelpCommand extends BatCommand implements EventListener {
|
||||
*/
|
||||
private MessageEmbed createHomeEmbed() {
|
||||
String categories = "";
|
||||
for (Category category : Category.values()) {
|
||||
for (Category category : Category.getCategories()) {
|
||||
long commandCount = commandService.getCommandsByCategory(category, true).size();
|
||||
categories += "➜ %s - **%s Command%s**\n".formatted(
|
||||
category.getName(),
|
||||
@ -132,7 +132,7 @@ public class HelpCommand extends BatCommand implements EventListener {
|
||||
private LayoutComponent[] createHomeActions() {
|
||||
List<SelectOption> options = new ArrayList<>();
|
||||
options.add(SelectOption.of("Home", "home").withEmoji(Emoji.fromUnicode("U+1F3E0")));
|
||||
options.addAll(Arrays.stream(Category.values()).map(category ->
|
||||
options.addAll(Category.getCategories().stream().map(category ->
|
||||
SelectOption.of(category.getName(), category.getName()).withEmoji(category.getEmoji()))
|
||||
.toList());
|
||||
|
||||
|
Reference in New Issue
Block a user