Raw.Message
A message
message#94345242 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true invert_media:flags.27?true flags2:# offline:flags2.1?true id:int from_id:flags.8?Peer from_boosts_applied:flags.29?int peer_id:Peer saved_peer_id:flags.28?Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long via_business_bot_id:flags2.0?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int quick_reply_shortcut_id:flags.30?int effect:flags2.2?long factcheck:flags2.3?FactCheck = Message;
export namespace Raw {
export class Message {
constructor(params: {
out?: boolean;
mentioned?: boolean;
mediaUnread?: boolean;
silent?: boolean;
post?: boolean;
fromScheduled?: boolean;
legacy?: boolean;
editHide?: boolean;
pinned?: boolean;
noforwards?: boolean;
invertMedia?: boolean;
offline?: boolean;
id: number;
fromId?: Raw.TypePeer;
fromBoostsApplied?: number;
peerId: Raw.TypePeer;
savedPeerId?: Raw.TypePeer;
fwdFrom?: Raw.TypeMessageFwdHeader;
viaBotId?: bigint;
viaBusinessBotId?: bigint;
replyTo?: Raw.TypeMessageReplyHeader;
date: number;
message: string;
media?: Raw.TypeMessageMedia;
replyMarkup?: Raw.TypeReplyMarkup;
entities?: Array<Raw.TypeMessageEntity>;
views?: number;
forwards?: number;
replies?: Raw.TypeMessageReplies;
editDate?: number;
postAuthor?: string;
groupedId?: bigint;
reactions?: Raw.TypeMessageReactions;
restrictionReason?: Array<Raw.TypeRestrictionReason>;
ttlPeriod?: number;
quickReplyShortcutId?: number;
effect?: bigint;
factcheck?: Raw.TypeFactCheck;
}) {}
}
}
This is a types constructor, you can’t use it as method when call invoke.
Layer: 185
Constructor ID: 0x94345242
Property
out
: boolean or undefinedIs this an outgoing message
mentioned
: boolean or undefinedWhether we were mentioned in this message
mediaUnread
: boolean or undefinedWhether there are unread media attachments in this message
silent
: boolean or undefinedWhether this is a silent message (no notification triggered)
post
: boolean or undefinedWhether this is a channel post
fromScheduled
: boolean or undefinedWhether this is a scheduled message
legacy
: boolean or undefinedThis is a legacy message: it has to be refetched with the new layer
editHide
: boolean or undefinedWhether the message should be shown as not modified to the user, even if an edit date is present
pinned
: boolean or undefinedWhether this message is pinned
noforwards
: boolean or undefinedWhether this message is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in ram, et cetera).
invertMedia
: boolean or undefinedIf set, any eventual webpage preview will be shown on top of the message instead of at the bottom.
offline
: boolean or undefinedIf set, the message was sent because of a scheduled action by the message sender, for example, as away, or a greeting service message.
id
: numberId of the message
fromId
: Raw.TypePeer or undefinedId of the sender of the message
fromBoostsApplied
: number or undefinedSupergroups only, contains the number of boosts this user has given the current supergroup, and should be shown in the ui in the header of the message. only present for incoming messages from non-anonymous supergroup members that have boosted the supergroup. note that this counter should be locally overridden for non-anonymous outgoing messages, according to the current value of channelfull.boostsApplied, to ensure the value is correct even for messages sent by the current user before a supergroup was boosted (or after a boost has expired or the number of boosts has changed); do not update this value for incoming messages from other users, even if their boosts have changed.
peerId
: Raw.TypePeerPeer id, the chat where this message was sent
savedPeerId
: Raw.TypePeer or undefinedMessages fetched from a saved messages dialog will have peer=inputpeerself and the savedPeerId flag set to the id of the saved dialog.
fwdFrom
: Raw.TypeMessageFwdHeader or undefinedInfo about forwarded messages
viaBotId
: bigint or undefinedId of the inline bot that generated the message
viaBusinessBotId
: bigint or undefinedWhether the message was sent by the business bot specified in viaBotId on behalf of the user.
replyTo
: Raw.TypeMessageReplyHeader or undefinedReply information
date
: numberDate of the message
message
: stringThe message
media
: Raw.TypeMessageMedia or undefinedMedia attachment
replyMarkup
: Raw.TypeReplyMarkup or undefinedReply markup (bot/inline keyboards)
entities
: Array of Raw.TypeMessageEntity or undefinedMessage entities for styled text
views
: number or undefinedView count for channel posts
forwards
: number or undefinedForward counter
replies
: Raw.TypeMessageReplies or undefinedInfo about post comments (for channels) or message replies (for groups)
editDate
: number or undefinedLast edit date of this message
postAuthor
: string or undefinedName of the author of this message for channel posts (with signatures enabled)
groupedId
: bigint or undefinedMultiple media messages sent using messages.sendmultimedia with the same grouped id indicate an album or media group
reactions
: Raw.TypeMessageReactions or undefinedReactions to this message
restrictionReason
: Array of Raw.TypeRestrictionReason or undefinedContains the reason why access to this message must be restricted.
ttlPeriod
: number or undefinedTime to live of the message, once message.date+message.ttlPeriod === time(), the message will be deleted on the server, and must be deleted locally as well.
quickReplyShortcutId
: number or undefinedIf set, this message is a quick reply shortcut message (note that quick reply shortcut messages sent to a private chat will not have this field set).
effect
: bigint or undefinedA message effect that should be played as specified here.
factcheck
: Raw.TypeFactCheck or undefinedRepresents a fact-check.