Class MessageOptions
public class MessageOptions : IHttpSerializable
- Inheritance
-
MessageOptions
- Implements
- Inherited Members
Properties
AllowedMentions
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("allowed_mentions")]
public AllowedMentionsProperties? AllowedMentions { get; set; }
Property Value
Attachments
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(AttachmentPropertiesIEnumerableConverter))]
[JsonPropertyName("attachments")]
public IEnumerable<AttachmentProperties>? Attachments { get; set; }
Property Value
Components
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("components")]
public IEnumerable<ComponentProperties>? Components { get; set; }
Property Value
Content
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("content")]
public string? Content { get; set; }
Property Value
Embeds
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("embeds")]
public IEnumerable<EmbedProperties>? Embeds { get; set; }
Property Value
Flags
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("flags")]
public MessageFlags? Flags { get; set; }
Property Value
Methods
AddAttachments(params AttachmentProperties[])
public MessageOptions AddAttachments(params AttachmentProperties[] attachments)
Parameters
attachments
AttachmentProperties[]
Returns
AddAttachments(IEnumerable<AttachmentProperties>)
public MessageOptions AddAttachments(IEnumerable<AttachmentProperties> attachments)
Parameters
attachments
IEnumerable<AttachmentProperties>
Returns
AddComponents(params ComponentProperties[])
public MessageOptions AddComponents(params ComponentProperties[] components)
Parameters
components
ComponentProperties[]
Returns
AddComponents(IEnumerable<ComponentProperties>)
public MessageOptions AddComponents(IEnumerable<ComponentProperties> components)
Parameters
components
IEnumerable<ComponentProperties>
Returns
AddEmbeds(params EmbedProperties[])
public MessageOptions AddEmbeds(params EmbedProperties[] embeds)
Parameters
embeds
EmbedProperties[]
Returns
AddEmbeds(IEnumerable<EmbedProperties>)
public MessageOptions AddEmbeds(IEnumerable<EmbedProperties> embeds)
Parameters
embeds
IEnumerable<EmbedProperties>
Returns
Serialize()
Serializes the object or its part into HttpContent.
public HttpContent Serialize()
Returns
WithAllowedMentions(AllowedMentionsProperties?)
public MessageOptions WithAllowedMentions(AllowedMentionsProperties? allowedMentions)
Parameters
allowedMentions
AllowedMentionsProperties
Returns
WithAttachments(IEnumerable<AttachmentProperties>?)
public MessageOptions WithAttachments(IEnumerable<AttachmentProperties>? attachments)
Parameters
attachments
IEnumerable<AttachmentProperties>
Returns
WithComponents(IEnumerable<ComponentProperties>?)
public MessageOptions WithComponents(IEnumerable<ComponentProperties>? components)
Parameters
components
IEnumerable<ComponentProperties>
Returns
WithContent(string?)
public MessageOptions WithContent(string? content)
Parameters
content
string
Returns
WithEmbeds(IEnumerable<EmbedProperties>?)
public MessageOptions WithEmbeds(IEnumerable<EmbedProperties>? embeds)
Parameters
embeds
IEnumerable<EmbedProperties>
Returns
WithFlags(MessageFlags?)
public MessageOptions WithFlags(MessageFlags? flags)
Parameters
flags
MessageFlags?