From 941162a739aaa8d95f2bbb7b60fa952300214b67 Mon Sep 17 00:00:00 2001 From: samvaio Date: Wed, 21 Dec 2016 17:29:25 +0530 Subject: [PATCH 1/4] Music and Overwatch Fix - Fixed more like bypassed the issue with now playing and list queue when a playlist of more than 50 song is queued. - added embeds to list queue and song removed (thanks to private) - fixed the embeds for local files and separated the url for youtube and soundcloud to prevent issues with radio and local queues, - added slow of 2s/queue to youtube playlist queue to patch the google api errors and issue of missing few songs from playlist due to that. - pause, resume, playing and finishes messages now do not spam the chat, there will always be one of each message on apply. - moved the playing msg to fix the bot spamming playing message instead of finish msg and spams the chat. - overwatch now shows stats for users with no competitive plays. --- src/NadekoBot/Modules/Music/Classes/Song.cs | 9 +- src/NadekoBot/Modules/Music/Music.cs | 175 ++++++++++++++---- .../Searches/Commands/OverwatchCommands.cs | 18 +- src/NadekoBot/project.json | 2 +- 4 files changed, 161 insertions(+), 43 deletions(-) diff --git a/src/NadekoBot/Modules/Music/Classes/Song.cs b/src/NadekoBot/Modules/Music/Classes/Song.cs index 2623f680..bfe9ea31 100644 --- a/src/NadekoBot/Modules/Music/Classes/Song.cs +++ b/src/NadekoBot/Modules/Music/Classes/Song.cs @@ -47,14 +47,19 @@ namespace NadekoBot.Modules.Music.Classes var time = TimeSpan.FromSeconds(bytesSent / 3840 / 50); var str = $"{(int)time.TotalMinutes}m {time.Seconds}s / "; if (TotalLength == TimeSpan.Zero) - str += "**?**"; + str += "(?)"; else if (TotalLength == TimeSpan.MaxValue) str += "**∞**"; else str += $"{(int)TotalLength.TotalMinutes}m {TotalLength.Seconds}s"; return str; } - + public string PrettyMusicPlayTime() + { + var time = TimeSpan.FromSeconds(bytesSent / 3840 / 50); + var str = $"{(int)time.TotalMinutes}m {time.Seconds}s "; + return str; + } const int milliseconds = 20; const int samplesPerFrame = (48000 / 1000) * milliseconds; const int frameBytes = 3840; //16-bit, 2 channels diff --git a/src/NadekoBot/Modules/Music/Music.cs b/src/NadekoBot/Modules/Music/Music.cs index 81e5c95d..9d0eee8f 100644 --- a/src/NadekoBot/Modules/Music/Music.cs +++ b/src/NadekoBot/Modules/Music/Music.cs @@ -168,28 +168,58 @@ namespace NadekoBot.Modules.Music var currentSong = musicPlayer.CurrentSong; if (currentSong == null) - return; - - if (currentSong.TotalLength == TimeSpan.Zero) { - await musicPlayer.UpdateSongDurationsAsync().ConfigureAwait(false); + await channel.SendErrorAsync("🎵 No active music player.").ConfigureAwait(false); + return; } + //if (currentSong.TotalLength == TimeSpan.Zero) + //{ + //await musicPlayer.UpdateSongDurationsAsync().ConfigureAwait(false); + //} + //var toSend = $"🎵 Currently Playing {currentSong.PrettyName} " + $"`{currentSong.PrettyCurrentTime()}`\n"; - var toSend = $"🎵 Currently Playing {currentSong.PrettyName}\n"; - if (musicPlayer.RepeatSong) - toSend += "🔂"; - else if (musicPlayer.RepeatPlaylist) - toSend += "🔁"; - toSend += $" `{musicPlayer.Playlist.Count} tracks currently queued. Showing page {page}:` "; - if (musicPlayer.MaxQueueSize != 0 && musicPlayer.Playlist.Count >= musicPlayer.MaxQueueSize) - toSend += "**Song queue is full!**\n"; - else - toSend += "\n"; - const int itemsPerPage = 15; + //var toSend = $"🎵 Currently Playing {currentSong.PrettyName}\n"; + + //I did that ^ because current song, bugs when a youtube playlist is queued with more than 50 song, it more like a bug with youtube page token I believe. + + const int itemsPerPage = 15; int startAt = itemsPerPage * (page - 1); var number = 1 + startAt; - await channel.SendConfirmAsync(toSend + string.Join("\n", musicPlayer.Playlist.Skip(startAt).Take(15).Select(v => $"`{number++}.` {v.PrettyName}"))).ConfigureAwait(false); + var embed = new EmbedBuilder() + .WithAuthor(eab => eab.WithName($"Track List: Page {page}").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithDescription(string.Join("\n", musicPlayer.Playlist.Skip(startAt).Take(15).Select(v => $"`{number++}.` **[{v.SongInfo.Title}]({v.SongInfo.Query})** `{v.PrettyProvider} | {v.PrettyUser}`"))) + .WithFooter(ef => ef.WithText($"{musicPlayer.Playlist.Count} tracks currently queued.")) + .WithColor(NadekoBot.OkColor); + if (musicPlayer.RepeatSong) + { + embed.WithTitle($"🔂 Repeating Song: {currentSong.SongInfo.Title}"); + } + else if (musicPlayer.RepeatPlaylist) + { + embed.WithTitle("🔁 Repeating Playlist"); + } + if (musicPlayer.MaxQueueSize != 0 && musicPlayer.Playlist.Count >= musicPlayer.MaxQueueSize) + { + embed.WithTitle("🔁 Song queue is full!"); + } + await channel.EmbedAsync(embed.Build()).ConfigureAwait(false); + + + //var toSend = $"test"; //this was for testing + //if (musicPlayer.RepeatSong) + //toSend += "🔂"; + //else if (musicPlayer.RepeatPlaylist) + //toSend += "🔁"; + //toSend += $" `{musicPlayer.Playlist.Count} tracks currently queued. Showing page {page}:` "; + //if (musicPlayer.MaxQueueSize != 0 && musicPlayer.Playlist.Count >= musicPlayer.MaxQueueSize) + //toSend += "**Song queue is full!**\n"; + //else + //toSend += "\n"; + //const int itemsPerPage = 15; + //int startAt = itemsPerPage * (page - 1); + //var number = 1 + startAt; + //await channel.SendConfirmAsync(toSend + string.Join("\n", musicPlayer.Playlist.Skip(startAt).Take(15).Select(v => $"`{number++}.` {v.PrettyName}"))).ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -205,25 +235,43 @@ namespace NadekoBot.Modules.Music if (currentSong == null) return; var videoid = Regex.Match(currentSong.SongInfo.Query, "<=v=[a-zA-Z0-9-]+(?=&)|(?<=[0-9])[^&\n]+|(?<=v=)[^&\n]+"); - - if (currentSong.TotalLength == TimeSpan.Zero) - { - await musicPlayer.UpdateSongDurationsAsync().ConfigureAwait(false); - } + var embed = new EmbedBuilder() - .WithAuthor(eab => eab.WithName("Now Playing").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithAuthor(eab => eab.WithName("Now Playing").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) .WithTitle($"{currentSong.SongInfo.Title}") - .WithUrl($"{currentSong.SongInfo.Query}") - .WithDescription($"{currentSong.PrettyCurrentTime()}") + //.WithDescription($"{currentSong.PrettyCurrentTime()}") .WithFooter(ef => ef.WithText($"{currentSong.PrettyProvider} | {currentSong.PrettyUser}")) - .WithColor(NadekoBot.OkColor); + .WithColor(NadekoBot.OkColor); if (currentSong.SongInfo.Provider.Equals("YouTube", StringComparison.OrdinalIgnoreCase)) { embed.WithThumbnail(tn => tn.Url = $"https://img.youtube.com/vi/{videoid}/0.jpg"); + embed.WithUrl($"{currentSong.SongInfo.Query}"); + if (musicPlayer.Playlist.Count < 50) + { + if (currentSong.TotalLength == TimeSpan.Zero) + { + await musicPlayer.UpdateSongDurationsAsync().ConfigureAwait(false); + } + embed.WithDescription($"{currentSong.PrettyCurrentTime()}"); + } + else if (musicPlayer.Playlist.Count > 50) + { + embed.WithDescription($"{currentSong.PrettyMusicPlayTime()}"); + } } else if (currentSong.SongInfo.Provider.Equals("SoundCloud", StringComparison.OrdinalIgnoreCase)) { embed.WithThumbnail(tn => tn.Url = $"{currentSong.SongInfo.AlbumArt}"); + embed.WithUrl($"{currentSong.SongInfo.Query}"); + if (currentSong.TotalLength == TimeSpan.Zero) + { + await musicPlayer.UpdateSongDurationsAsync().ConfigureAwait(false); + } + embed.WithDescription($"{currentSong.PrettyCurrentTime()}"); + } + else if (currentSong.SongInfo.Provider.Equals("Local File", StringComparison.OrdinalIgnoreCase)) + { + embed.WithDescription($"{currentSong.PrettyMusicPlayTime()}"); } await channel.EmbedAsync(embed.Build()).ConfigureAwait(false); } @@ -310,17 +358,22 @@ namespace NadekoBot.Modules.Music } var idArray = ids as string[] ?? ids.ToArray(); var count = idArray.Length; + var msg = await channel.SendMessageAsync($"🎵 Attempting to queue **{count}** songs".SnPl(count) + "...").ConfigureAwait(false); + foreach (var id in idArray) { try { await QueueSong(((IGuildUser)umsg.Author), channel, ((IGuildUser)umsg.Author).VoiceChannel, id, true).ConfigureAwait(false); + await Task.Delay(2000).ConfigureAwait(false); //fixes google api error for few songs on playlist.// } catch (SongNotFoundException) { } catch { break; } + } + await msg.ModifyAsync(m => m.Content = "✅ Playlist queue complete.").ConfigureAwait(false); } @@ -453,7 +506,13 @@ namespace NadekoBot.Modules.Music return; var song = (musicPlayer.Playlist as List)?[num - 1]; musicPlayer.RemoveSongAt(num - 1); - await channel.SendConfirmAsync($"🎵 Track {song.PrettyName} at position `#{num}` has been **removed**.").ConfigureAwait(false); + //await channel.SendConfirmAsync($"🎵 Track {song.PrettyName} at position `#{num}` has been **removed**.").ConfigureAwait(false); + var embed = new EmbedBuilder() + .WithAuthor(eab => eab.WithName("Song Removed!").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .AddField(fb => fb.WithName("**Song Position**").WithValue($"#{num}").WithIsInline(true)) + .AddField(fb => fb.WithName("**Song Name**").WithValue($"**[{song.SongInfo.Title.TrimTo(80)}]({song.SongInfo.Query})** `{song.PrettyProvider} | {song.PrettyUser}`").WithIsInline(true)) + .WithColor(NadekoBot.ErrorColor); + await channel.EmbedAsync(embed.Build()).ConfigureAwait(false); } [NadekoCommand, Usage, Description, Aliases] @@ -646,9 +705,16 @@ namespace NadekoBot.Modules.Music playlists = uow.MusicPlaylists.GetPlaylistsOnPage(num); } - await channel.SendConfirmAsync($@"🎶 **Page {num} of saved playlists:** + //await channel.SendConfirmAsync($@"🎶 **Page {num} of saved playlists:** -" + string.Join("\n", playlists.Select(r => $"`#{r.Id}` - **{r.Name}** by __{r.Author}__ ({r.Songs.Count} songs)"))).ConfigureAwait(false); +//" + string.Join("\n", playlists.Select(r => $"`#{r.Id}` - **{r.Name}** by __{r.Author}__ ({r.Songs.Count} songs)"))).ConfigureAwait(false); + + var embed = new EmbedBuilder() + .WithAuthor(eab => eab.WithName($"Page {num} of Saved Playlists").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithDescription(string.Join("\n", playlists.Select(r => $"`#{r.Id}` - **{r.Name}**\t by **{r.Author}**\t ({r.Songs.Count} songs)"))) + .WithColor(NadekoBot.OkColor); + await channel.EmbedAsync(embed.Build()).ConfigureAwait(false); + } //todo only author or owner @@ -805,10 +871,14 @@ namespace NadekoBot.Modules.Music try { if (lastFinishedMessage != null) - await lastFinishedMessage.DeleteAsync().ConfigureAwait(false); - if (playingMessage != null) - await playingMessage.DeleteAsync().ConfigureAwait(false); - try { lastFinishedMessage = await textCh.SendConfirmAsync($"🎵 Finished {song.PrettyName}").ConfigureAwait(false); } catch { } + { + await lastFinishedMessage.DeleteAsync().ConfigureAwait(false); + try { lastFinishedMessage = await textCh.SendConfirmAsync($"🎵 Finished {song.PrettyName}").ConfigureAwait(false); } catch { } + } + else + { + try { lastFinishedMessage = await textCh.SendConfirmAsync($"🎵 Finished {song.PrettyName}").ConfigureAwait(false); } catch { } + } if (mp.Autoplay && mp.Playlist.Count == 0 && song.SongInfo.Provider == "YouTube") { await QueueSong(queuer.Guild.GetCurrentUser(), textCh, voiceCh, (await NadekoBot.Google.GetRelatedVideosAsync(song.SongInfo.Query, 4)).ToList().Shuffle().FirstOrDefault(), silent, musicType).ConfigureAwait(false); @@ -822,21 +892,50 @@ namespace NadekoBot.Modules.Music if (song.PrintStatusMessage) { var sender = s as MusicPlayer; + var msgTxt = $"🎵 Playing {song.PrettyName}\t `Vol: {(int)(sender.Volume * 100)}%`"; if (sender == null) return; - - var msgTxt = $"🎵 Playing {song.PrettyName}\t `Vol: {(int)(sender.Volume * 100)}%`"; - try { playingMessage = await textCh.SendConfirmAsync(msgTxt).ConfigureAwait(false); } catch { } + if (playingMessage != null) + { + await playingMessage.DeleteAsync().ConfigureAwait(false); + try { playingMessage = await textCh.SendConfirmAsync(msgTxt).ConfigureAwait(false); } catch { } + } + else + { + try { playingMessage = await textCh.SendConfirmAsync(msgTxt).ConfigureAwait(false); } catch { } + } } }; + IUserMessage resumemsg = null; + IUserMessage pausemsg = null; mp.OnPauseChanged += async (paused) => { try { if (paused) - await textCh.SendConfirmAsync("🎵 Music playback **paused**.").ConfigureAwait(false); + { + if (pausemsg != null) + { + await pausemsg.DeleteAsync().ConfigureAwait(false); + try { pausemsg = await textCh.SendConfirmAsync("🎵 Music playback **paused**.").ConfigureAwait(false); } catch { } + } + else + { + try { pausemsg = await textCh.SendConfirmAsync("🎵 Music playback **paused**.").ConfigureAwait(false); } catch { } + } + } else - await textCh.SendConfirmAsync("🎵 Music playback **resumed**.").ConfigureAwait(false); + { + if (resumemsg != null) + { + await resumemsg.DeleteAsync().ConfigureAwait(false); + try { resumemsg = await textCh.SendConfirmAsync("🎵 Music playback **resumed**.").ConfigureAwait(false); } catch { } + } + else + { + try { resumemsg = await textCh.SendConfirmAsync("🎵 Music playback **resumed**.").ConfigureAwait(false); } catch { } + } + } } catch { } }; @@ -862,7 +961,7 @@ namespace NadekoBot.Modules.Music { try { - var queuedMessage = await textCh.SendConfirmAsync($"🎵 Queued **{resolvedSong.SongInfo.Title.TrimTo(55)}** at `#{musicPlayer.Playlist.Count + 1}`").ConfigureAwait(false); + var queuedMessage = await textCh.SendConfirmAsync($"🎵 Queued **{resolvedSong.SongInfo.Title}** at `#{musicPlayer.Playlist.Count + 1}`").ConfigureAwait(false); var t = Task.Run(async () => { try diff --git a/src/NadekoBot/Modules/Searches/Commands/OverwatchCommands.cs b/src/NadekoBot/Modules/Searches/Commands/OverwatchCommands.cs index ec3ddfb1..69697608 100644 --- a/src/NadekoBot/Modules/Searches/Commands/OverwatchCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/OverwatchCommands.cs @@ -37,6 +37,7 @@ namespace NadekoBot.Modules.Searches var rankimg = $"{model.Competitive.rank_img}"; var rank = $"{model.Competitive.rank}"; + var competitiveplay = $"{model.Games.Competitive.played}"; if (string.IsNullOrWhiteSpace(rank)) { var embed = new EmbedBuilder() @@ -72,8 +73,21 @@ namespace NadekoBot.Modules.Searches .AddField(fb => fb.WithName("**Quick Playtime**").WithValue($"{model.Playtime.quick}").WithIsInline(true)) .WithColor(NadekoBot.OkColor); await channel.EmbedAsync(embed.Build()).ConfigureAwait(false); - return; - } + } + if (string.IsNullOrWhiteSpace(competitiveplay)) + { + var embed = new EmbedBuilder() + .WithAuthor(eau => eau.WithName($"{model.username}") + .WithUrl($"https://www.overbuff.com/players/pc/{battletag}") + .WithIconUrl($"{model.avatar}")) + .WithThumbnail(th => th.WithUrl("https://cdn.discordapp.com/attachments/155726317222887425/255653487512256512/YZ4w2ey.png")) + .AddField(fb => fb.WithName("**Level**").WithValue($"{model.level}").WithIsInline(true)) + .AddField(fb => fb.WithName("**Quick Wins**").WithValue($"{model.Games.Quick.wins}").WithIsInline(true)) + .AddField(fb => fb.WithName("**Competitive Playtime**").WithValue($"0 hour").WithIsInline(true)) + .AddField(fb => fb.WithName("**Quick Playtime**").WithValue($"{model.Playtime.quick}").WithIsInline(true)) + .WithColor(NadekoBot.OkColor); + await channel.EmbedAsync(embed.Build()).ConfigureAwait(false); + } } catch { diff --git a/src/NadekoBot/project.json b/src/NadekoBot/project.json index cbf49aa2..4aeef449 100644 --- a/src/NadekoBot/project.json +++ b/src/NadekoBot/project.json @@ -26,7 +26,7 @@ "target": "project" }, "Google.Apis.Urlshortener.v1": "1.19.0.138", - "Google.Apis.YouTube.v3": "1.19.0.655", + "Google.Apis.YouTube.v3": "1.20.0.701", "ImageSharp": "1.0.0-alpha-000079", "Microsoft.EntityFrameworkCore": "1.1.0", "Microsoft.EntityFrameworkCore.Design": "1.1.0", From 02325d1f5d6f98092e8db5c4fae9a23b9241a29b Mon Sep 17 00:00:00 2001 From: samvaio Date: Thu, 22 Dec 2016 05:22:52 +0530 Subject: [PATCH 2/4] More changes --- src/NadekoBot/Modules/Music/Classes/Song.cs | 25 ++-- src/NadekoBot/Modules/Music/Music.cs | 119 ++++++++++++++------ src/NadekoBot/Modules/Searches/Searches.cs | 2 +- 3 files changed, 97 insertions(+), 49 deletions(-) diff --git a/src/NadekoBot/Modules/Music/Classes/Song.cs b/src/NadekoBot/Modules/Music/Classes/Song.cs index bfe9ea31..e80a16be 100644 --- a/src/NadekoBot/Modules/Music/Classes/Song.cs +++ b/src/NadekoBot/Modules/Music/Classes/Song.cs @@ -24,28 +24,29 @@ namespace NadekoBot.Modules.Music.Classes public string Query { get; set; } public string Title { get; set; } public string Uri { get; set; } - public string AlbumArt { get; set; } + public string AlbumArt { get; set; } } public class Song { - public StreamState State { get; set; } + public StreamState State { get; set; } public string PrettyName => $"**{SongInfo.Title.TrimTo(55)} `{(SongInfo.Provider ?? "-")} by {QueuerName}`**"; - //$"{SongInfo.Title.TrimTo(70)}"; + //$"{SongInfo.Title.TrimTo(70)}"; public SongInfo SongInfo { get; } public MusicPlayer MusicPlayer { get; set; } - - public string PrettyUser => + + public string PrettyUser => $"{QueuerName}"; public string QueuerName { get; set; } - - public string PrettyProvider => + + public string PrettyProvider => $"{(SongInfo.Provider ?? "No Provider")}"; public string PrettyCurrentTime() { var time = TimeSpan.FromSeconds(bytesSent / 3840 / 50); - var str = $"{(int)time.TotalMinutes}m {time.Seconds}s / "; + //var str = $"{(int)time.TotalMinutes}m {time.Seconds}s / "; + var str = $""; if (TotalLength == TimeSpan.Zero) str += "(?)"; else if (TotalLength == TimeSpan.MaxValue) @@ -57,7 +58,7 @@ namespace NadekoBot.Modules.Music.Classes public string PrettyMusicPlayTime() { var time = TimeSpan.FromSeconds(bytesSent / 3840 / 50); - var str = $"{(int)time.TotalMinutes}m {time.Seconds}s "; + var str = $"{(int)time.TotalMinutes}m {time.Seconds}s"; return str; } const int milliseconds = 20; @@ -108,8 +109,6 @@ namespace NadekoBot.Modules.Music.Classes SongBuffer inStream = new SongBuffer(MusicPlayer, filename, SongInfo, skipTo, frameBytes * 100); var bufferTask = inStream.BufferSong(cancelToken).ConfigureAwait(false); - bytesSent = 0; - try { var attempt = 0; @@ -325,7 +324,7 @@ namespace NadekoBot.Modules.Music.Classes Uri = svideo.StreamLink, ProviderType = musicType, Query = svideo.TrackLink, - AlbumArt = svideo.artwork_url, + AlbumArt = svideo.artwork_url, }) { TotalLength = TimeSpan.FromMilliseconds(svideo.Duration) }; } @@ -340,7 +339,7 @@ namespace NadekoBot.Modules.Music.Classes Uri = svideo.StreamLink, ProviderType = MusicType.Normal, Query = svideo.TrackLink, - AlbumArt = svideo.artwork_url, + AlbumArt = svideo.artwork_url, }) { TotalLength = TimeSpan.FromMilliseconds(svideo.Duration) }; } diff --git a/src/NadekoBot/Modules/Music/Music.cs b/src/NadekoBot/Modules/Music/Music.cs index 9d0eee8f..6040c162 100644 --- a/src/NadekoBot/Modules/Music/Music.cs +++ b/src/NadekoBot/Modules/Music/Music.cs @@ -98,16 +98,30 @@ namespace NadekoBot.Modules.Music [NadekoCommand, Usage, Description, Aliases] [RequireContext(ContextType.Guild)] - public Task Destroy(IUserMessage umsg) + public async Task Destroy(IUserMessage umsg) + //public Task Destroy(IUserMessage umsg) { var channel = (ITextChannel)umsg.Channel; + var msg = + await channel.SendMessageAsync($"🔴 Initiating Self-Destruct Sequence!").ConfigureAwait(false); + await Task.Delay(2000).ConfigureAwait(false); + await msg.ModifyAsync(m => m.Content = "⚪️ Self-Destruct Sequence Initiated T Minus 4").ConfigureAwait(false); + await Task.Delay(1000).ConfigureAwait(false); + await msg.ModifyAsync(m => m.Content = "🔴 Self-Destruct Sequence Initiated T Minus 3").ConfigureAwait(false); + await Task.Delay(1000).ConfigureAwait(false); + await msg.ModifyAsync(m => m.Content = "⚪️ Self-Destruct Sequence Initiated T Minus 2").ConfigureAwait(false); + await Task.Delay(1000).ConfigureAwait(false); + await msg.ModifyAsync(m => m.Content = "🔴 Self-Destruct Sequence Initiated T Minus 1").ConfigureAwait(false); + await Task.Delay(2000).ConfigureAwait(false); + await msg.ModifyAsync(m => m.Content = "🌸 Nice Try! I am Indestructible.").ConfigureAwait(false); + - MusicPlayer musicPlayer; + /*MusicPlayer musicPlayer; if (!MusicPlayers.TryGetValue(channel.Guild.Id, out musicPlayer)) return Task.CompletedTask; if (((IGuildUser)umsg.Author).VoiceChannel == musicPlayer.PlaybackVoiceChannel) if(MusicPlayers.TryRemove(channel.Guild.Id, out musicPlayer)) musicPlayer.Destroy(); - return Task.CompletedTask; + return Task.CompletedTask;*/ } [NadekoCommand, Usage, Description, Aliases] @@ -173,27 +187,29 @@ namespace NadekoBot.Modules.Music return; } - //if (currentSong.TotalLength == TimeSpan.Zero) - //{ - //await musicPlayer.UpdateSongDurationsAsync().ConfigureAwait(false); - //} + if (currentSong.TotalLength == TimeSpan.Zero) + { + await musicPlayer.UpdateSongDurationsAsync().ConfigureAwait(false); + } + //var toSend = $"🎵 Currently Playing {currentSong.PrettyName} " + $"`{currentSong.PrettyCurrentTime()}`\n"; //var toSend = $"🎵 Currently Playing {currentSong.PrettyName}\n"; //I did that ^ because current song, bugs when a youtube playlist is queued with more than 50 song, it more like a bug with youtube page token I believe. - - const int itemsPerPage = 15; + + const int itemsPerPage = 10; int startAt = itemsPerPage * (page - 1); var number = 1 + startAt; + var embed = new EmbedBuilder() .WithAuthor(eab => eab.WithName($"Track List: Page {page}").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) - .WithDescription(string.Join("\n", musicPlayer.Playlist.Skip(startAt).Take(15).Select(v => $"`{number++}.` **[{v.SongInfo.Title}]({v.SongInfo.Query})** `{v.PrettyProvider} | {v.PrettyUser}`"))) + .WithDescription(string.Join("\n", musicPlayer.Playlist.Skip(startAt).Take(10).Select(v => $"`{number++}.` **[{v.SongInfo.Title.TrimTo(70)}]({v.SongInfo.Query})**\n\t\t*{v.PrettyCurrentTime()}* **|** *{v.PrettyProvider}* **|** *{v.QueuerName}*"))) .WithFooter(ef => ef.WithText($"{musicPlayer.Playlist.Count} tracks currently queued.")) .WithColor(NadekoBot.OkColor); if (musicPlayer.RepeatSong) { - embed.WithTitle($"🔂 Repeating Song: {currentSong.SongInfo.Title}"); + embed.WithTitle($"🔂 Repeating Song: {currentSong.SongInfo.Title} | {currentSong.PrettyMusicPlayTime()} / {currentSong.PrettyCurrentTime()}"); } else if (musicPlayer.RepeatPlaylist) { @@ -201,8 +217,8 @@ namespace NadekoBot.Modules.Music } if (musicPlayer.MaxQueueSize != 0 && musicPlayer.Playlist.Count >= musicPlayer.MaxQueueSize) { - embed.WithTitle("🔁 Song queue is full!"); - } + embed.WithTitle("🎵 Song queue is full!"); + } await channel.EmbedAsync(embed.Build()).ConfigureAwait(false); @@ -240,24 +256,24 @@ namespace NadekoBot.Modules.Music .WithAuthor(eab => eab.WithName("Now Playing").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) .WithTitle($"{currentSong.SongInfo.Title}") //.WithDescription($"{currentSong.PrettyCurrentTime()}") - .WithFooter(ef => ef.WithText($"{currentSong.PrettyProvider} | {currentSong.PrettyUser}")) + .WithFooter(ef => ef.WithText($"{currentSong.PrettyProvider} | {currentSong.QueuerName}")) .WithColor(NadekoBot.OkColor); if (currentSong.SongInfo.Provider.Equals("YouTube", StringComparison.OrdinalIgnoreCase)) { embed.WithThumbnail(tn => tn.Url = $"https://img.youtube.com/vi/{videoid}/0.jpg"); embed.WithUrl($"{currentSong.SongInfo.Query}"); - if (musicPlayer.Playlist.Count < 50) - { + //if (musicPlayer.Playlist.Count < 50) + //{ if (currentSong.TotalLength == TimeSpan.Zero) { await musicPlayer.UpdateSongDurationsAsync().ConfigureAwait(false); } - embed.WithDescription($"{currentSong.PrettyCurrentTime()}"); - } - else if (musicPlayer.Playlist.Count > 50) - { - embed.WithDescription($"{currentSong.PrettyMusicPlayTime()}"); - } + embed.WithDescription($"{currentSong.PrettyMusicPlayTime()} / {currentSong.PrettyCurrentTime()}"); + //} + //else if (musicPlayer.Playlist.Count > 50) + //{ + //embed.WithDescription($"{currentSong.PrettyMusicPlayTime()}"); + //} } else if (currentSong.SongInfo.Provider.Equals("SoundCloud", StringComparison.OrdinalIgnoreCase)) { @@ -267,7 +283,7 @@ namespace NadekoBot.Modules.Music { await musicPlayer.UpdateSongDurationsAsync().ConfigureAwait(false); } - embed.WithDescription($"{currentSong.PrettyCurrentTime()}"); + embed.WithDescription($"{currentSong.PrettyMusicPlayTime()} / {currentSong.PrettyCurrentTime()}"); } else if (currentSong.SongInfo.Provider.Equals("Local File", StringComparison.OrdinalIgnoreCase)) { @@ -367,7 +383,7 @@ namespace NadekoBot.Modules.Music try { await QueueSong(((IGuildUser)umsg.Author), channel, ((IGuildUser)umsg.Author).VoiceChannel, id, true).ConfigureAwait(false); - await Task.Delay(2000).ConfigureAwait(false); //fixes google api error for few songs on playlist.// + //await Task.Delay(2000).ConfigureAwait(false); //fixes google api error for few songs on playlist.// } catch (SongNotFoundException) { } catch { break; } @@ -510,7 +526,7 @@ namespace NadekoBot.Modules.Music var embed = new EmbedBuilder() .WithAuthor(eab => eab.WithName("Song Removed!").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) .AddField(fb => fb.WithName("**Song Position**").WithValue($"#{num}").WithIsInline(true)) - .AddField(fb => fb.WithName("**Song Name**").WithValue($"**[{song.SongInfo.Title.TrimTo(80)}]({song.SongInfo.Query})** `{song.PrettyProvider} | {song.PrettyUser}`").WithIsInline(true)) + .AddField(fb => fb.WithName("**Song Name**").WithValue($"**[{song.SongInfo.Title.TrimTo(70)}]({song.SongInfo.Query})** `{song.PrettyProvider} | {song.QueuerName.TrimTo(15)}`").WithIsInline(true)) .WithColor(NadekoBot.ErrorColor); await channel.EmbedAsync(embed.Build()).ConfigureAwait(false); } @@ -711,7 +727,7 @@ namespace NadekoBot.Modules.Music var embed = new EmbedBuilder() .WithAuthor(eab => eab.WithName($"Page {num} of Saved Playlists").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) - .WithDescription(string.Join("\n", playlists.Select(r => $"`#{r.Id}` - **{r.Name}**\t by **{r.Author}**\t ({r.Songs.Count} songs)"))) + .WithDescription(string.Join("\n", playlists.Select(r => $"`#{r.Id}` - **{r.Name}**\t by **`{r.Author}`**\t ({r.Songs.Count} songs)"))) .WithColor(NadekoBot.OkColor); await channel.EmbedAsync(embed.Build()).ConfigureAwait(false); @@ -816,7 +832,7 @@ namespace NadekoBot.Modules.Music } else { - await channel.SendConfirmAsync($"🎶 Selected song **{selSong.SongInfo.Title}**: <{selSong.SongInfo.Query}>").ConfigureAwait(false); + await channel.SendMessageAsync($"🎶 Selected song **{selSong.SongInfo.Title}**: <{selSong.SongInfo.Query}>").ConfigureAwait(false); } } else @@ -824,7 +840,7 @@ namespace NadekoBot.Modules.Music var curSong = musicPlayer.CurrentSong; if (curSong == null) return; - await channel.SendConfirmAsync($"🎶 Current song **{curSong.SongInfo.Title}**: <{curSong.SongInfo.Query}>").ConfigureAwait(false); + await channel.SendMessageAsync($"🎶 Current song **{curSong.SongInfo.Title}**: <{curSong.SongInfo.Query}>").ConfigureAwait(false); } } @@ -873,11 +889,23 @@ namespace NadekoBot.Modules.Music if (lastFinishedMessage != null) { await lastFinishedMessage.DeleteAsync().ConfigureAwait(false); - try { lastFinishedMessage = await textCh.SendConfirmAsync($"🎵 Finished {song.PrettyName}").ConfigureAwait(false); } catch { } + //try { lastFinishedMessage = await textCh.SendConfirmAsync($"🎵 Finished {song.PrettyName}").ConfigureAwait(false); } catch { } + try { lastFinishedMessage = await textCh.EmbedAsync(new EmbedBuilder().WithColor(NadekoBot.OkColor) + .WithAuthor(eab => eab.WithName("Finished Song").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithTitle($"{song.SongInfo.Title}") + .WithFooter(ef => ef.WithText($"{song.PrettyProvider} | {song.QueuerName}")) + .Build()) + .ConfigureAwait(false); } catch { } } else { - try { lastFinishedMessage = await textCh.SendConfirmAsync($"🎵 Finished {song.PrettyName}").ConfigureAwait(false); } catch { } + try { lastFinishedMessage = await textCh.EmbedAsync(new EmbedBuilder().WithColor(NadekoBot.OkColor) + .WithAuthor(eab => eab.WithName("Finished Song").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithTitle($"{song.SongInfo.Title}") + .WithFooter(ef => ef.WithText($"{song.PrettyProvider} | {song.QueuerName}")) + .Build()) + .ConfigureAwait(false); } catch { } + //try { lastFinishedMessage = await textCh.SendConfirmAsync($"🎵 Finished {song.PrettyName}").ConfigureAwait(false); } catch { } } if (mp.Autoplay && mp.Playlist.Count == 0 && song.SongInfo.Provider == "YouTube") { @@ -892,17 +920,31 @@ namespace NadekoBot.Modules.Music if (song.PrintStatusMessage) { var sender = s as MusicPlayer; - var msgTxt = $"🎵 Playing {song.PrettyName}\t `Vol: {(int)(sender.Volume * 100)}%`"; + //var msgTxt = $"🎵 Playing {song.PrettyName}\t `Vol: {(int)(sender.Volume * 100)}%`"; if (sender == null) return; if (playingMessage != null) { await playingMessage.DeleteAsync().ConfigureAwait(false); - try { playingMessage = await textCh.SendConfirmAsync(msgTxt).ConfigureAwait(false); } catch { } + //try { playingMessage = await textCh.SendConfirmAsync(msgTxt).ConfigureAwait(false); } catch { } + try { playingMessage = await textCh.EmbedAsync(new EmbedBuilder().WithColor(NadekoBot.OkColor) + .WithAuthor(eab => eab.WithName("Playing Song").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithTitle($"{song.SongInfo.Title}") + .WithDescription($"Volume: {(int)(sender.Volume * 100)}%") + .WithFooter(ef => ef.WithText($"{song.PrettyProvider} | {song.QueuerName}")) + .Build()) + .ConfigureAwait(false); } catch { } } else { - try { playingMessage = await textCh.SendConfirmAsync(msgTxt).ConfigureAwait(false); } catch { } + //try { playingMessage = await textCh.SendConfirmAsync(msgTxt).ConfigureAwait(false); } catch { } + try { playingMessage = await textCh.EmbedAsync(new EmbedBuilder().WithColor(NadekoBot.OkColor) + .WithAuthor(eab => eab.WithName("Playing Song").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithTitle($"{song.SongInfo.Title}") + .WithDescription($"Volume: {(int)(sender.Volume * 100)}%") + .WithFooter(ef => ef.WithText($"{song.PrettyProvider} | {song.QueuerName}")) + .Build()) + .ConfigureAwait(false); } catch { } } } }; @@ -961,8 +1003,15 @@ namespace NadekoBot.Modules.Music { try { - var queuedMessage = await textCh.SendConfirmAsync($"🎵 Queued **{resolvedSong.SongInfo.Title}** at `#{musicPlayer.Playlist.Count + 1}`").ConfigureAwait(false); - var t = Task.Run(async () => + //var queuedMessage = await textCh.SendConfirmAsync($"🎵 Queued **{resolvedSong.SongInfo.Title}** at `#{musicPlayer.Playlist.Count + 1}`").ConfigureAwait(false); + var queuedMessage = await textCh.EmbedAsync(new EmbedBuilder().WithColor(NadekoBot.OkColor) + .WithAuthor(eab => eab.WithName("Queued Song").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithTitle($"{resolvedSong.SongInfo.Title}") + .WithDescription($"Queue #{musicPlayer.Playlist.Count + 1}") + .WithFooter(ef => ef.WithText($"{resolvedSong.PrettyProvider}")) + .Build()) + .ConfigureAwait(false); + var t = Task.Run(async () => { try { diff --git a/src/NadekoBot/Modules/Searches/Searches.cs b/src/NadekoBot/Modules/Searches/Searches.cs index a3f5eb0e..c7e5367a 100644 --- a/src/NadekoBot/Modules/Searches/Searches.cs +++ b/src/NadekoBot/Modules/Searches/Searches.cs @@ -221,7 +221,7 @@ namespace NadekoBot.Modules.Searches if (string.IsNullOrWhiteSpace(terms)) return; - await channel.SendConfirmAsync($"https://google.com/search?q={ WebUtility.UrlEncode(terms).Replace(' ', '+') }") + await channel.SendMessageAsync($"https://google.com/search?q={ WebUtility.UrlEncode(terms).Replace(' ', '+') }") .ConfigureAwait(false); } From d8811aad0acd22bf00d8160413333f1e5c0c46cb Mon Sep 17 00:00:00 2001 From: samvaio Date: Thu, 22 Dec 2016 05:32:05 +0530 Subject: [PATCH 3/4] animated destroy command replaced with message --- src/NadekoBot/Modules/Music/Music.cs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/NadekoBot/Modules/Music/Music.cs b/src/NadekoBot/Modules/Music/Music.cs index 6040c162..b3b27bc5 100644 --- a/src/NadekoBot/Modules/Music/Music.cs +++ b/src/NadekoBot/Modules/Music/Music.cs @@ -102,20 +102,8 @@ namespace NadekoBot.Modules.Music //public Task Destroy(IUserMessage umsg) { var channel = (ITextChannel)umsg.Channel; - var msg = - await channel.SendMessageAsync($"🔴 Initiating Self-Destruct Sequence!").ConfigureAwait(false); - await Task.Delay(2000).ConfigureAwait(false); - await msg.ModifyAsync(m => m.Content = "⚪️ Self-Destruct Sequence Initiated T Minus 4").ConfigureAwait(false); - await Task.Delay(1000).ConfigureAwait(false); - await msg.ModifyAsync(m => m.Content = "🔴 Self-Destruct Sequence Initiated T Minus 3").ConfigureAwait(false); - await Task.Delay(1000).ConfigureAwait(false); - await msg.ModifyAsync(m => m.Content = "⚪️ Self-Destruct Sequence Initiated T Minus 2").ConfigureAwait(false); - await Task.Delay(1000).ConfigureAwait(false); - await msg.ModifyAsync(m => m.Content = "🔴 Self-Destruct Sequence Initiated T Minus 1").ConfigureAwait(false); - await Task.Delay(2000).ConfigureAwait(false); - await msg.ModifyAsync(m => m.Content = "🌸 Nice Try! I am Indestructible.").ConfigureAwait(false); - - + await channel.SendErrorAsync("Command is temporarily disabled.").ConfigureAwait(false); + /*MusicPlayer musicPlayer; if (!MusicPlayers.TryGetValue(channel.Guild.Id, out musicPlayer)) return Task.CompletedTask; if (((IGuildUser)umsg.Author).VoiceChannel == musicPlayer.PlaybackVoiceChannel) From b5c50b22bae7ad013d93d818890158e48f57c9e7 Mon Sep 17 00:00:00 2001 From: samvaio Date: Thu, 22 Dec 2016 05:36:59 +0530 Subject: [PATCH 4/4] Embed icon url changed (thanks to Kwoth) --- src/NadekoBot/Modules/Music/Music.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/NadekoBot/Modules/Music/Music.cs b/src/NadekoBot/Modules/Music/Music.cs index b3b27bc5..0bd7144d 100644 --- a/src/NadekoBot/Modules/Music/Music.cs +++ b/src/NadekoBot/Modules/Music/Music.cs @@ -191,7 +191,7 @@ namespace NadekoBot.Modules.Music var number = 1 + startAt; var embed = new EmbedBuilder() - .WithAuthor(eab => eab.WithName($"Track List: Page {page}").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithAuthor(eab => eab.WithName($"Track List: Page {page}").WithIconUrl("http://i.imgur.com/nhKS3PT.png")) .WithDescription(string.Join("\n", musicPlayer.Playlist.Skip(startAt).Take(10).Select(v => $"`{number++}.` **[{v.SongInfo.Title.TrimTo(70)}]({v.SongInfo.Query})**\n\t\t*{v.PrettyCurrentTime()}* **|** *{v.PrettyProvider}* **|** *{v.QueuerName}*"))) .WithFooter(ef => ef.WithText($"{musicPlayer.Playlist.Count} tracks currently queued.")) .WithColor(NadekoBot.OkColor); @@ -241,7 +241,7 @@ namespace NadekoBot.Modules.Music var videoid = Regex.Match(currentSong.SongInfo.Query, "<=v=[a-zA-Z0-9-]+(?=&)|(?<=[0-9])[^&\n]+|(?<=v=)[^&\n]+"); var embed = new EmbedBuilder() - .WithAuthor(eab => eab.WithName("Now Playing").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithAuthor(eab => eab.WithName("Now Playing").WithIconUrl("http://i.imgur.com/nhKS3PT.png")) .WithTitle($"{currentSong.SongInfo.Title}") //.WithDescription($"{currentSong.PrettyCurrentTime()}") .WithFooter(ef => ef.WithText($"{currentSong.PrettyProvider} | {currentSong.QueuerName}")) @@ -512,7 +512,7 @@ namespace NadekoBot.Modules.Music musicPlayer.RemoveSongAt(num - 1); //await channel.SendConfirmAsync($"🎵 Track {song.PrettyName} at position `#{num}` has been **removed**.").ConfigureAwait(false); var embed = new EmbedBuilder() - .WithAuthor(eab => eab.WithName("Song Removed!").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithAuthor(eab => eab.WithName("Song Removed!").WithIconUrl("http://i.imgur.com/nhKS3PT.png")) .AddField(fb => fb.WithName("**Song Position**").WithValue($"#{num}").WithIsInline(true)) .AddField(fb => fb.WithName("**Song Name**").WithValue($"**[{song.SongInfo.Title.TrimTo(70)}]({song.SongInfo.Query})** `{song.PrettyProvider} | {song.QueuerName.TrimTo(15)}`").WithIsInline(true)) .WithColor(NadekoBot.ErrorColor); @@ -569,7 +569,7 @@ namespace NadekoBot.Modules.Music var embed = new EmbedBuilder() .WithTitle($"{s.SongInfo.Title.TrimTo(70)}") .WithUrl($"{s.SongInfo.Query}") - .WithAuthor(eab => eab.WithName("Song Moved").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithAuthor(eab => eab.WithName("Song Moved").WithIconUrl("http://i.imgur.com/nhKS3PT.png")) .AddField(fb => fb.WithName("**From Position**").WithValue($"#{n1}").WithIsInline(true)) .AddField(fb => fb.WithName("**To Position**").WithValue($"#{n2}").WithIsInline(true)) .WithColor(NadekoBot.OkColor); @@ -714,7 +714,7 @@ namespace NadekoBot.Modules.Music //" + string.Join("\n", playlists.Select(r => $"`#{r.Id}` - **{r.Name}** by __{r.Author}__ ({r.Songs.Count} songs)"))).ConfigureAwait(false); var embed = new EmbedBuilder() - .WithAuthor(eab => eab.WithName($"Page {num} of Saved Playlists").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithAuthor(eab => eab.WithName($"Page {num} of Saved Playlists").WithIconUrl("http://i.imgur.com/nhKS3PT.png")) .WithDescription(string.Join("\n", playlists.Select(r => $"`#{r.Id}` - **{r.Name}**\t by **`{r.Author}`**\t ({r.Songs.Count} songs)"))) .WithColor(NadekoBot.OkColor); await channel.EmbedAsync(embed.Build()).ConfigureAwait(false); @@ -879,7 +879,7 @@ namespace NadekoBot.Modules.Music await lastFinishedMessage.DeleteAsync().ConfigureAwait(false); //try { lastFinishedMessage = await textCh.SendConfirmAsync($"🎵 Finished {song.PrettyName}").ConfigureAwait(false); } catch { } try { lastFinishedMessage = await textCh.EmbedAsync(new EmbedBuilder().WithColor(NadekoBot.OkColor) - .WithAuthor(eab => eab.WithName("Finished Song").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithAuthor(eab => eab.WithName("Finished Song").WithIconUrl("http://i.imgur.com/nhKS3PT.png")) .WithTitle($"{song.SongInfo.Title}") .WithFooter(ef => ef.WithText($"{song.PrettyProvider} | {song.QueuerName}")) .Build()) @@ -888,7 +888,7 @@ namespace NadekoBot.Modules.Music else { try { lastFinishedMessage = await textCh.EmbedAsync(new EmbedBuilder().WithColor(NadekoBot.OkColor) - .WithAuthor(eab => eab.WithName("Finished Song").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithAuthor(eab => eab.WithName("Finished Song").WithIconUrl("http://i.imgur.com/nhKS3PT.png")) .WithTitle($"{song.SongInfo.Title}") .WithFooter(ef => ef.WithText($"{song.PrettyProvider} | {song.QueuerName}")) .Build()) @@ -916,7 +916,7 @@ namespace NadekoBot.Modules.Music await playingMessage.DeleteAsync().ConfigureAwait(false); //try { playingMessage = await textCh.SendConfirmAsync(msgTxt).ConfigureAwait(false); } catch { } try { playingMessage = await textCh.EmbedAsync(new EmbedBuilder().WithColor(NadekoBot.OkColor) - .WithAuthor(eab => eab.WithName("Playing Song").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithAuthor(eab => eab.WithName("Playing Song").WithIconUrl("http://i.imgur.com/nhKS3PT.png")) .WithTitle($"{song.SongInfo.Title}") .WithDescription($"Volume: {(int)(sender.Volume * 100)}%") .WithFooter(ef => ef.WithText($"{song.PrettyProvider} | {song.QueuerName}")) @@ -927,7 +927,7 @@ namespace NadekoBot.Modules.Music { //try { playingMessage = await textCh.SendConfirmAsync(msgTxt).ConfigureAwait(false); } catch { } try { playingMessage = await textCh.EmbedAsync(new EmbedBuilder().WithColor(NadekoBot.OkColor) - .WithAuthor(eab => eab.WithName("Playing Song").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithAuthor(eab => eab.WithName("Playing Song").WithIconUrl("http://i.imgur.com/nhKS3PT.png")) .WithTitle($"{song.SongInfo.Title}") .WithDescription($"Volume: {(int)(sender.Volume * 100)}%") .WithFooter(ef => ef.WithText($"{song.PrettyProvider} | {song.QueuerName}")) @@ -993,7 +993,7 @@ namespace NadekoBot.Modules.Music { //var queuedMessage = await textCh.SendConfirmAsync($"🎵 Queued **{resolvedSong.SongInfo.Title}** at `#{musicPlayer.Playlist.Count + 1}`").ConfigureAwait(false); var queuedMessage = await textCh.EmbedAsync(new EmbedBuilder().WithColor(NadekoBot.OkColor) - .WithAuthor(eab => eab.WithName("Queued Song").WithIconUrl("https://cdn.discordapp.com/attachments/155726317222887425/258605269972549642/music1.png")) + .WithAuthor(eab => eab.WithName("Queued Song").WithIconUrl("http://i.imgur.com/nhKS3PT.png")) .WithTitle($"{resolvedSong.SongInfo.Title}") .WithDescription($"Queue #{musicPlayer.Playlist.Count + 1}") .WithFooter(ef => ef.WithText($"{resolvedSong.PrettyProvider}"))