-
public final class CommandAvailabilityKt
-
-
Method Summary
Modifier and Type Method Description final static BooleanisAvailableFor(Command $self, MessageAction action)Whether this Command is selectable in the composer given the currently-active composer action: final static List<Command>sortedByAvailability(List<Command> $self, MessageAction action)Returns a new list sorted by, in order: Availability for action (available first).
Universal commands (
set != "moderation_set") before contextual ones.
-
-
Method Detail
-
isAvailableFor
final static Boolean isAvailableFor(Command $self, MessageAction action)
Whether this Command is selectable in the composer given the currently-active composer action:
- Parameters:
action- The composer action currently active, ornullwhen the composer is in its default state.
-
sortedByAvailability
final static List<Command> sortedByAvailability(List<Command> $self, MessageAction action)
Returns a new list sorted by, in order:
Availability for action (available first).
Universal commands (
set != "moderation_set") before contextual ones.
The sort is stable, so within each group the input order is preserved.
- Parameters:
action- The composer action currently active, ornullwhen the composer is in its default state.
-
-
-