diff --git a/src/Discord.Net.Core/Entities/Interactions/Message Components/ComponentBuilder.cs b/src/Discord.Net.Core/Entities/Interactions/Message Components/ComponentBuilder.cs index 5dcf8f22c..be7f78304 100644 --- a/src/Discord.Net.Core/Entities/Interactions/Message Components/ComponentBuilder.cs +++ b/src/Discord.Net.Core/Entities/Interactions/Message Components/ComponentBuilder.cs @@ -367,8 +367,6 @@ namespace Discord if (value.Length < 1) throw new ArgumentException("Button label must be 1 character or more!", paramName: nameof(Label)); } - else - throw new ArgumentException("Button label must not be null or empty!", paramName: nameof(Label)); _label = value; } @@ -391,8 +389,6 @@ namespace Discord if (value.Length < 1) throw new ArgumentException("Custom Id must be 1 character or more!", paramName: nameof(CustomId)); } - else - throw new ArgumentException("Custom Id must not be null or empty!", paramName: nameof(CustomId)); _customId = value; } } @@ -644,8 +640,6 @@ namespace Discord if (value.Length < 1) throw new ArgumentException("Custom Id must be 1 character or more!", paramName: nameof(CustomId)); } - else - throw new ArgumentException("Custom Id must not be null or empty!", paramName: nameof(CustomId)); _customId = value; } } @@ -667,8 +661,6 @@ namespace Discord if (value.Length < 1) throw new ArgumentException("The placeholder must be 1 character or more!", paramName: nameof(Placeholder)); } - else - throw new ArgumentException("The placeholder must not be null or empty!", paramName: nameof(Placeholder)); _placeholder = value; } @@ -938,8 +930,6 @@ namespace Discord if (value.Length < 1) throw new ArgumentException("Select option label must be 1 character or more!", paramName: nameof(Label)); } - else - throw new ArgumentException("Select option label must not be null or empty!", paramName: nameof(Label)); _label = value; } @@ -973,7 +963,7 @@ namespace Discord /// Gets or sets this menu options description. /// /// length exceeds . - /// length subceeds 1. + /// length subceeds 1. public string Description { get => _description; @@ -986,8 +976,6 @@ namespace Discord if (value.Length < 1) throw new ArgumentException("The description must be 1 character or more!", paramName: nameof(Label)); } - else - throw new ArgumentException("The description must not be null or empty!", paramName: nameof(Label)); _description = value; } diff --git a/src/Discord.Net.Core/Extensions/MessageExtensions.cs b/src/Discord.Net.Core/Extensions/MessageExtensions.cs index b043d7b77..6d068d160 100644 --- a/src/Discord.Net.Core/Extensions/MessageExtensions.cs +++ b/src/Discord.Net.Core/Extensions/MessageExtensions.cs @@ -87,9 +87,9 @@ namespace Discord /// A task that represents an asynchronous send operation for delivering the message. The task result /// contains the sent message. /// - public static async Task ReplyAsync(this IUserMessage msg, string text = null, bool isTTS = false, Embed embed = null, AllowedMentions allowedMentions = null, RequestOptions options = null) + public static async Task ReplyAsync(this IUserMessage msg, string text = null, bool isTTS = false, Embed embed = null, AllowedMentions allowedMentions = null, RequestOptions options = null, MessageComponent components = null, ISticker[] stickers = null) { - return await msg.Channel.SendMessageAsync(text, isTTS, embed, options, allowedMentions, new MessageReference(messageId: msg.Id)).ConfigureAwait(false); + return await msg.Channel.SendMessageAsync(text, isTTS, embed, options, allowedMentions, new MessageReference(messageId: msg.Id), components, stickers).ConfigureAwait(false); } } }