Queue length
This commit is contained in:
parent
f18c5e7d2b
commit
2b558c00fe
2 changed files with 5 additions and 3 deletions
|
|
@ -23,11 +23,13 @@ public class QueueCommand implements Command {
|
||||||
} else {
|
} else {
|
||||||
Set<AudioInfo> queue = event.getAudioManager().getTrackManager(event.getGuild()).getQueuedTracks();
|
Set<AudioInfo> queue = event.getAudioManager().getTrackManager(event.getGuild()).getQueuedTracks();
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
|
long queuelength = 0;
|
||||||
for (AudioInfo g : queue) {
|
for (AudioInfo g : queue) {
|
||||||
builder.append("**").append(g.getTrack().getInfo().author).append("**: `").append(g.getTrack().getInfo().title).append("` \n");
|
queuelength = queuelength + g.getTrack().getInfo().length;
|
||||||
|
builder.append("("+event.getAudioManager().getTimestamp(g.getTrack().getInfo().length)+") **").append(g.getTrack().getInfo().author).append("**: `").append(g.getTrack().getInfo().title).append("` \n");
|
||||||
}
|
}
|
||||||
event.getTextChannel().sendMessage(event.getMessageEditor().getMessage(MessageEditor.MessageType.INFO,
|
event.getTextChannel().sendMessage(event.getMessageEditor().getMessage(MessageEditor.MessageType.INFO,
|
||||||
"commands.music.queue.success.title", "",
|
"commands.music.queue.success.title", "("+String.valueOf(event.getAudioManager().getTimestamp(queuelength))+")",
|
||||||
"commands.music.queue.success.description", builder.toString())
|
"commands.music.queue.success.description", builder.toString())
|
||||||
.build()).queue();
|
.build()).queue();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ commands.music.info.error.description = I am not playing anything at the moment
|
||||||
commands.music.info.help.description = Shows information about the playing song.
|
commands.music.info.help.description = Shows information about the playing song.
|
||||||
commands.music.queue.error.title = No queue
|
commands.music.queue.error.title = No queue
|
||||||
commands.music.queue.error.description = There are no queued songs at the moment
|
commands.music.queue.error.description = There are no queued songs at the moment
|
||||||
commands.music.queue.success.title = Queue
|
commands.music.queue.success.title = Queue %extra%
|
||||||
commands.music.queue.success.description = This is the queue\: \n %extra%
|
commands.music.queue.success.description = This is the queue\: \n %extra%
|
||||||
commands.music.queue.help.description = Shows the music queue.
|
commands.music.queue.help.description = Shows the music queue.
|
||||||
commands.music.skip.success.title = Successfully skipped
|
commands.music.skip.success.title = Successfully skipped
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue