no fun for ya all (#2835)
This commit is contained in:
@@ -1363,6 +1363,16 @@ namespace Discord
|
||||
/// <returns>The newly built <see cref="SelectMenuOption"/>.</returns>
|
||||
public SelectMenuOption Build()
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Label))
|
||||
throw new ArgumentNullException(nameof(Label), "Option must have a label.");
|
||||
|
||||
Preconditions.AtMost(Label.Length, MaxSelectLabelLength, nameof(Label), $"Label length must be less or equal to {MaxSelectLabelLength}.");
|
||||
|
||||
if (string.IsNullOrWhiteSpace(Value))
|
||||
throw new ArgumentNullException(nameof(Value), "Option must have a value.");
|
||||
|
||||
Preconditions.AtMost(Value.Length, MaxSelectValueLength, nameof(Value), $"Value length must be less or equal to {MaxSelectValueLength}.");
|
||||
|
||||
return new SelectMenuOption(Label, Value, Description, Emote, IsDefault);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user