feature: Webhook message edit & delete functionality (#1753)

* feature: Webhook message edit & delete functionality

* PR fixes: Rename Edit* to Modify*; Add more detailed docstrings; Small validation fixes

* Fix spacing around docstrings

* Make ModifyWebhookMessageParams.Content Optional<string>

* Change the Webhook message edit functionality to use a object delegate method instead providing the all parameters

Co-authored-by: Desmont <desmont@users.noreply.github.com>
This commit is contained in:
Desmont
2021-04-28 15:15:16 +02:00
committed by GitHub
parent 91a906397a
commit f67cd8ea55
5 changed files with 161 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
using System.Collections.Generic;
namespace Discord.Webhook
{
/// <summary>
/// Properties that are used to modify an Webhook message with the specified changes.
/// </summary>
public class WebhookMessageProperties
{
/// <summary>
/// Gets or sets the content of the message.
/// </summary>
/// <remarks>
/// This must be less than the constant defined by <see cref="DiscordConfig.MaxMessageSize"/>.
/// </remarks>
public Optional<string> Content { get; set; }
/// <summary>
/// Gets or sets the embed array that the message should display.
/// </summary>
public Optional<IEnumerable<Embed>> Embeds { get; set; }
/// <summary>
/// Gets or sets the allowed mentions of the message.
/// </summary>
public Optional<AllowedMentions> AllowedMentions { get; set; }
}
}