Class MessageProperties
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
Attachments
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonConverter(typeof(AttachmentPropertiesIEnumerableConverter))]
[JsonPropertyName("attachments")]
public IEnumerable<AttachmentProperties>? Attachments { get; set; }
Property Value
Components
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("components")]
public IEnumerable<IMessageComponentProperties>? Components { get; set; }
Property Value
Content
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("content")]
public string? Content { get; set; }
Property Value
Embeds
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("embeds")]
public IEnumerable<EmbedProperties>? Embeds { get; set; }
Property Value
Flags
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("flags")]
public MessageFlags? Flags { get; set; }
Property Value
MessageReference
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("message_reference")]
public MessageReferenceProperties? MessageReference { get; set; }
Property Value
Nonce
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("nonce")]
public NonceProperties? Nonce { get; set; }
Property Value
Poll
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("poll")]
public MessagePollProperties? Poll { get; set; }
Property Value
StickerIds
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("sticker_ids")]
public IEnumerable<ulong>? StickerIds { get; set; }
Property Value
Tts
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("tts")]
public bool Tts { get; set; }
Property Value
Methods
AddAttachments(params IEnumerable<AttachmentProperties>)
public MessageProperties AddAttachments(params IEnumerable<AttachmentProperties> attachments)
Parameters
attachmentsIEnumerable<AttachmentProperties>
Returns
AddComponents(params IEnumerable<IMessageComponentProperties>)
public MessageProperties AddComponents(params IEnumerable<IMessageComponentProperties> components)
Parameters
componentsIEnumerable<IMessageComponentProperties>
Returns
AddEmbeds(params IEnumerable<EmbedProperties>)
public MessageProperties AddEmbeds(params IEnumerable<EmbedProperties> embeds)
Parameters
embedsIEnumerable<EmbedProperties>
Returns
AddStickerIds(params IEnumerable<ulong>)
public MessageProperties AddStickerIds(params IEnumerable<ulong> stickerIds)
Parameters
stickerIdsIEnumerable<ulong>
Returns
Serialize()
Serializes the object or its part into HttpContent.
public HttpContent Serialize()
Returns
WithAllowedMentions(AllowedMentionsProperties?)
public MessageProperties WithAllowedMentions(AllowedMentionsProperties? allowedMentions)
Parameters
allowedMentionsAllowedMentionsProperties
Returns
WithAttachments(IEnumerable<AttachmentProperties>?)
public MessageProperties WithAttachments(IEnumerable<AttachmentProperties>? attachments)
Parameters
attachmentsIEnumerable<AttachmentProperties>
Returns
WithComponents(IEnumerable<IMessageComponentProperties>?)
public MessageProperties WithComponents(IEnumerable<IMessageComponentProperties>? components)
Parameters
componentsIEnumerable<IMessageComponentProperties>
Returns
WithContent(string?)
public MessageProperties WithContent(string? content)
Parameters
contentstring
Returns
WithEmbeds(IEnumerable<EmbedProperties>?)
public MessageProperties WithEmbeds(IEnumerable<EmbedProperties>? embeds)
Parameters
embedsIEnumerable<EmbedProperties>
Returns
WithFlags(MessageFlags?)
public MessageProperties WithFlags(MessageFlags? flags)
Parameters
flagsMessageFlags?
Returns
WithMessageReference(MessageReferenceProperties?)
public MessageProperties WithMessageReference(MessageReferenceProperties? messageReference)
Parameters
messageReferenceMessageReferenceProperties
Returns
WithNonce(NonceProperties?)
public MessageProperties WithNonce(NonceProperties? nonce)
Parameters
nonceNonceProperties
Returns
WithPoll(MessagePollProperties?)
public MessageProperties WithPoll(MessagePollProperties? poll)
Parameters
Returns
WithStickerIds(IEnumerable<ulong>?)
public MessageProperties WithStickerIds(IEnumerable<ulong>? stickerIds)
Parameters
stickerIdsIEnumerable<ulong>
Returns
WithTts(bool)
public MessageProperties WithTts(bool tts = true)
Parameters
ttsbool
Returns
Operators
implicit operator MessageProperties(string)
public static implicit operator MessageProperties(string content)
Parameters
contentstring