[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.Parameter;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandConfig;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandPrivilegeLevels;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandService;
import dev.sheldan.abstracto.core.interaction.slash.parameter.SlashCommandParameterService;
import dev.sheldan.abstracto.core.models.ServerSpecificId;
@@ -91,6 +92,7 @@ public class DeleteTrackedEmote extends AbstractConditionableCommand {
.builder()
.enabled(true)
.rootCommandName(StatisticSlashCommandNames.STATISTIC_INTERNAL)
.defaultPrivilege(SlashCommandPrivilegeLevels.ADMIN)
.groupName("manage")
.commandName("deletetrackedemote")
.build();

View File

@@ -8,6 +8,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.models.ServerSpecificId;
import dev.sheldan.abstracto.statistic.config.StatisticFeatureDefinition;
@@ -99,6 +100,7 @@ public class DisableEmoteTracking extends AbstractConditionableCommand {
.builder()
.enabled(true)
.rootCommandName(StatisticSlashCommandNames.STATISTIC_INTERNAL)
.defaultPrivilege(SlashCommandPrivilegeLevels.ADMIN)
.groupName("manage")
.commandName("disableemotetracking")
.build();

View File

@@ -7,6 +7,7 @@ import dev.sheldan.abstracto.core.command.config.Parameter;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandConfig;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandPrivilegeLevels;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandService;
import dev.sheldan.abstracto.core.interaction.slash.parameter.SlashCommandParameterService;
import dev.sheldan.abstracto.core.models.ServerSpecificId;
@@ -111,6 +112,7 @@ public class PurgeEmoteStats extends AbstractConditionableCommand {
.builder()
.enabled(true)
.rootCommandName(StatisticSlashCommandNames.STATISTIC_INTERNAL)
.defaultPrivilege(SlashCommandPrivilegeLevels.ADMIN)
.groupName("manage")
.commandName("purgeemotestats")
.build();

View File

@@ -7,6 +7,7 @@ import dev.sheldan.abstracto.core.command.config.Parameter;
import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandConfig;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandPrivilegeLevels;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandService;
import dev.sheldan.abstracto.statistic.config.StatisticFeatureDefinition;
import dev.sheldan.abstracto.statistic.config.StatisticSlashCommandNames;
@@ -55,6 +56,7 @@ public class ResetEmoteStats extends AbstractConditionableCommand {
.builder()
.enabled(true)
.rootCommandName(StatisticSlashCommandNames.STATISTIC_INTERNAL)
.defaultPrivilege(SlashCommandPrivilegeLevels.ADMIN)
.groupName("manage")
.commandName("resetemotestats")
.build();

View File

@@ -8,6 +8,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.statistic.config.StatisticFeatureDefinition;
import dev.sheldan.abstracto.statistic.config.StatisticSlashCommandNames;
import dev.sheldan.abstracto.statistic.emote.config.EmoteTrackingModuleDefinition;
@@ -58,6 +59,7 @@ public class SyncTrackedEmotes extends AbstractConditionableCommand {
.builder()
.enabled(true)
.rootCommandName(StatisticSlashCommandNames.STATISTIC_INTERNAL)
.defaultPrivilege(SlashCommandPrivilegeLevels.ADMIN)
.groupName("manage")
.commandName("synctrackedemotes")
.build();

View File

@@ -8,6 +8,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.service.EmoteService;
import dev.sheldan.abstracto.core.service.FeatureModeService;
@@ -109,6 +110,7 @@ public class TrackEmote extends AbstractConditionableCommand {
.builder()
.enabled(true)
.rootCommandName(StatisticSlashCommandNames.STATISTIC_INTERNAL)
.defaultPrivilege(SlashCommandPrivilegeLevels.ADMIN)
.groupName("manage")
.commandName("trackemote")
.build();