Class WebhookMessageProperties
public class WebhookMessageProperties : IHttpSerializable, IMessageProperties
- Inheritance
-
WebhookMessageProperties
- Implements
- Inherited Members
Constructors
WebhookMessageProperties()
public WebhookMessageProperties()
Properties
AllowedMentions
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("allowed_mentions")]
public AllowedMentionsProperties? AllowedMentions { get; set; }
Property Value
AppliedTags
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("applied_tags")]
public IEnumerable<ulong>? AppliedTags { get; set; }
Property Value
Attachments
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonConverter(typeof(AttachmentPropertiesIEnumerableConverter))]
[JsonPropertyName("attachments")]
public IEnumerable<AttachmentProperties>? Attachments { get; set; }
Property Value
AvatarUrl
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("avatar_url")]
public string? AvatarUrl { get; set; }
Property Value
Components
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("components")]
public IEnumerable<IMessageComponentProperties>? Components { get; set; }
Property Value
Content
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("content")]
public string? Content { get; set; }
Property Value
Embeds
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("embeds")]
public IEnumerable<EmbedProperties>? Embeds { get; set; }
Property Value
Flags
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("flags")]
public MessageFlags? Flags { get; set; }
Property Value
Poll
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("poll")]
public MessagePollProperties? Poll { get; set; }
Property Value
ThreadName
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("thread_name")]
public string? ThreadName { get; set; }
Property Value
Tts
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("tts")]
public bool Tts { get; set; }
Property Value
Username
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("username")]
public string? Username { get; set; }
Property Value
Methods
AddAppliedTags(params IEnumerable<ulong>)
public WebhookMessageProperties AddAppliedTags(params IEnumerable<ulong> appliedTags)
Parameters
appliedTagsIEnumerable<ulong>
Returns
AddAttachments(params IEnumerable<AttachmentProperties>)
public WebhookMessageProperties AddAttachments(params IEnumerable<AttachmentProperties> attachments)
Parameters
attachmentsIEnumerable<AttachmentProperties>
Returns
AddComponents(params IEnumerable<IMessageComponentProperties>)
public WebhookMessageProperties AddComponents(params IEnumerable<IMessageComponentProperties> components)
Parameters
componentsIEnumerable<IMessageComponentProperties>
Returns
AddEmbeds(params IEnumerable<EmbedProperties>)
public WebhookMessageProperties AddEmbeds(params IEnumerable<EmbedProperties> embeds)
Parameters
embedsIEnumerable<EmbedProperties>
Returns
Serialize()
Serializes the object or its part into HttpContent.
public HttpContent Serialize()
Returns
WithAllowedMentions(AllowedMentionsProperties?)
public WebhookMessageProperties WithAllowedMentions(AllowedMentionsProperties? allowedMentions)
Parameters
allowedMentionsAllowedMentionsProperties
Returns
WithAppliedTags(IEnumerable<ulong>?)
public WebhookMessageProperties WithAppliedTags(IEnumerable<ulong>? appliedTags)
Parameters
appliedTagsIEnumerable<ulong>
Returns
WithAttachments(IEnumerable<AttachmentProperties>?)
public WebhookMessageProperties WithAttachments(IEnumerable<AttachmentProperties>? attachments)
Parameters
attachmentsIEnumerable<AttachmentProperties>
Returns
WithAvatarUrl(string?)
public WebhookMessageProperties WithAvatarUrl(string? avatarUrl)
Parameters
avatarUrlstring
Returns
WithComponents(IEnumerable<IMessageComponentProperties>?)
public WebhookMessageProperties WithComponents(IEnumerable<IMessageComponentProperties>? components)
Parameters
componentsIEnumerable<IMessageComponentProperties>
Returns
WithContent(string?)
public WebhookMessageProperties WithContent(string? content)
Parameters
contentstring
Returns
WithEmbeds(IEnumerable<EmbedProperties>?)
public WebhookMessageProperties WithEmbeds(IEnumerable<EmbedProperties>? embeds)
Parameters
embedsIEnumerable<EmbedProperties>
Returns
WithFlags(MessageFlags?)
public WebhookMessageProperties WithFlags(MessageFlags? flags)
Parameters
flagsMessageFlags?
Returns
WithPoll(MessagePollProperties?)
public WebhookMessageProperties WithPoll(MessagePollProperties? poll)
Parameters
Returns
WithThreadName(string?)
public WebhookMessageProperties WithThreadName(string? threadName)
Parameters
threadNamestring
Returns
WithTts(bool)
public WebhookMessageProperties WithTts(bool tts = true)
Parameters
ttsbool
Returns
WithUsername(string?)
public WebhookMessageProperties WithUsername(string? username)
Parameters
usernamestring
Returns
Operators
implicit operator WebhookMessageProperties(string)
public static implicit operator WebhookMessageProperties(string content)
Parameters
contentstring