Cut urban dictionary word definitions at the 1800 character mark

This commit is contained in:
runebaas 2019-09-19 13:42:48 +02:00
parent f1387f824e
commit 309f06370b
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6

View file

@ -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);