This commit is contained in:
Kwoth 2017-02-17 14:43:32 +01:00
parent 33bc565571
commit 9f69532d7b
2 changed files with 6 additions and 6 deletions

View File

@ -77,10 +77,10 @@ namespace NadekoBot.Modules.Music.Classes
public IVoiceChannel PlaybackVoiceChannel { get; private set; } public IVoiceChannel PlaybackVoiceChannel { get; private set; }
public ITextChannel OutputTextChannel { get; set; } public ITextChannel OutputTextChannel { get; set; }
private bool destroyed { get; set; } = false; private bool destroyed { get; set; }
public bool RepeatSong { get; private set; } = false; public bool RepeatSong { get; private set; }
public bool RepeatPlaylist { get; private set; } = false; public bool RepeatPlaylist { get; private set; }
public bool Autoplay { get; set; } = false; public bool Autoplay { get; set; }
public uint MaxQueueSize { get; set; } = 0; public uint MaxQueueSize { get; set; } = 0;
private ConcurrentQueue<Action> actionQueue { get; } = new ConcurrentQueue<Action>(); private ConcurrentQueue<Action> actionQueue { get; } = new ConcurrentQueue<Action>();

View File

@ -273,7 +273,7 @@ namespace NadekoBot.Modules.Searches
var results = elems.Select<IElement, GoogleSearchResult?>(elem => var results = elems.Select<IElement, GoogleSearchResult?>(elem =>
{ {
var aTag = (elem.Children.FirstOrDefault().Children.FirstOrDefault() as IHtmlAnchorElement); // <h3> -> <a> var aTag = (elem.Children.FirstOrDefault()?.Children.FirstOrDefault() as IHtmlAnchorElement); // <h3> -> <a>
var href = aTag?.Href; var href = aTag?.Href;
var name = aTag?.TextContent; var name = aTag?.TextContent;
if (href == null || name == null) if (href == null || name == null)
@ -292,7 +292,7 @@ namespace NadekoBot.Modules.Searches
.WithAuthor(eab => eab.WithName("Search For: " + terms.TrimTo(50)) .WithAuthor(eab => eab.WithName("Search For: " + terms.TrimTo(50))
.WithUrl(fullQueryLink) .WithUrl(fullQueryLink)
.WithIconUrl("http://i.imgur.com/G46fm8J.png")) .WithIconUrl("http://i.imgur.com/G46fm8J.png"))
.WithTitle(Context.User.Mention) .WithTitle(Context.User.ToString())
.WithFooter(efb => efb.WithText(totalResults)); .WithFooter(efb => efb.WithText(totalResults));
var desc = await Task.WhenAll(results.Select(async res => var desc = await Task.WhenAll(results.Select(async res =>