mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-07 01:30:49 +00:00
[AB-xxx] adding sticky roles module
This commit is contained in:
@@ -24,7 +24,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class CommandManager implements CommandRegistry {
|
||||
@@ -54,7 +53,7 @@ public class CommandManager implements CommandRegistry {
|
||||
@Override
|
||||
public Optional<Command> findCommandByParameters(String name, UnParsedCommandParameter unParsedCommandParameter, Long serverId) {
|
||||
Optional<Command> commandOptional = commands.stream().filter(getCommandByNameAndParameterPredicate(name, unParsedCommandParameter, serverId)).findFirst();
|
||||
if(!commandOptional.isPresent()) {
|
||||
if(commandOptional.isEmpty()) {
|
||||
commandOptional = getCommandViaAliasAndParameter(name, unParsedCommandParameter, serverId);
|
||||
}
|
||||
return commandOptional;
|
||||
@@ -139,7 +138,7 @@ public class CommandManager implements CommandRegistry {
|
||||
.getDependentFeatures()
|
||||
.stream()
|
||||
.map(s -> featureConfigService.getFeatureEnum(s))
|
||||
.collect(Collectors.toList());
|
||||
.toList();
|
||||
boolean required = false;
|
||||
for (FeatureDefinition featureDefinition : featureDefinitions) {
|
||||
if(featureFlagService.getFeatureFlagValue(featureDefinition, serverId)) {
|
||||
|
||||
@@ -46,6 +46,7 @@ public class AsyncLeaveListenerBean extends ListenerAdapter {
|
||||
.build();
|
||||
return MemberLeaveModel
|
||||
.builder()
|
||||
.member(event.getMember())
|
||||
.leavingUser(serverUser)
|
||||
.user(event.getUser())
|
||||
.build();
|
||||
|
||||
Reference in New Issue
Block a user