diff options
Diffstat (limited to 'src/main/java/audio/Music.java')
| -rw-r--r-- | src/main/java/audio/Music.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/audio/Music.java b/src/main/java/audio/Music.java index 65e3564..cf30ee3 100644 --- a/src/main/java/audio/Music.java +++ b/src/main/java/audio/Music.java @@ -239,8 +239,9 @@ public class Music extends ListenerAdapter { loadAndPlay((TextChannel) event.getChannel(), youtubeAPI.returnTopVideoURL(spotifyAPI.getSearchTerm_sync(randomSong)), true);
}
else {
- event.reply("Found Video: " + youtubeAPI.returnTopVideoURL(userQuery)).queue();
- loadAndPlay((TextChannel) event.getChannel(), youtubeAPI.returnTopVideoURL(userQuery), true);
+ String top_video = youtubeAPI.returnTopVideoURL(userQuery);
+ event.reply("Found Video: " + top_video).queue();
+ loadAndPlay((TextChannel) event.getChannel(), top_video, true);
}
} catch (IOException e) {
e.printStackTrace();
|
