Class DataMessage
The content of a regular (data) message: text, attachments, reactions, quotes and group context.
public sealed record DataMessage : IEquatable<DataMessage>
- Inheritance
-
DataMessage
- Implements
- Inherited Members
Constructors
DataMessage(long, string?)
The content of a regular (data) message: text, attachments, reactions, quotes and group context.
public DataMessage(long Timestamp, string? Text)
Parameters
TimestamplongThe message timestamp (Unix milliseconds). Together with the author it identifies the message for reactions, quotes, edits and receipts.
TextstringThe message body, if any.
Properties
Attachments
Attachments of the message.
public IReadOnlyList<Attachment> Attachments { get; init; }
Property Value
Group
The group the message was sent in, or null for direct messages.
public GroupId? Group { get; init; }
Property Value
GroupName
The group's current name, if the message belongs to a group and the name is known.
public string? GroupName { get; init; }
Property Value
GroupRevision
The group's revision as of this message, if reported; it increases with every change to the group.
public int? GroupRevision { get; init; }
Property Value
- int?
HasContent
Whether the message carries text, at least one attachment, or a sticker.
public bool HasContent { get; }
Property Value
IsGroupUpdate
Whether this message only announces a group change (name, members, settings).
public bool IsGroupUpdate { get; init; }
Property Value
Mentions
Users mentioned in Text.
public IReadOnlyList<Mention> Mentions { get; init; }
Property Value
Quote
The message this message replies to, if any.
public Quote? Quote { get; init; }
Property Value
Reaction
Set when the message is a reaction instead of regular content.
public Reaction? Reaction { get; init; }
Property Value
RemoteDelete
Set when the message deletes an earlier message for everyone instead of carrying content.
public RemoteDelete? RemoteDelete { get; init; }
Property Value
Sticker
The sticker sent with the message, if any.
public Sticker? Sticker { get; init; }
Property Value
Text
The message body, if any.
public string? Text { get; init; }
Property Value
TextStyles
Styled ranges of Text (bold, italic, spoiler, …), as the sender formatted them.
public IReadOnlyList<StyledRange> TextStyles { get; init; }
Property Value
Timestamp
The message timestamp (Unix milliseconds). Together with the author it identifies the message for reactions, quotes, edits and receipts.
public long Timestamp { get; init; }
Property Value
ViewOnce
Whether the message is a view-once message.
public bool ViewOnce { get; init; }