[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

@@ -10,6 +10,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.core.utils.ContextUtils;
import dev.sheldan.abstracto.customcommand.config.CustomCommandFeatureDefinition;
@@ -87,6 +88,7 @@ public class CreateCustomCommand extends AbstractConditionableCommand {
.enabled(true)
.userInstallable(true)
.userCommandConfig(UserCommandConfig.all())
.defaultPrivilege(SlashCommandPrivilegeLevels.INVITER)
.rootCommandName(CustomCommandSlashCommandNames.CUSTOM_COMMAND)
.commandName("create")
.build();

View File

@@ -10,6 +10,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.core.utils.ContextUtils;
import dev.sheldan.abstracto.customcommand.config.CustomCommandFeatureDefinition;
@@ -73,6 +74,7 @@ public class DeleteCustomCommand extends AbstractConditionableCommand {
.enabled(true)
.userInstallable(true)
.userCommandConfig(UserCommandConfig.all())
.defaultPrivilege(SlashCommandPrivilegeLevels.INVITER)
.rootCommandName(CustomCommandSlashCommandNames.CUSTOM_COMMAND)
.commandName("delete")
.build();