mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-07 08:33:59 +00:00
[AB-xxx] migrating assignable role commands to slash commands
removing separate command for editing assignable role place text, and adding it to the change command fixing 2 bugs related with deleting assignable roles with users, and deleting assignable role places refactoring how enums are handled with slash command parameters adding cleanup for slash command confirmation payloads once they are clicked
This commit is contained in:
@@ -116,19 +116,13 @@ public class DeletedEmoteStats extends AbstractConditionableCommand {
|
||||
.build();
|
||||
parameters.add(periodParameter);
|
||||
|
||||
List<String> emoteTypes = Arrays
|
||||
.stream(UsedEmoteTypeParameter.values())
|
||||
.map(Enum::name)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
Parameter typeParameter = Parameter
|
||||
.builder()
|
||||
.name(DELETED_EMOTE_STATS_USED_EMOTE_TYPE)
|
||||
.templated(true)
|
||||
.slashCommandOnly(true)
|
||||
.optional(true)
|
||||
.choices(emoteTypes)
|
||||
.type(String.class)
|
||||
.type(UsedEmoteTypeParameter.class)
|
||||
.build();
|
||||
|
||||
parameters.add(typeParameter);
|
||||
|
||||
@@ -124,19 +124,13 @@ public class EmoteStat extends AbstractConditionableCommand {
|
||||
.build();
|
||||
parameters.add(periodParameter);
|
||||
|
||||
List<String> emoteTypes = Arrays
|
||||
.stream(UsedEmoteTypeParameter.values())
|
||||
.map(Enum::name)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
Parameter typeParameter = Parameter
|
||||
.builder()
|
||||
.name(EMOTE_STAT_USED_EMOTE_TYPE)
|
||||
.templated(true)
|
||||
.slashCommandOnly(true)
|
||||
.optional(true)
|
||||
.choices(emoteTypes)
|
||||
.type(String.class)
|
||||
.type(UsedEmoteTypeParameter.class)
|
||||
.build();
|
||||
|
||||
parameters.add(typeParameter);
|
||||
|
||||
@@ -118,19 +118,13 @@ public class EmoteStats extends AbstractConditionableCommand {
|
||||
|
||||
parameters.add(periodParameter);
|
||||
|
||||
List<String> emoteTypes = Arrays
|
||||
.stream(UsedEmoteTypeParameter.values())
|
||||
.map(Enum::name)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
Parameter typeParameter = Parameter
|
||||
.builder()
|
||||
.name(EMOTE_STATS_USED_EMOTE_TYPE)
|
||||
.templated(true)
|
||||
.slashCommandOnly(true)
|
||||
.optional(true)
|
||||
.choices(emoteTypes)
|
||||
.type(String.class)
|
||||
.type(UsedEmoteTypeParameter.class)
|
||||
.build();
|
||||
|
||||
SlashCommandConfig slashCommandConfig = SlashCommandConfig
|
||||
|
||||
@@ -128,19 +128,13 @@ public class ExternalEmoteStats extends AbstractConditionableCommand {
|
||||
.templated(true)
|
||||
.build();
|
||||
|
||||
List<String> emoteTypes = Arrays
|
||||
.stream(UsedEmoteTypeParameter.values())
|
||||
.map(Enum::name)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
Parameter typeParameter = Parameter
|
||||
.builder()
|
||||
.name(EXTERNAL_EMOTE_STATS_USED_EMOTE_TYPE)
|
||||
.templated(true)
|
||||
.slashCommandOnly(true)
|
||||
.optional(true)
|
||||
.choices(emoteTypes)
|
||||
.type(String.class)
|
||||
.type(UsedEmoteTypeParameter.class)
|
||||
.build();
|
||||
|
||||
parameters.add(typeParameter);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package dev.sheldan.abstracto.statistic.emote.command.parameter;
|
||||
|
||||
import dev.sheldan.abstracto.core.command.execution.CommandParameterKey;
|
||||
import dev.sheldan.abstracto.statistic.emote.model.database.UsedEmoteType;
|
||||
|
||||
public enum UsedEmoteTypeParameter {
|
||||
public enum UsedEmoteTypeParameter implements CommandParameterKey {
|
||||
REACTION,
|
||||
MESSAGE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user