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()) {
|
for (Feature feature : FeatureService.INSTANCE.getFeaturesSorted()) {
|
||||||
FeatureProfile featureProfile = guild.getFeatureProfile();
|
FeatureProfile featureProfile = guild.getFeatureProfile();
|
||||||
featureStates.append("%s `%s`\n".formatted(
|
featureStates.append("%s `%s`\n".formatted(
|
||||||
featureProfile.getFeatureState(feature) == FeatureProfile.FeatureState.ENABLED ? "✅" : "❌",
|
featureProfile.getFeatureState(feature).getEmoji(),
|
||||||
feature.getName()
|
feature.getName()
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,8 @@ package cc.fascinated.bat.features.base.profile;
|
|||||||
|
|
||||||
import cc.fascinated.bat.common.Profile;
|
import cc.fascinated.bat.common.Profile;
|
||||||
import cc.fascinated.bat.features.Feature;
|
import cc.fascinated.bat.features.Feature;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -94,8 +96,14 @@ public class FeatureProfile extends Profile {
|
|||||||
this.featureStates = null;
|
this.featureStates = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AllArgsConstructor @Getter
|
||||||
public enum FeatureState {
|
public enum FeatureState {
|
||||||
ENABLED,
|
ENABLED(":white_check_mark:"),
|
||||||
DISABLED
|
DISABLED(":x:");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The emoji for the feature state
|
||||||
|
*/
|
||||||
|
private String emoji;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user