Skip to content

Commit b0da474

Browse files
committed
Fix Discord button emoji labels
1 parent 3ad5922 commit b0da474

3 files changed

Lines changed: 25 additions & 16 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ All notable changes to ZDiscord are documented here.
4242
- JDA SLF4J provider packaging fixed so startup does not use the fallback logger.
4343
- Ticket setup now uses the guided `/setup` wizard only and posts a ticket-specific setup flow.
4444
- Ticket creation ignores placeholder support-role IDs instead of aborting channel creation.
45+
- Setup and follow buttons use real emoji instead of Discord shortcode text.
4546
- `/panel` no longer crashes in thread or forum channels.
4647
- `UpdateChecker` Discord announcement retries on failure.
4748

src/main/java/dev/demonz/zdiscord/discord/SetupCommand.java

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ public class SetupCommand extends ListenerAdapter {
5656
private static final String BTN_DONE = "zdiscord_setup_ticket_done";
5757
private static final String BTN_CONFIRM_REMOVE = "zdiscord_setup_ticket_confirm_remove:";
5858

59+
private static final String LABEL_ADD = "\u2795 Add";
60+
private static final String LABEL_EDIT = "\u270f\ufe0f Edit";
61+
private static final String LABEL_REMOVE = "\ud83d\uddd1\ufe0f Remove";
62+
private static final String LABEL_MOVE_UP = "\u2b06\ufe0f Move up";
63+
private static final String LABEL_MOVE_DOWN = "\u2b07\ufe0f Move down";
64+
private static final String LABEL_DONE = "\u2705 Done & post panel";
65+
private static final String LABEL_CANCEL = "\u274c Cancel";
66+
5967
private static final Map<String, ModuleInfo> MODULES = new LinkedHashMap<>();
6068

6169
static {
@@ -375,11 +383,11 @@ private void showTicketCategoryManager(net.dv8tion.jda.api.events.interaction.Ge
375383

376384
List<net.dv8tion.jda.api.interactions.components.LayoutComponent> rows = new ArrayList<>();
377385
rows.add(ActionRow.of(
378-
Button.success(BTN_ADD, ":heavy_plus_sign: Add"),
379-
Button.primary(BTN_EDIT, ":pencil2: Edit"),
380-
Button.danger(BTN_REMOVE, ":wastebasket: Remove"),
381-
Button.secondary(BTN_UP, ":arrow_up_small: Move up"),
382-
Button.secondary(BTN_DOWN, ":arrow_down_small: Move down")));
386+
Button.success(BTN_ADD, LABEL_ADD),
387+
Button.primary(BTN_EDIT, LABEL_EDIT),
388+
Button.danger(BTN_REMOVE, LABEL_REMOVE),
389+
Button.secondary(BTN_UP, LABEL_MOVE_UP),
390+
Button.secondary(BTN_DOWN, LABEL_MOVE_DOWN)));
383391

384392
if (!cats.isEmpty()) {
385393

@@ -404,7 +412,7 @@ private void showTicketCategoryManager(net.dv8tion.jda.api.events.interaction.Ge
404412
rows.add(ActionRow.of(select.build()));
405413
}
406414

407-
rows.add(ActionRow.of(Button.success(BTN_DONE, ":white_check_mark: Done & post panel")));
415+
rows.add(ActionRow.of(Button.success(BTN_DONE, LABEL_DONE)));
408416

409417
if (event instanceof SlashCommandInteractionEvent) {
410418
((SlashCommandInteractionEvent) event).replyEmbeds(embed.build())
@@ -459,11 +467,11 @@ private void handleTicketCategorySelect(StringSelectInteractionEvent event) {
459467

460468
List<net.dv8tion.jda.api.interactions.components.LayoutComponent> rows = new ArrayList<>();
461469
rows.add(ActionRow.of(
462-
Button.success(BTN_ADD, ":heavy_plus_sign: Add"),
463-
Button.primary(BTN_EDIT, ":pencil2: Edit"),
464-
Button.danger(BTN_REMOVE, ":wastebasket: Remove"),
465-
Button.secondary(BTN_UP, ":arrow_up_small: Move up"),
466-
Button.secondary(BTN_DOWN, ":arrow_down_small: Move down")));
470+
Button.success(BTN_ADD, LABEL_ADD),
471+
Button.primary(BTN_EDIT, LABEL_EDIT),
472+
Button.danger(BTN_REMOVE, LABEL_REMOVE),
473+
Button.secondary(BTN_UP, LABEL_MOVE_UP),
474+
Button.secondary(BTN_DOWN, LABEL_MOVE_DOWN)));
467475

468476
StringSelectMenu.Builder select = StringSelectMenu.create(TICKET_CATEGORY_MENU_ID)
469477
.setPlaceholder("Pick a category for the action")
@@ -484,7 +492,7 @@ private void handleTicketCategorySelect(StringSelectInteractionEvent event) {
484492
select.addOption(label, entry.getKey(), desc);
485493
}
486494
rows.add(ActionRow.of(select.build()));
487-
rows.add(ActionRow.of(Button.success(BTN_DONE, ":white_check_mark: Done & post panel")));
495+
rows.add(ActionRow.of(Button.success(BTN_DONE, LABEL_DONE)));
488496

489497
event.editMessageEmbeds(embed.build()).setComponents(rows).queue();
490498
}
@@ -696,8 +704,8 @@ private void askRemoveConfirm(ButtonInteractionEvent event, String categoryId) {
696704
+ "users just won't be able to open new ones in it.")
697705
.build())
698706
.addActionRow(
699-
Button.danger(BTN_CONFIRM_REMOVE + categoryId, ":wastebasket: Yes, remove"),
700-
Button.secondary(BTN_DONE, ":x: Cancel"))
707+
Button.danger(BTN_CONFIRM_REMOVE + categoryId, "\ud83d\uddd1\ufe0f Yes, remove"),
708+
Button.secondary(BTN_DONE, LABEL_CANCEL))
701709
.setEphemeral(true)
702710
.queue();
703711
}

src/main/java/dev/demonz/zdiscord/modules/FollowModule.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,10 @@ public void handleFollowButton(ButtonInteractionEvent event) {
204204
}
205205

206206
public Button buildFollowButton(UUID target) {
207-
return Button.success(FOLLOW_BUTTON_ID + ":" + target, ":bell: Follow");
207+
return Button.success(FOLLOW_BUTTON_ID + ":" + target, "\ud83d\udd14 Follow");
208208
}
209209

210210
public Button buildUnfollowButton(UUID target) {
211-
return Button.secondary(UNFOLLOW_BUTTON_ID + ":" + target, ":no_bell: Unfollow");
211+
return Button.secondary(UNFOLLOW_BUTTON_ID + ":" + target, "\ud83d\udd15 Unfollow");
212212
}
213213
}

0 commit comments

Comments
 (0)