[AB-xxx] adding default permissions for commands

adding owner limitation for certain internal commands
This commit is contained in:
Sheldan
2025-02-15 15:33:56 +01:00
parent 210140b242
commit f99c5351e6
99 changed files with 516 additions and 184 deletions

View File

@@ -7,6 +7,7 @@ import dev.sheldan.abstracto.core.command.config.validator.MinIntegerValueValida
import dev.sheldan.abstracto.core.command.execution.CommandContext;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandConfig;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandPrivilegeLevels;
import dev.sheldan.abstracto.core.interaction.slash.parameter.SlashCommandParameterService;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.interaction.InteractionService;
@@ -94,6 +95,7 @@ public class Accept extends AbstractConditionableCommand {
SlashCommandConfig slashCommandConfig = SlashCommandConfig
.builder()
.enabled(true)
.defaultPrivilege(SlashCommandPrivilegeLevels.INVITER)
.rootCommandName(SuggestionSlashCommandNames.SUGGEST)
.commandName(ACCEPT_COMMAND)
.build();

View File

@@ -11,6 +11,7 @@ import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.interaction.InteractionService;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandConfig;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandPrivilegeLevels;
import dev.sheldan.abstracto.core.interaction.slash.parameter.SlashCommandParameterService;
import dev.sheldan.abstracto.suggestion.config.SuggestionFeatureDefinition;
import dev.sheldan.abstracto.suggestion.config.SuggestionSlashCommandNames;
@@ -83,6 +84,7 @@ public class ClosePoll extends AbstractConditionableCommand {
SlashCommandConfig slashCommandConfig = SlashCommandConfig
.builder()
.enabled(true)
.defaultPrivilege(SlashCommandPrivilegeLevels.INVITER)
.rootCommandName(SuggestionSlashCommandNames.POLL)
.commandName("close")
.build();

View File

@@ -7,6 +7,7 @@ import dev.sheldan.abstracto.core.command.config.validator.MinIntegerValueValida
import dev.sheldan.abstracto.core.command.execution.CommandContext;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandConfig;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandPrivilegeLevels;
import dev.sheldan.abstracto.core.interaction.slash.parameter.SlashCommandParameterService;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.interaction.InteractionService;
@@ -93,6 +94,7 @@ public class Reject extends AbstractConditionableCommand {
SlashCommandConfig slashCommandConfig = SlashCommandConfig
.builder()
.enabled(true)
.defaultPrivilege(SlashCommandPrivilegeLevels.INVITER)
.rootCommandName(SuggestionSlashCommandNames.SUGGEST)
.commandName(REJECT_COMMAND)
.build();

View File

@@ -11,6 +11,7 @@ import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.interaction.InteractionService;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandConfig;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandPrivilegeLevels;
import dev.sheldan.abstracto.core.interaction.slash.parameter.SlashCommandParameterService;
import dev.sheldan.abstracto.suggestion.config.SuggestionFeatureDefinition;
import dev.sheldan.abstracto.suggestion.config.SuggestionSlashCommandNames;
@@ -71,6 +72,7 @@ public class ShowPoll extends AbstractConditionableCommand {
SlashCommandConfig slashCommandConfig = SlashCommandConfig
.builder()
.enabled(true)
.defaultPrivilege(SlashCommandPrivilegeLevels.INVITER)
.rootCommandName(SuggestionSlashCommandNames.POLL)
.commandName(COMMAND_NAME)
.build();

View File

@@ -7,6 +7,7 @@ import dev.sheldan.abstracto.core.command.config.validator.MinIntegerValueValida
import dev.sheldan.abstracto.core.command.execution.CommandContext;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandConfig;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandPrivilegeLevels;
import dev.sheldan.abstracto.core.interaction.slash.parameter.SlashCommandParameterService;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.interaction.InteractionService;
@@ -85,6 +86,7 @@ public class ShowSuggestion extends AbstractConditionableCommand {
SlashCommandConfig slashCommandConfig = SlashCommandConfig
.builder()
.enabled(true)
.defaultPrivilege(SlashCommandPrivilegeLevels.INVITER)
.rootCommandName(SuggestionSlashCommandNames.SUGGEST)
.commandName(SHOW_SUGGESTION_COMMAND)
.build();

View File

@@ -7,6 +7,7 @@ import dev.sheldan.abstracto.core.command.config.validator.MinIntegerValueValida
import dev.sheldan.abstracto.core.command.execution.CommandContext;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandConfig;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandPrivilegeLevels;
import dev.sheldan.abstracto.core.interaction.slash.parameter.SlashCommandParameterService;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.interaction.InteractionService;
@@ -93,6 +94,7 @@ public class Veto extends AbstractConditionableCommand {
SlashCommandConfig slashCommandConfig = SlashCommandConfig
.builder()
.enabled(true)
.defaultPrivilege(SlashCommandPrivilegeLevels.INVITER)
.rootCommandName(SuggestionSlashCommandNames.SUGGEST)
.commandName(VETO_COMMAND)
.build();