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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (!spotifyService.hasTrackPlaying(user)) {
|
if (!spotifyService.hasTrackPlaying(user)) {
|
||||||
// interaction.replyEmbeds(EmbedUtils.genericEmbed()
|
interaction.replyEmbeds(EmbedUtils.genericEmbed()
|
||||||
// .setDescription("You are not currently playing a track.")
|
.setDescription("You are not currently playing a track.")
|
||||||
// .build())
|
.build())
|
||||||
// .queue();
|
.queue();
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
CurrentlyPlaying currentlyPlaying = spotifyService.getCurrentlyPlayingTrack(user);
|
CurrentlyPlaying currentlyPlaying = spotifyService.getCurrentlyPlayingTrack(user);
|
||||||
Track track = (Track) currentlyPlaying.getItem();
|
Track track = (Track) currentlyPlaying.getItem();
|
||||||
AlbumSimplified album = track.getAlbum();
|
AlbumSimplified album = track.getAlbum();
|
||||||
|
@ -36,13 +36,13 @@ public class PauseSubCommand extends BatSubCommand {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (!spotifyService.hasTrackPlaying(user)) {
|
if (!spotifyService.hasTrackPlaying(user)) {
|
||||||
// interaction.replyEmbeds(EmbedUtils.genericEmbed()
|
interaction.replyEmbeds(EmbedUtils.genericEmbed()
|
||||||
// .setDescription("You need to be playing a track to pause it.")
|
.setDescription("You need to be playing a track to pause it.")
|
||||||
// .build())
|
.build())
|
||||||
// .queue();
|
.queue();
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
boolean didPause = spotifyService.pausePlayback(user);
|
boolean didPause = spotifyService.pausePlayback(user);
|
||||||
interaction.replyEmbeds(EmbedUtils.genericEmbed()
|
interaction.replyEmbeds(EmbedUtils.genericEmbed()
|
||||||
|
@ -86,8 +86,7 @@ public class SpotifyService {
|
|||||||
try {
|
try {
|
||||||
return getSpotifyApi(user).getUsersCurrentlyPlayingTrack().build().execute();
|
return getSpotifyApi(user).getUsersCurrentlyPlayingTrack().build().execute();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
throw new RuntimeException("Failed to get currently playing track", e);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user