teleproto - v1.229.0
    Preparing search index...

    Class MessageService

    Hierarchy

    • CustomMessage
      • MessageService
    Index
    • get buttons(): MessageButton[][] | undefined

      Returns a list of lists of MessageButton <MessageButton>, if any. Otherwise, it returns undefined.

      Returns MessageButton[][] | undefined

    • get richMarkdown(): string | undefined

      Markdown rendering of richMessage, or undefined if the message is not rich.

      Returns string | undefined

    • Parameters

      • c: any
      • __namedParameters: ChatGetterConstructorParams

      Returns void

    • Parameters

      • c: any
      • __namedParameters: SenderGetterConstructorInterface

      Returns void

    • Parameters

      • kind: Function
      • Optionalcondition: Function

      Returns Document | undefined

    • Parameters

      • client: TelegramClient
      • entities: Map<string, Entity>
      • OptionalinputChat: EntityLike

      Returns void

    • Returns the input peer of the bot that's needed for the reply markup.

      This is necessary for InlineButtonTypeSwitchInline since we need to know what bot we want to start. Raises Error if the bot cannot be found but is needed. Returns None if it's not needed.

      Returns any

    • Helper methods to set the buttons given the input sender and chat.

      Parameters

      • chat: EntityLike
      • Optionalbot: EntityLike

      Returns void

    • Ensures the full rich message content is available. When the server truncated the delivery (richMessage.part), fetches the rest via messages.getRichMessage and updates this message in place.

      Returns Promise<Message>

      This message with complete richMessage content.

    • Returns buttons when that property fails (this is rarely needed).

      Returns Promise<MessageButton[][] | undefined>

    • Parameters

      • Optionalcls: Function

      Returns any

    • Parameters

      • __namedParameters: MessageBaseInterface

      Returns void

    • Parameters

      • Optionalreaction: string | BigInteger | TypeReaction | (string | BigInteger | TypeReaction)[]
      • Optionalbig: boolean
      • OptionaladdToRecent: boolean

      Returns Promise<TypeUpdates | undefined>

    CONSTRUCTOR_ID: number
    SUBCLASS_OF_ID: number
    _broadcast?: boolean
    _chat?: Entity
    _chatPeer?: EntityLike
    _inputChat?: EntityLike
    _senderId?: BigInteger

    The message action object of the message for Api.MessageService instances, which will be undefined for other types of messages.

    className: "MessageService"
    classType: "request"
    CONSTRUCTOR_ID: 2055212554
    date: number

    The timestamp indicating when this message was sent. This will always be present except for empty messages.

    editDate?: number

    The date when this message was last edited.

    editHide?: boolean

    Whether the edited mark of this message is edited should be hidden (e.g. in GUI clients) or shown.

    entities?: TypeMessageEntity[]

    The list of markup entities in this message, such as bold, italics, code, hyperlinks, etc.

    forwards?: number

    The number of times this message has been forwarded.

    fromId?: TypePeer

    The peer who sent this message, which is either Api.PeerUser, Api.PeerChat or Api.PeerChannel. This value will be undefined for anonymous messages.

    fromScheduled?: boolean

    Whether this message was originated from a previously-scheduled message or not.

    The original forward header if this message is a forward. You should probably use the forward property instead.

    groupedId?: BigInteger

    If this message belongs to a group of messages (photo albums or video albums), all of them will have the same value here.

    id: number

    The ID of this message. This field is always present. Any other member is optional and may be undefined.

    legacy?: boolean

    Whether this is a legacy message or not.

    The media sent with this message if any (such as photos, videos, documents, gifs, stickers, etc.).

    You may want to access the photo, document etc. properties instead.

    If the media was not present or it was Api.MessageMediaEmpty, this member will instead be undefined for convenience.

    mediaUnread?: boolean

    Whether you have read the media in this message or not, e.g. listened to the voice note media.

    mentioned?: boolean

    Whether you were mentioned in this message or not. Note that replies to your own messages also count as mentions.

    message: string

    The string text of the message for Api.Message instances, which will be undefined for other types of messages.

    noforwards?: boolean
    originalArgs: any
    out?: boolean

    Whether the message is outgoing (i.e. you sent it from another session) or incoming (i.e. someone else sent it).
    Note that messages in your own chat are always incoming, but this member will be true if you send a message to your own chat. Messages you forward to your chat are not considered outgoing, just like official clients display them.

    patternMatch?: RegExpMatchArray
    peerId: TypePeer

    The peer to which this message was sent, which is either Api.PeerUser, Api.PeerChat or Api.PeerChannel. This will always be present except for empty messages.

    pinned?: boolean

    Whether this message is currently pinned or not.

    Optionalpost

    post?: boolean

    Whether this message is a post in a broadcast channel or not.

    postAuthor?: string

    The display name of the message sender to show in messages sent to broadcast channels.

    reactions?: MessageReactions
    replies?: MessageReplies

    The number of times another message has replied to this message.

    replyMarkup?: TypeReplyMarkup

    The reply markup for this message (which was sent either via a bot or by a bot). You probably want to access buttons instead.

    The original reply header if this message is replying to another.

    restrictionReason?: RestrictionReason[]

    An optional list of reasons why this message was restricted. If the list is undefined, this message has not been restricted.

    richMessage?: RichMessage

    Rich message content: a PageBlock tree with tables, headings, lists and inline media. When its part flag is set, the delivery was truncated — use fetchRichMessage to load the rest.

    silent?: boolean

    Whether the message should notify people with sound or not. Previously used in channels, but since 9 August 2019, it can also be in private chats

    SUBCLASS_OF_ID: 2030045667
    ttlPeriod?: number

    The Time To Live period configured for this message. The message should be erased from wherever it's stored (memory, a local database, etc.) when this threshold is met.

    viaBotId?: BigInteger

    The ID of the bot used to send this message through its inline mode (e.g. "via @like").

    views?: number

    The number of views this message from a broadcast channel has. This is also present in forwards.