Class InteractionMessageProperties
public class InteractionMessageProperties : IHttpSerializable, IMessageProperties
- Inheritance
-
InteractionMessageProperties
- Implements
- Inherited Members
Constructors
InteractionMessageProperties()
public InteractionMessageProperties()
Properties
AllowedMentions
Defines which users and roles the message is allowed to mention.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("allowed_mentions")]
public AllowedMentionsProperties? AllowedMentions { get; set; }
Property Value
Attachments
A list of attachments to include in the message.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonConverter(typeof(AttachmentPropertiesIEnumerableConverter))]
[JsonPropertyName("attachments")]
public IEnumerable<AttachmentProperties>? Attachments { get; set; }
Property Value
Components
A list of components to include in the message.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("components")]
public IEnumerable<IMessageComponentProperties>? Components { get; set; }
Property Value
Content
The text contents of a message, limited to 2000 characters. This limit is raised to 4000 characters for Discord Nitro subscribers.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("content")]
public string? Content { get; set; }
Property Value
Embeds
A list of up to 10 embeds to include, totalling up to 6000 characters.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("embeds")]
public IEnumerable<EmbedProperties>? Embeds { get; set; }
Property Value
Flags
Includes additional information about the message's state.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("flags")]
public MessageFlags? Flags { get; set; }
Property Value
Poll
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("poll")]
public MessagePollProperties? Poll { get; set; }
Property Value
Tts
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("tts")]
public bool Tts { get; set; }
Property Value
Methods
AddAttachments(params IEnumerable<AttachmentProperties>)
A list of attachments to include in the message.
public InteractionMessageProperties AddAttachments(params IEnumerable<AttachmentProperties> attachments)
Parameters
attachmentsIEnumerable<AttachmentProperties>
Returns
AddComponents(params IEnumerable<IMessageComponentProperties>)
A list of components to include in the message.
public InteractionMessageProperties AddComponents(params IEnumerable<IMessageComponentProperties> components)
Parameters
componentsIEnumerable<IMessageComponentProperties>
Returns
AddEmbeds(params IEnumerable<EmbedProperties>)
A list of up to 10 embeds to include, totalling up to 6000 characters.
public InteractionMessageProperties AddEmbeds(params IEnumerable<EmbedProperties> embeds)
Parameters
embedsIEnumerable<EmbedProperties>
Returns
Serialize()
Serializes the object or its part into HttpContent.
public HttpContent Serialize()
Returns
WithAllowedMentions(AllowedMentionsProperties?)
Defines which users and roles the message is allowed to mention.
public InteractionMessageProperties WithAllowedMentions(AllowedMentionsProperties? allowedMentions)
Parameters
allowedMentionsAllowedMentionsProperties
Returns
WithAttachments(IEnumerable<AttachmentProperties>?)
A list of attachments to include in the message.
public InteractionMessageProperties WithAttachments(IEnumerable<AttachmentProperties>? attachments)
Parameters
attachmentsIEnumerable<AttachmentProperties>
Returns
WithComponents(IEnumerable<IMessageComponentProperties>?)
A list of components to include in the message.
public InteractionMessageProperties WithComponents(IEnumerable<IMessageComponentProperties>? components)
Parameters
componentsIEnumerable<IMessageComponentProperties>
Returns
WithContent(string?)
The text contents of a message, limited to 2000 characters. This limit is raised to 4000 characters for Discord Nitro subscribers.
public InteractionMessageProperties WithContent(string? content)
Parameters
contentstring
Returns
WithEmbeds(IEnumerable<EmbedProperties>?)
A list of up to 10 embeds to include, totalling up to 6000 characters.
public InteractionMessageProperties WithEmbeds(IEnumerable<EmbedProperties>? embeds)
Parameters
embedsIEnumerable<EmbedProperties>
Returns
WithFlags(MessageFlags?)
Includes additional information about the message's state.
public InteractionMessageProperties WithFlags(MessageFlags? flags)
Parameters
flagsMessageFlags?
Returns
WithPoll(MessagePollProperties?)
public InteractionMessageProperties WithPoll(MessagePollProperties? poll)
Parameters
Returns
WithTts(bool)
public InteractionMessageProperties WithTts(bool tts = true)
Parameters
ttsbool
Returns
Operators
implicit operator InteractionMessageProperties(string)
public static implicit operator InteractionMessageProperties(string content)
Parameters
contentstring