Table of Contents

Class MessageOptions

Namespace
NetCord.Rest
Assembly
NetCord.dll
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

AllowedMentionsProperties

Attachments

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(AttachmentPropertiesIEnumerableConverter))]
[JsonPropertyName("attachments")]
public IEnumerable<AttachmentProperties>? Attachments { get; set; }

Property Value

IEnumerable<AttachmentProperties>

Components

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("components")]
public IEnumerable<ComponentProperties>? Components { get; set; }

Property Value

IEnumerable<ComponentProperties>

Content

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("content")]
public string? Content { get; set; }

Property Value

string

Embeds

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("embeds")]
public IEnumerable<EmbedProperties>? Embeds { get; set; }

Property Value

IEnumerable<EmbedProperties>

Flags

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("flags")]
public MessageFlags? Flags { get; set; }

Property Value

MessageFlags?

Methods

AddAttachments(params AttachmentProperties[])

public MessageOptions AddAttachments(params AttachmentProperties[] attachments)

Parameters

attachments AttachmentProperties[]

Returns

MessageOptions

AddAttachments(IEnumerable<AttachmentProperties>)

public MessageOptions AddAttachments(IEnumerable<AttachmentProperties> attachments)

Parameters

attachments IEnumerable<AttachmentProperties>

Returns

MessageOptions

AddComponents(params ComponentProperties[])

public MessageOptions AddComponents(params ComponentProperties[] components)

Parameters

components ComponentProperties[]

Returns

MessageOptions

AddComponents(IEnumerable<ComponentProperties>)

public MessageOptions AddComponents(IEnumerable<ComponentProperties> components)

Parameters

components IEnumerable<ComponentProperties>

Returns

MessageOptions

AddEmbeds(params EmbedProperties[])

public MessageOptions AddEmbeds(params EmbedProperties[] embeds)

Parameters

embeds EmbedProperties[]

Returns

MessageOptions

AddEmbeds(IEnumerable<EmbedProperties>)

public MessageOptions AddEmbeds(IEnumerable<EmbedProperties> embeds)

Parameters

embeds IEnumerable<EmbedProperties>

Returns

MessageOptions

Serialize()

Serializes the object or its part into HttpContent.

public HttpContent Serialize()

Returns

HttpContent

WithAllowedMentions(AllowedMentionsProperties?)

public MessageOptions WithAllowedMentions(AllowedMentionsProperties? allowedMentions)

Parameters

allowedMentions AllowedMentionsProperties

Returns

MessageOptions

WithAttachments(IEnumerable<AttachmentProperties>?)

public MessageOptions WithAttachments(IEnumerable<AttachmentProperties>? attachments)

Parameters

attachments IEnumerable<AttachmentProperties>

Returns

MessageOptions

WithComponents(IEnumerable<ComponentProperties>?)

public MessageOptions WithComponents(IEnumerable<ComponentProperties>? components)

Parameters

components IEnumerable<ComponentProperties>

Returns

MessageOptions

WithContent(string?)

public MessageOptions WithContent(string? content)

Parameters

content string

Returns

MessageOptions

WithEmbeds(IEnumerable<EmbedProperties>?)

public MessageOptions WithEmbeds(IEnumerable<EmbedProperties>? embeds)

Parameters

embeds IEnumerable<EmbedProperties>

Returns

MessageOptions

WithFlags(MessageFlags?)

public MessageOptions WithFlags(MessageFlags? flags)

Parameters

flags MessageFlags?

Returns

MessageOptions