Table of Contents

Class MessageProperties

Namespace
Discord
Assembly
Discord.Net.Core.dll

Properties that are used to modify an IUserMessage with the specified changes.

public class MessageProperties
Inheritance
MessageProperties
Inherited Members

Examples

The following example uses ModifyAsync to apply changes specified in the properties,

var message = await channel.SendMessageAsync("boo");
await Task.Delay(TimeSpan.FromSeconds(1));
await message.ModifyAsync(x => x.Content = "boi");

Remarks

The content of a message can be cleared with Empty if and only if an Embed is present.

Properties

AllowedMentions

Gets or sets the allowed mentions of the message.

public Optional<AllowedMentions> AllowedMentions { get; set; }

Property Value

Optional<AllowedMentions>

Attachments

Gets or sets the attachments for the message.

public Optional<IEnumerable<FileAttachment>> Attachments { get; set; }

Property Value

Optional<IEnumerable<FileAttachment>>

Components

Gets or sets the components for this message.

public Optional<MessageComponent> Components { get; set; }

Property Value

Optional<MessageComponent>

Content

Gets or sets the content of the message.

public Optional<string> Content { get; set; }

Property Value

Optional<string>

Remarks

This must be less than the constant defined by MaxMessageSize.

Embed

Gets or sets a single embed for this message.

public Optional<Embed> Embed { get; set; }

Property Value

Optional<Embed>

Remarks

This property will be added to the Embeds array, in the future please use the array rather than this property.

Embeds

Gets or sets the embeds of the message.

public Optional<Embed[]> Embeds { get; set; }

Property Value

Optional<Embed[]>

Flags

Gets or sets the flags of the message.

public Optional<MessageFlags?> Flags { get; set; }

Property Value

Optional<MessageFlags?>

Remarks

Only SuppressEmbeds can be set/unset and you need to be the author of the message.

See Also