Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/mtkruto/tl/2_types.ts>Message_

Cross-runtime JavaScript library for building Telegram clients
Go to Latest
class Message_
extends _Message_
import { Message_ } from "https://deno.land/x/mtkruto@0.1.190/tl/2_types.ts";

A message

Constructors

new
Message_(params: { out?: true; mentioned?: true; media_unread?: true; silent?: true; post?: true; from_scheduled?: true; legacy?: true; edit_hide?: true; pinned?: true; noforwards?: true; invert_media?: true; id: number; from_id?: enums.Peer; from_boosts_applied?: number; peer_id: enums.Peer; saved_peer_id?: enums.Peer; fwd_from?: enums.MessageFwdHeader; via_bot_id?: bigint; reply_to?: enums.MessageReplyHeader; date: number; message: string; media?: enums.MessageMedia; reply_markup?: enums.ReplyMarkup; entities?: Array<enums.MessageEntity>; views?: number; forwards?: number; replies?: enums.MessageReplies; edit_date?: number; post_author?: string; grouped_id?: bigint; reactions?: enums.MessageReactions; restriction_reason?: Array<enums.RestrictionReason>; ttl_period?: number; quick_reply_shortcut_id?: number; })

Properties

protected
readonly
[id]: number
protected
readonly
[params]: Params
date: number

Date of the message

optional
edit_date: number

Last edit date of this message

optional
edit_hide: true

Whether the message should be shown as not modified to the user, even if an edit date is present

optional
entities: Array<enums.MessageEntity>

Message entities for styled text

optional
forwards: number

Forward counter

optional
from_boosts_applied: number
optional
from_id: enums.Peer

ID of the sender of the message

optional
from_scheduled: true

Whether this is a scheduled message

optional
fwd_from: enums.MessageFwdHeader

Info about forwarded messages

optional
grouped_id: bigint

Multiple media messages sent using messages.sendMultiMedia with the same grouped ID indicate an album or media group

id: number

ID of the message

optional
invert_media: true

If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.

optional
legacy: true

This is a legacy message: it has to be refetched with the new layer

optional
media: enums.MessageMedia

Media attachment

optional
media_unread: true

Whether there are unread media attachments in this message

optional
mentioned: true

Whether we were mentioned in this message

message: string

The message

optional
noforwards: true

Whether 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).

optional
out: true

Is this an outgoing message

peer_id: enums.Peer

Peer ID, the chat where this message was sent

optional
pinned: true

Whether this message is pinned

optional
post: true

Whether this is a channel post

optional
post_author: string

Name of the author of this message for channel posts (with signatures enabled)

optional
quick_reply_shortcut_id: number
optional
reactions: enums.MessageReactions

Reactions to this message

optional
replies: enums.MessageReplies
optional
reply_markup: enums.ReplyMarkup

Reply markup (bot/inline keyboards)

optional
reply_to: enums.MessageReplyHeader

Reply information

optional
restriction_reason: Array<enums.RestrictionReason>

Contains the reason why access to this message must be restricted.

optional
saved_peer_id: enums.Peer

Messages fetched from a saved messages dialog » will have peer=inputPeerSelf and the saved_peer_id flag set to the ID of the saved dialog.

optional
silent: true

Whether this is a silent message (no notification triggered)

optional
ttl_period: number

Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well.

optional
via_bot_id: bigint

ID of the inline bot that generated the message

optional
views: number

View count for channel posts

Static Properties

readonly
[name]: string
readonly
[paramDesc]: ParamDesc