Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Make ;;nowplaying display the current time and the full length of the current song #22

Closed
freyacodes opened this issue Sep 26, 2016 · 2 comments
Labels

Comments

@freyacodes
Copy link
Owner

The ;;nowplaying command should not only display which song is being played but also how much has been played of it compared to the full length. Perhaps even show the URL to the song. Other ideas welcome.

Currently only the name of the song is being displayed.

image

@JJ-The-Hitman
Copy link

JJ-The-Hitman commented Nov 21, 2016

@OverRide

public void onInvoke(Guild guild, TextChannel channel, User invoker, Message message, String[] args) {
GuildPlayer player = PlayerRegistry.get(guild.getId());
player.setCurrentTC(channel);
if (player.isPlaying()) {
channel.sendMessage("Now playing " + player.getPlayingTrack().getInfo().title + " ["
+ TextUtils.formatTime(player.getPlayingTrack().getPosition()) //edit
+ " / " //edit
+ TextUtils.formatTime(player.getPlayingTrack().getDuration())
+ "]");
} else {
channel.sendMessage("Not currently playing anything.");
}
}

Wouldn't this do the job? Inside of the NowPlayingCommand Class. by the way I would join NowplayingCommand to The Capital P

freyacodes added a commit that referenced this issue Nov 21, 2016
@freyacodes
Copy link
Owner Author

Committed. Next time please open a pull request instead of posting your code in a comment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants