mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-22 17:45:48 +00:00
[AB-xxx] reworking moderation commands to use more defer logic, so that they do not time out anymore
removed message command condition, as it seemed unused
This commit is contained in:
@@ -35,13 +35,10 @@ public abstract class AbstractConditionableCommand implements ConditionalCommand
|
||||
@Autowired
|
||||
private CommandCoolDownCondition coolDownCondition;
|
||||
|
||||
@Autowired
|
||||
private MessageCommandCondition messageCommandCondition;
|
||||
|
||||
@Override
|
||||
public List<CommandCondition> getConditions() {
|
||||
return new ArrayList<>(Arrays.asList(adminModeCondition, featureEnabledCondition, commandDisabledCondition,
|
||||
commandDisallowedCondition, featureModeCondition, coolDownCondition, messageCommandCondition));
|
||||
commandDisallowedCondition, featureModeCondition, coolDownCondition));
|
||||
}
|
||||
|
||||
protected void checkParameters(CommandContext context) {
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
package dev.sheldan.abstracto.core.command.condition;
|
||||
|
||||
import dev.sheldan.abstracto.core.command.Command;
|
||||
import dev.sheldan.abstracto.core.command.execution.CommandContext;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class MessageCommandCondition implements CommandCondition {
|
||||
|
||||
@Override
|
||||
public ConditionResult shouldExecute(CommandContext commandContext, Command command) {
|
||||
if(command.getConfiguration().isSupportsMessageCommand()) {
|
||||
return ConditionResult.builder().result(true).build();
|
||||
} else {
|
||||
return ConditionResult.builder().result(false).reportResult(false).build();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -41,9 +41,6 @@ public class CommandConfiguration {
|
||||
@Builder.Default
|
||||
private List<EffectConfig> effects = new ArrayList<>();
|
||||
|
||||
@Builder.Default
|
||||
private boolean supportsMessageCommand = true;
|
||||
|
||||
@Builder.Default
|
||||
private boolean slashCommandOnly = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user