From 5583780fcb31e79c90b4875d003a2316fb5bed56 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Thu, 1 Dec 2016 19:59:17 +0100 Subject: [PATCH 1/2] Added actual responses to .lcr all, not count --- src/NadekoBot/Modules/CustomReactions/CustomReactions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs b/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs index e273d3d5..baf0041a 100644 --- a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs +++ b/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs @@ -159,7 +159,7 @@ namespace NadekoBot.Modules.CustomReactions { var txtStream = await customReactions.GroupBy(cr => cr.Trigger) .OrderBy(cr => cr.Key) - .Select(cr => new { Trigger = cr.Key, Responses = cr.Count() }) + .Select(cr => new { Trigger = cr.Key, Responses = cr.Select(y=>y.Response).ToList() }) .ToJson() .ToStream() .ConfigureAwait(false); @@ -173,7 +173,7 @@ namespace NadekoBot.Modules.CustomReactions [NadekoCommand, Usage, Description, Aliases] public async Task ListCustReactG(IUserMessage imsg, int page = 1) { - var channel = (ITextChannel)imsg.Channel; + var channel = imsg.Channel as ITextChannel; if (page < 1 || page > 10000) return; ConcurrentHashSet customReactions; From 2c2485c8bd05f347c13e59265c0dddd0cae4ed66 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Thu, 1 Dec 2016 23:19:19 +0100 Subject: [PATCH 2/2] fixed ~safebooru image link --- src/NadekoBot/Modules/CustomReactions/CustomReactions.cs | 2 +- src/NadekoBot/Modules/Searches/Searches.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs b/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs index baf0041a..32614b05 100644 --- a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs +++ b/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs @@ -159,7 +159,7 @@ namespace NadekoBot.Modules.CustomReactions { var txtStream = await customReactions.GroupBy(cr => cr.Trigger) .OrderBy(cr => cr.Key) - .Select(cr => new { Trigger = cr.Key, Responses = cr.Select(y=>y.Response).ToList() }) + .Select(cr => new { Trigger = cr.Key, Responses = cr.Select(y => y.Response).ToList() }) .ToJson() .ToStream() .ConfigureAwait(false); diff --git a/src/NadekoBot/Modules/Searches/Searches.cs b/src/NadekoBot/Modules/Searches/Searches.cs index dd5e7808..3154e9aa 100644 --- a/src/NadekoBot/Modules/Searches/Searches.cs +++ b/src/NadekoBot/Modules/Searches/Searches.cs @@ -535,7 +535,7 @@ namespace NadekoBot.Modules.Searches if (matches.Count == 0) return null; var match = matches[rng.Next(0, matches.Count)]; - return matches[rng.Next(0, matches.Count)].Groups["url"].Value; + return "http:" + matches[rng.Next(0, matches.Count)].Groups["url"].Value; } }