Skip to content

Commit

Permalink
Fix not being able to remove logging channels
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed May 27, 2024
1 parent 7b84122 commit 5b3ed86
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public Logging() {
protected void execute(SlashCommandEvent event) {
var types = Database.main().withExtension(LoggingChannelsDAO.class, db -> db.getTypesForChannel(event.getChannel().getIdLong()));
var builder = StringSelectMenu.create(getComponentId())
.setMaxValues(LoggingChannelsDAO.Type.values().length);
.setMaxValues(LoggingChannelsDAO.Type.values().length)
.setMinValues(0);

builder.addOptions(Stream.of(LoggingChannelsDAO.Type.values())
.map(type -> SelectOption.of(type.displayName, type.name())
Expand Down

0 comments on commit 5b3ed86

Please sign in to comment.