From 433dfb46934ad92c423e74033ab1dccb7050c0e5 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 29 Jun 2024 12:45:16 +0100 Subject: [PATCH] make linking and unlinking only viewable to the user for spotify commands --- .../bat/features/spotify/command/LinkSubCommand.java | 3 +++ .../bat/features/spotify/command/UnlinkSubCommand.java | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/main/java/cc/fascinated/bat/features/spotify/command/LinkSubCommand.java b/src/main/java/cc/fascinated/bat/features/spotify/command/LinkSubCommand.java index 95af15f..2f0b644 100644 --- a/src/main/java/cc/fascinated/bat/features/spotify/command/LinkSubCommand.java +++ b/src/main/java/cc/fascinated/bat/features/spotify/command/LinkSubCommand.java @@ -43,6 +43,7 @@ public class LinkSubCommand extends BatSubCommand implements EventListener { interaction.replyEmbeds(EmbedUtils.errorEmbed() .setDescription("You have already linked your Spotify account!") .build()) + .setEphemeral(true) .queue(); return; } @@ -51,6 +52,7 @@ public class LinkSubCommand extends BatSubCommand implements EventListener { .setDescription("You can link your Spotify account by clicking [here](%s)".formatted(spotifyService.getAuthorizationUrl())) .build()) .addComponents(ActionRow.of(Button.primary("spotify_link", "Link Spotify"))) + .setEphemeral(true) .queue(); } @@ -88,6 +90,7 @@ public class LinkSubCommand extends BatSubCommand implements EventListener { event.replyEmbeds(EmbedUtils.successEmbed() .setDescription("Successfully linked your Spotify account!") .build()) + .setEphemeral(true) .queue(); } } diff --git a/src/main/java/cc/fascinated/bat/features/spotify/command/UnlinkSubCommand.java b/src/main/java/cc/fascinated/bat/features/spotify/command/UnlinkSubCommand.java index ec902d2..bdae693 100644 --- a/src/main/java/cc/fascinated/bat/features/spotify/command/UnlinkSubCommand.java +++ b/src/main/java/cc/fascinated/bat/features/spotify/command/UnlinkSubCommand.java @@ -35,6 +35,7 @@ public class UnlinkSubCommand extends BatSubCommand implements EventListener { interaction.replyEmbeds(EmbedUtils.errorEmbed() .setDescription("You do not have a linked Spotify account.") .build()) + .setEphemeral(true) .queue(); return; } @@ -44,6 +45,7 @@ public class UnlinkSubCommand extends BatSubCommand implements EventListener { interaction.replyEmbeds(EmbedUtils.successEmbed() .setDescription("Successfully unlinked your Spotify account.") .build()) + .setEphemeral(true) .queue(); } }