diff --git a/src/NadekoBot/DataStructures/CREmbed.cs b/src/NadekoBot/DataStructures/CREmbed.cs index 14426310..4fdf78e3 100644 --- a/src/NadekoBot/DataStructures/CREmbed.cs +++ b/src/NadekoBot/DataStructures/CREmbed.cs @@ -1,4 +1,5 @@ using Discord; +using NadekoBot.Extensions; using Newtonsoft.Json; using NLog; using System; @@ -71,7 +72,13 @@ namespace NadekoBot.DataStructures try { var crembed = JsonConvert.DeserializeObject(input); - + + if(crembed.Fields != null && crembed.Fields.Length > 0) + foreach (var f in crembed.Fields) + { + f.Name = f.Name.TrimTo(256); + f.Value = f.Value.TrimTo(1024); + } if (!crembed.IsValid) return false; diff --git a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs b/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs index ae033cad..dd6b162d 100644 --- a/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs +++ b/src/NadekoBot/Modules/CustomReactions/CustomReactions.cs @@ -79,7 +79,7 @@ namespace NadekoBot.Modules.CustomReactions .WithTitle(GetText("new_cust_react")) .WithDescription($"#{cr.Id}") .AddField(efb => efb.WithName(GetText("trigger")).WithValue(key)) - .AddField(efb => efb.WithName(GetText("response")).WithValue(message)) + .AddField(efb => efb.WithName(GetText("response")).WithValue(message.Length > 1024 ? GetText("redacted_too_long") : message)) ).ConfigureAwait(false); } diff --git a/src/NadekoBot/Modules/Searches/Commands/LoLCommands.cs b/src/NadekoBot/Modules/Searches/Commands/LoLCommands.cs index bf15651b..91282423 100644 --- a/src/NadekoBot/Modules/Searches/Commands/LoLCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/LoLCommands.cs @@ -33,7 +33,7 @@ namespace NadekoBot.Modules.Searches [NadekoCommand, Usage, Description, Aliases] public async Task Lolban() { - const int showCount = 8; + //const int showCount = 8; //http://api.champion.gg/stats/champs/mostBanned?api_key=YOUR_API_TOKEN&page=1&limit=2 try { diff --git a/src/NadekoBot/_strings/ResponseStrings.en-US.json b/src/NadekoBot/_strings/ResponseStrings.en-US.json index 06d62f39..7c330d6d 100644 --- a/src/NadekoBot/_strings/ResponseStrings.en-US.json +++ b/src/NadekoBot/_strings/ResponseStrings.en-US.json @@ -35,6 +35,7 @@ "customreactions_stats_cleared": "Stats cleared for {0} custom reaction.", "customreactions_stats_not_found": "No stats for that trigger found, no action taken.", "customreactions_trigger": "Trigger", + "customreactions_redacted_too_long": "Redecated because it's too long.", "nsfw_autohentai_stopped": "Autohentai stopped.", "nsfw_not_found": "No results found.", "pokemon_already_fainted": "{0} has already fainted.",