spotify is v silly!
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 40s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 40s
This commit is contained in:
parent
bf554933cc
commit
d77c937818
@ -42,13 +42,13 @@ public class CurrentSubCommand extends BatSubCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
// if (!spotifyService.hasTrackPlaying(user)) {
|
||||
// interaction.replyEmbeds(EmbedUtils.genericEmbed()
|
||||
// .setDescription("You are not currently playing a track.")
|
||||
// .build())
|
||||
// .queue();
|
||||
// return;
|
||||
// }
|
||||
if (!spotifyService.hasTrackPlaying(user)) {
|
||||
interaction.replyEmbeds(EmbedUtils.genericEmbed()
|
||||
.setDescription("You are not currently playing a track.")
|
||||
.build())
|
||||
.queue();
|
||||
return;
|
||||
}
|
||||
CurrentlyPlaying currentlyPlaying = spotifyService.getCurrentlyPlayingTrack(user);
|
||||
Track track = (Track) currentlyPlaying.getItem();
|
||||
AlbumSimplified album = track.getAlbum();
|
||||
|
@ -36,13 +36,13 @@ public class PauseSubCommand extends BatSubCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
// if (!spotifyService.hasTrackPlaying(user)) {
|
||||
// interaction.replyEmbeds(EmbedUtils.genericEmbed()
|
||||
// .setDescription("You need to be playing a track to pause it.")
|
||||
// .build())
|
||||
// .queue();
|
||||
// return;
|
||||
// }
|
||||
if (!spotifyService.hasTrackPlaying(user)) {
|
||||
interaction.replyEmbeds(EmbedUtils.genericEmbed()
|
||||
.setDescription("You need to be playing a track to pause it.")
|
||||
.build())
|
||||
.queue();
|
||||
return;
|
||||
}
|
||||
|
||||
boolean didPause = spotifyService.pausePlayback(user);
|
||||
interaction.replyEmbeds(EmbedUtils.genericEmbed()
|
||||
|
@ -86,8 +86,7 @@ public class SpotifyService {
|
||||
try {
|
||||
return getSpotifyApi(user).getUsersCurrentlyPlayingTrack().build().execute();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
throw new RuntimeException("Failed to get currently playing track", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user