Table of Contents

Class MessageProperties

Namespace
NetCord.Rest
Assembly
NetCord.dll
public class MessageProperties : IHttpSerializable, IMessageProperties
Inheritance
MessageProperties
Implements
Inherited Members

Constructors

MessageProperties()

public MessageProperties()

Properties

AllowedMentions

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("allowed_mentions")]
public AllowedMentionsProperties? AllowedMentions { get; set; }

Property Value

AllowedMentionsProperties

Attachments

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

Property Value

IEnumerable<AttachmentProperties>

Components

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

Property Value

IEnumerable<ComponentProperties>

Content

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

Property Value

string

Embeds

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

Property Value

IEnumerable<EmbedProperties>

Flags

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

Property Value

MessageFlags?

MessageReference

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("message_reference")]
public MessageReferenceProperties? MessageReference { get; set; }

Property Value

MessageReferenceProperties

Nonce

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("nonce")]
public NonceProperties? Nonce { get; set; }

Property Value

NonceProperties

Poll

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("poll")]
public MessagePollProperties? Poll { get; set; }

Property Value

MessagePollProperties

StickerIds

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("sticker_ids")]
public IEnumerable<ulong>? StickerIds { get; set; }

Property Value

IEnumerable<ulong>

Tts

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("tts")]
public bool Tts { get; set; }

Property Value

bool

Methods

AddAttachments(params AttachmentProperties[])

public MessageProperties AddAttachments(params AttachmentProperties[] attachments)

Parameters

attachments AttachmentProperties[]

Returns

MessageProperties

AddAttachments(IEnumerable<AttachmentProperties>)

public MessageProperties AddAttachments(IEnumerable<AttachmentProperties> attachments)

Parameters

attachments IEnumerable<AttachmentProperties>

Returns

MessageProperties

AddComponents(params ComponentProperties[])

public MessageProperties AddComponents(params ComponentProperties[] components)

Parameters

components ComponentProperties[]

Returns

MessageProperties

AddComponents(IEnumerable<ComponentProperties>)

public MessageProperties AddComponents(IEnumerable<ComponentProperties> components)

Parameters

components IEnumerable<ComponentProperties>

Returns

MessageProperties

AddEmbeds(params EmbedProperties[])

public MessageProperties AddEmbeds(params EmbedProperties[] embeds)

Parameters

embeds EmbedProperties[]

Returns

MessageProperties

AddEmbeds(IEnumerable<EmbedProperties>)

public MessageProperties AddEmbeds(IEnumerable<EmbedProperties> embeds)

Parameters

embeds IEnumerable<EmbedProperties>

Returns

MessageProperties

AddStickerIds(IEnumerable<ulong>)

public MessageProperties AddStickerIds(IEnumerable<ulong> stickerIds)

Parameters

stickerIds IEnumerable<ulong>

Returns

MessageProperties

AddStickerIds(params ulong[])

public MessageProperties AddStickerIds(params ulong[] stickerIds)

Parameters

stickerIds ulong[]

Returns

MessageProperties

Serialize()

Serializes the object or its part into HttpContent.

public HttpContent Serialize()

Returns

HttpContent

WithAllowedMentions(AllowedMentionsProperties?)

public MessageProperties WithAllowedMentions(AllowedMentionsProperties? allowedMentions)

Parameters

allowedMentions AllowedMentionsProperties

Returns

MessageProperties

WithAttachments(IEnumerable<AttachmentProperties>?)

public MessageProperties WithAttachments(IEnumerable<AttachmentProperties>? attachments)

Parameters

attachments IEnumerable<AttachmentProperties>

Returns

MessageProperties

WithComponents(IEnumerable<ComponentProperties>?)

public MessageProperties WithComponents(IEnumerable<ComponentProperties>? components)

Parameters

components IEnumerable<ComponentProperties>

Returns

MessageProperties

WithContent(string?)

public MessageProperties WithContent(string? content)

Parameters

content string

Returns

MessageProperties

WithEmbeds(IEnumerable<EmbedProperties>?)

public MessageProperties WithEmbeds(IEnumerable<EmbedProperties>? embeds)

Parameters

embeds IEnumerable<EmbedProperties>

Returns

MessageProperties

WithFlags(MessageFlags?)

public MessageProperties WithFlags(MessageFlags? flags)

Parameters

flags MessageFlags?

Returns

MessageProperties

WithMessageReference(MessageReferenceProperties?)

public MessageProperties WithMessageReference(MessageReferenceProperties? messageReference)

Parameters

messageReference MessageReferenceProperties

Returns

MessageProperties

WithNonce(NonceProperties?)

public MessageProperties WithNonce(NonceProperties? nonce)

Parameters

nonce NonceProperties

Returns

MessageProperties

WithPoll(MessagePollProperties?)

public MessageProperties WithPoll(MessagePollProperties? poll)

Parameters

poll MessagePollProperties

Returns

MessageProperties

WithStickerIds(IEnumerable<ulong>?)

public MessageProperties WithStickerIds(IEnumerable<ulong>? stickerIds)

Parameters

stickerIds IEnumerable<ulong>

Returns

MessageProperties

WithTts(bool)

public MessageProperties WithTts(bool tts = true)

Parameters

tts bool

Returns

MessageProperties

Operators

implicit operator MessageProperties(string)

public static implicit operator MessageProperties(string content)

Parameters

content string

Returns

MessageProperties