add emojis to feature states
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 38s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 38s
This commit is contained in:
parent
6403c57db5
commit
f566c3bcb5
@ -26,7 +26,7 @@ public class ListSubCommand extends BatSubCommand {
|
||||
for (Feature feature : FeatureService.INSTANCE.getFeaturesSorted()) {
|
||||
FeatureProfile featureProfile = guild.getFeatureProfile();
|
||||
featureStates.append("%s `%s`\n".formatted(
|
||||
featureProfile.getFeatureState(feature) == FeatureProfile.FeatureState.ENABLED ? "✅" : "❌",
|
||||
featureProfile.getFeatureState(feature).getEmoji(),
|
||||
feature.getName()
|
||||
));
|
||||
}
|
||||
|
@ -2,6 +2,8 @@ package cc.fascinated.bat.features.base.profile;
|
||||
|
||||
import cc.fascinated.bat.common.Profile;
|
||||
import cc.fascinated.bat.features.Feature;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -94,8 +96,14 @@ public class FeatureProfile extends Profile {
|
||||
this.featureStates = null;
|
||||
}
|
||||
|
||||
@AllArgsConstructor @Getter
|
||||
public enum FeatureState {
|
||||
ENABLED,
|
||||
DISABLED
|
||||
ENABLED(":white_check_mark:"),
|
||||
DISABLED(":x:");
|
||||
|
||||
/**
|
||||
* The emoji for the feature state
|
||||
*/
|
||||
private String emoji;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user