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
Properties
AllowedMentions
Gets or sets the allowed mentions of the message.
public Optional<AllowedMentions> AllowedMentions { get; set; }
Property Value
Attachments
Gets or sets the attachments for the message.
public Optional<IEnumerable<FileAttachment>> Attachments { get; set; }
Property Value
Components
Gets or sets the components for this message.
public Optional<MessageComponent> Components { get; set; }
Property Value
Content
Gets or sets the content of the message.
public Optional<string> Content { get; set; }
Property Value
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
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
Flags
Gets or sets the flags of the message.
public Optional<MessageFlags?> Flags { get; set; }
Property Value
Remarks
Only SuppressEmbeds can be set/unset and you need to be the author of the message.