Class MessageProperties
Properties that are used to modify an IUserMessage with the specified changes.
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public class MessageProperties : object
Remarks
The content of a message can be cleared with
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");
Properties
| Improve this Doc View SourceAllowedMentions
Gets or sets the allowed mentions of the message.
Declaration
public Optional<AllowedMentions> AllowedMentions { get; set; }
Property Value
Type | Description |
---|---|
Optional<AllowedMentions> |
Attachments
Gets or sets the attachments for the message.
Declaration
public Optional<IEnumerable<FileAttachment>> Attachments { get; set; }
Property Value
Type | Description |
---|---|
Optional<IEnumerable<FileAttachment>> |
Components
Gets or sets the components for this message.
Declaration
public Optional<MessageComponent> Components { get; set; }
Property Value
Type | Description |
---|---|
Optional<MessageComponent> |
Content
Gets or sets the content of the message.
Declaration
public Optional<string> Content { get; set; }
Property Value
Type | Description |
---|---|
Optional<String> |
Remarks
This must be less than the constant defined by MaxMessageSize.
Embed
Gets or sets a single embed for this message.
Declaration
public Optional<Embed> Embed { get; set; }
Property Value
Type | Description |
---|---|
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.
Declaration
public Optional<Embed[]> Embeds { get; set; }
Property Value
Type | Description |
---|---|
Optional<Embed[]> |
Flags
Gets or sets the flags of the message.
Declaration
public Optional<MessageFlags?> Flags { get; set; }
Property Value
Type | Description |
---|---|
Optional<Nullable<MessageFlags>> |
Remarks
Only SuppressEmbeds can be set/unset and you need to be the author of the message.