fix: Change embed description max length to 4096 (#1886)

* Update max embed description length (fixes #1881)

* Update unit tests for new embed builder length
This commit is contained in:
th0mk
2021-07-10 16:40:52 +02:00
committed by GitHub
parent 22bb1b02dd
commit 8349cd7e1e
2 changed files with 3 additions and 3 deletions

View File

@@ -27,7 +27,7 @@ namespace Discord
/// <summary> /// <summary>
/// Returns the maximum length of description allowed by Discord. /// Returns the maximum length of description allowed by Discord.
/// </summary> /// </summary>
public const int MaxDescriptionLength = 2048; public const int MaxDescriptionLength = 4096;
/// <summary> /// <summary>
/// Returns the maximum length of total characters allowed by Discord. /// Returns the maximum length of total characters allowed by Discord.
/// </summary> /// </summary>

View File

@@ -126,7 +126,7 @@ namespace Discord
{ {
IEnumerable<string> GetInvalid() IEnumerable<string> GetInvalid()
{ {
yield return new string('a', 2049); yield return new string('a', 4097);
} }
foreach (var description in GetInvalid()) foreach (var description in GetInvalid())
{ {
@@ -149,7 +149,7 @@ namespace Discord
{ {
yield return string.Empty; yield return string.Empty;
yield return null; yield return null;
yield return new string('a', 2048); yield return new string('a', 4096);
} }
foreach (var description in GetValid()) foreach (var description in GetValid())
{ {