!!lq now shows 'now playing' song
This commit is contained in:
parent
416f384bba
commit
7da3133117
@ -211,30 +211,30 @@ namespace NadekoBot.Modules.Music
|
|||||||
{
|
{
|
||||||
int startAt = itemsPerPage * (curPage - 1);
|
int startAt = itemsPerPage * (curPage - 1);
|
||||||
var number = 0 + startAt;
|
var number = 0 + startAt;
|
||||||
|
var desc = string.Join("\n", musicPlayer.Playlist
|
||||||
|
.Skip(startAt)
|
||||||
|
.Take(itemsPerPage)
|
||||||
|
.Select(v => $"`{++number}.` {v.PrettyFullName}"));
|
||||||
|
|
||||||
|
if (currentSong != null)
|
||||||
|
desc = $"`🔊` {currentSong.PrettyFullName}\n\n" + desc;
|
||||||
|
|
||||||
|
if (musicPlayer.RepeatSong)
|
||||||
|
desc = "🔂 Repeating Current Song\n\n" + desc;
|
||||||
|
else if (musicPlayer.RepeatPlaylist)
|
||||||
|
desc = "🔁 Repeating Playlist\n\n" + desc;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var embed = new EmbedBuilder()
|
var embed = new EmbedBuilder()
|
||||||
.WithAuthor(eab => eab.WithName($"Player Queue - Page {curPage}/{lastPage + 1}")
|
.WithAuthor(eab => eab.WithName($"Player Queue - Page {curPage}/{lastPage + 1}")
|
||||||
.WithMusicIcon())
|
.WithMusicIcon())
|
||||||
.WithDescription(string.Join("\n", musicPlayer.Playlist
|
.WithDescription(desc)
|
||||||
.Skip(startAt)
|
|
||||||
.Take(itemsPerPage)
|
|
||||||
.Select(v => $"`{++number}.` {v.PrettyFullName}")))
|
|
||||||
.WithFooter(ef => ef.WithText($"{musicPlayer.PrettyVolume} | {musicPlayer.Playlist.Count} " +
|
.WithFooter(ef => ef.WithText($"{musicPlayer.PrettyVolume} | {musicPlayer.Playlist.Count} " +
|
||||||
$"{("tracks".SnPl(musicPlayer.Playlist.Count))} | {totalStr} | " +
|
$"{("tracks".SnPl(musicPlayer.Playlist.Count))} | {totalStr} | " +
|
||||||
(musicPlayer.FairPlay ? "✔️fairplay" : "✖️fairplay") + $" | " + (maxPlaytime == 0 ? "unlimited" : $"{maxPlaytime}s limit")))
|
(musicPlayer.FairPlay ? "✔️fairplay" : "✖️fairplay") + $" | " + (maxPlaytime == 0 ? "unlimited" : $"{maxPlaytime}s limit")))
|
||||||
.WithOkColor();
|
.WithOkColor();
|
||||||
|
|
||||||
if (musicPlayer.RepeatSong)
|
|
||||||
{
|
|
||||||
embed.WithTitle($"🔂 Repeating Song: {currentSong.SongInfo.Title} | {currentSong.PrettyFullTime}");
|
|
||||||
}
|
|
||||||
else if (musicPlayer.RepeatPlaylist)
|
|
||||||
{
|
|
||||||
embed.WithTitle("🔁 Repeating Playlist");
|
|
||||||
}
|
|
||||||
if (musicPlayer.MaxQueueSize != 0 && musicPlayer.Playlist.Count >= musicPlayer.MaxQueueSize)
|
|
||||||
{
|
|
||||||
embed.WithTitle("🎵 Song queue is full!");
|
|
||||||
}
|
|
||||||
return embed;
|
return embed;
|
||||||
};
|
};
|
||||||
await Context.Channel.SendPaginatedConfirmAsync(page, printAction, lastPage, false).ConfigureAwait(false);
|
await Context.Channel.SendPaginatedConfirmAsync(page, printAction, lastPage, false).ConfigureAwait(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user