Restoring the option to send a single embed in interaction responses. (#72)
* Error handling on URL additions in embeds and components.
* Wording on exception comment
* Wording on exceptions
* changed IsWellFormatted to validating urls start with protocol. May not keep all url validation, may just keep image-based url validation as those definitely only require http/s.
* Helper utility made for url validation
* Add embed for single embed to Respond/FollowupAsync
* xml
* Removed trailing spaces. Clarified params in SocketInteractions.
Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
/// <param name="text">The text of the message to be sent.</param>
@@ -106,10 +106,11 @@ namespace Discord.WebSocket
/// <param name="allowedMentions">The allowed mentions for this response.</param>
/// <param name="options">The request options for this response.</param>
/// <param name="component">A <see cref="MessageComponent"/> to be sent with this response</param>
/// <param name="embed">A single embed to send with this response. If this is passed alongside an array of embeds, the single embed will be ignored.</param>
/// <exception cref="ArgumentOutOfRangeException">Message content is too long, length must be less or equal to <see cref="DiscordConfig.MaxMessageSize"/>.</exception>
/// <exception cref="InvalidOperationException">The parameters provided were invalid or the token was invalid.</exception>
public abstract Task RespondAsync(string text = null, Embed[] embeds = null, bool isTTS = false,
/// Sends a followup message for this interaction.
@@ -121,11 +122,12 @@ namespace Discord.WebSocket
/// <param name="allowedMentions">The allowed mentions for this response.</param>
/// <param name="options">The request options for this response.</param>
/// <param name="component">A <see cref="MessageComponent"/> to be sent with this response</param>
/// <param name="embed">A single embed to send with this response. If this is passed alongside an array of embeds, the single embed will be ignored.</param>
/// <returns>
/// The sent message.
/// </returns>
public abstract Task<RestFollowupMessage> FollowupAsync(string text = null, Embed[] embeds = null, bool isTTS = false, bool ephemeral = false,