Skip to content

Commit

Permalink
feat(command): Added unicode emotes to RoutineCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
ElementalMP4 committed Jul 1, 2021
1 parent a8dc906 commit 4942463
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public class RoutineCommand extends AbstractCommand {

@Autowired
private ServerService serverService;

private static final String TRUE_EMOTE = "\u2705";
private static final String FALSE_EMOTE = "\u274C";

@Override
public void executeInternal(Message message, List<String> args) {
Expand All @@ -33,11 +36,12 @@ public void executeInternal(Message message, List<String> args) {
.setTitle("Barista Gerald - Routines")
.setThumbnail(message.getJDA().getSelfUser().getAvatarUrl())
.setFooter("Routine Count: "+ routineCount + " | Note: Some routines cannot be disabled. The commands they power require them to function. Try disabling the command instead!");

for (AbstractRoutine routine: routines) {
routineInformation.addField(routine.getName(), String.format("Description: %s\nCan be disabled: %s\nIs disabled Here: %s",
routineInformation.addField(routine.getName(), String.format("```Description: %s\nCan be disabled: %s\nIs disabled Here: %s```",
routine.getDescription(),
routine.canBeDisabled() ? ":white_check_mark:" : ":x:",
server.getRoutineBlacklist().contains(routine.getName()) ? ":white_check_mark:" : ":x:"),
routine.canBeDisabled() ? TRUE_EMOTE : FALSE_EMOTE,
server.getRoutineBlacklist().contains(routine.getName()) ? TRUE_EMOTE : FALSE_EMOTE),
false);
}
message.getChannel().sendMessage(routineInformation.build()).queue();
Expand Down

1 comment on commit 4942463

@Montori
Copy link
Collaborator

@Montori Montori commented on 4942463 Jul 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.