Skip to content

Commit 324ff73

Browse files
committed
Allow inexact role restriction by name if the lowest role with the name is satisfied
1 parent 9cd92d0 commit 324ff73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/net/kautler/command/api/restriction/javacord/RoleJavacord.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ private boolean allowCommandByAtLeastRoleName(Message message) {
343343
roleStream = server.getRolesByNameIgnoreCase(roleName).stream();
344344
}
345345
return roleStream
346-
.max(naturalOrder())
346+
.min(naturalOrder())
347347
.flatMap(role -> message.getUserAuthor()
348348
.flatMap(server::getHighestRole)
349349
.map(highestAuthorRole -> highestAuthorRole.compareTo(role) >= 0)

0 commit comments

Comments
 (0)