| @@ -1198,6 +1198,7 @@ namespace Discord | |||||
| public class TextInputBuilder | public class TextInputBuilder | ||||
| { | { | ||||
| public const int MaxPlaceholderLength = 100; | |||||
| public const int LargestMaxLength = 4000; | public const int LargestMaxLength = 4000; | ||||
| /// <summary> | /// <summary> | ||||
| @@ -1229,13 +1230,13 @@ namespace Discord | |||||
| /// <summary> | /// <summary> | ||||
| /// Gets or sets the placeholder of the current text input. | /// Gets or sets the placeholder of the current text input. | ||||
| /// </summary> | /// </summary> | ||||
| /// <exception cref="ArgumentException"><see cref="Placeholder"/> is longer than 100 characters</exception> | |||||
| /// <exception cref="ArgumentException"><see cref="Placeholder"/> is longer than <see cref="MaxPlaceholderLength"/> characters</exception> | |||||
| public string Placeholder | public string Placeholder | ||||
| { | { | ||||
| get => _placeholder; | get => _placeholder; | ||||
| set => _placeholder = (value?.Length ?? 0) <= 100 | |||||
| set => _placeholder = (value?.Length ?? 0) <= MaxPlaceholderLength | |||||
| ? value | ? value | ||||
| : throw new ArgumentException("Placeholder cannot have more than 100 characters."); | |||||
| : throw new ArgumentException($"Placeholder cannot have more than {MaxPlaceholderLength} characters."); | |||||
| } | } | ||||
| /// <summary> | /// <summary> | ||||