mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-08 00:49:26 +00:00
[AB-xxx] adding default permissions for commands
adding owner limitation for certain internal commands
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user