make linking and unlinking only viewable to the user for spotify commands

This commit is contained in:
Lee 2024-06-29 12:45:16 +01:00
parent 20905a7962
commit 433dfb4693
2 changed files with 5 additions and 0 deletions

@ -43,6 +43,7 @@ public class LinkSubCommand extends BatSubCommand implements EventListener {
interaction.replyEmbeds(EmbedUtils.errorEmbed() interaction.replyEmbeds(EmbedUtils.errorEmbed()
.setDescription("You have already linked your Spotify account!") .setDescription("You have already linked your Spotify account!")
.build()) .build())
.setEphemeral(true)
.queue(); .queue();
return; 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())) .setDescription("You can link your Spotify account by clicking [here](%s)".formatted(spotifyService.getAuthorizationUrl()))
.build()) .build())
.addComponents(ActionRow.of(Button.primary("spotify_link", "Link Spotify"))) .addComponents(ActionRow.of(Button.primary("spotify_link", "Link Spotify")))
.setEphemeral(true)
.queue(); .queue();
} }
@ -88,6 +90,7 @@ public class LinkSubCommand extends BatSubCommand implements EventListener {
event.replyEmbeds(EmbedUtils.successEmbed() event.replyEmbeds(EmbedUtils.successEmbed()
.setDescription("Successfully linked your Spotify account!") .setDescription("Successfully linked your Spotify account!")
.build()) .build())
.setEphemeral(true)
.queue(); .queue();
} }
} }

@ -35,6 +35,7 @@ public class UnlinkSubCommand extends BatSubCommand implements EventListener {
interaction.replyEmbeds(EmbedUtils.errorEmbed() interaction.replyEmbeds(EmbedUtils.errorEmbed()
.setDescription("You do not have a linked Spotify account.") .setDescription("You do not have a linked Spotify account.")
.build()) .build())
.setEphemeral(true)
.queue(); .queue();
return; return;
} }
@ -44,6 +45,7 @@ public class UnlinkSubCommand extends BatSubCommand implements EventListener {
interaction.replyEmbeds(EmbedUtils.successEmbed() interaction.replyEmbeds(EmbedUtils.successEmbed()
.setDescription("Successfully unlinked your Spotify account.") .setDescription("Successfully unlinked your Spotify account.")
.build()) .build())
.setEphemeral(true)
.queue(); .queue();
} }
} }