From 342f3e1579c49ba7275aef8181a3d551ac9f1812 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Mon, 26 Dec 2016 06:16:34 +0100 Subject: [PATCH] .lcr all now shows ids and text of the reaction --- src/NadekoBot/Modules/CustomReactions/CustomReactions.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs b/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs index d68aeab6..f2475af5 100644 --- a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs +++ b/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs @@ -172,7 +172,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 => new { id = y.Response, text = y.Response }).ToList() }) .ToJson() .ToStream() .ConfigureAwait(false); @@ -293,7 +293,7 @@ namespace NadekoBot.Modules.CustomReactions { await imsg.Channel.SendErrorAsync("No stats for that trigger found, no action taken.").ConfigureAwait(false); } - } + } } [NadekoCommand, Usage, Description, Aliases] @@ -302,7 +302,7 @@ namespace NadekoBot.Modules.CustomReactions if (page < 1) return; await imsg.Channel.EmbedAsync(ReactionStats.OrderByDescending(x => x.Value) - .Skip((page - 1)*9) + .Skip((page - 1) * 9) .Take(9) .Aggregate(new EmbedBuilder().WithOkColor().WithTitle($"Custom Reaction stats page #{page}"), (agg, cur) => agg.AddField(efb => efb.WithName(cur.Key).WithValue(cur.Value.ToString()).WithIsInline(true))) @@ -310,4 +310,4 @@ namespace NadekoBot.Modules.CustomReactions .ConfigureAwait(false); } } -} +} \ No newline at end of file