From 309f06370b73c6c656adbebe9e21e45f341c6bc9 Mon Sep 17 00:00:00 2001 From: runebaas Date: Thu, 19 Sep 2019 13:42:48 +0200 Subject: [PATCH] Cut urban dictionary word definitions at the 1800 character mark --- .../Commands/Integrations/UbranDictionary/UrbanDictionary.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Geekbot.net/Commands/Integrations/UbranDictionary/UrbanDictionary.cs b/Geekbot.net/Commands/Integrations/UbranDictionary/UrbanDictionary.cs index 4f29f10..932425b 100644 --- a/Geekbot.net/Commands/Integrations/UbranDictionary/UrbanDictionary.cs +++ b/Geekbot.net/Commands/Integrations/UbranDictionary/UrbanDictionary.cs @@ -48,7 +48,7 @@ namespace Geekbot.net.Commands.Integrations.UbranDictionary Url = definition.Permalink }); eb.WithColor(new Color(239, 255, 0)); - if (!string.IsNullOrEmpty(definition.Definition)) eb.Description = definition.Definition; + if (!string.IsNullOrEmpty(definition.Definition)) eb.Description = definition.Definition.Substring(0, 1800); if (!string.IsNullOrEmpty(definition.Example)) eb.AddField("Example", definition.Example ?? "(no example given...)"); if (!string.IsNullOrEmpty(definition.ThumbsUp)) eb.AddInlineField("Upvotes", definition.ThumbsUp); if (!string.IsNullOrEmpty(definition.ThumbsDown)) eb.AddInlineField("Downvotes", definition.ThumbsDown);