Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Message

Wrapper around dc_msg_t*

Hierarchy

  • Message

Index

Constructors

constructor

Properties

dc_msg

Accessors

downloadState

hasHTML

  • get hasHTML(): boolean

overrideSenderName

  • get overrideSenderName(): string

parent

subject

  • get subject(): string

webxdcInfo

Methods

forcePlaintext

  • forcePlaintext(): void
  • Force the message to be sent in plain text.

    This API is for bots, there is no need to expose it in the UI.

    Returns void

getChatId

  • getChatId(): number

getDuration

  • getDuration(): number

getFile

  • getFile(): string

getFilebytes

  • getFilebytes(): number

getFilemime

  • getFilemime(): string

getFilename

  • getFilename(): string

getFromId

  • getFromId(): number

getHeight

  • getHeight(): number

getId

  • getId(): number

getQuotedMessage

  • getQuotedMessage(): Message | null

getQuotedText

  • getQuotedText(): string

getReceivedTimestamp

  • getReceivedTimestamp(): number

getSetupcodebegin

  • getSetupcodebegin(): any

getShowpadlock

  • getShowpadlock(): boolean

getSortTimestamp

  • getSortTimestamp(): number

getState

getSummary

getSummarytext

  • getSummarytext(approxCharacters: number): string

getText

  • getText(): string

getTimestamp

  • getTimestamp(): number

getVideochatType

  • getVideochatType(): number

getVideochatUrl

  • getVideochatUrl(): string

getViewType

getWidth

  • getWidth(): number

hasDeviatingTimestamp

  • hasDeviatingTimestamp(): any

hasLocation

  • hasLocation(): boolean

isDeadDrop

  • isDeadDrop(): boolean

isForwarded

  • isForwarded(): boolean

isIncreation

  • isIncreation(): boolean

isInfo

  • isInfo(): boolean

isSent

  • isSent(): boolean

isSetupmessage

  • isSetupmessage(): boolean

latefilingMediasize

  • latefilingMediasize(width: number, height: number, duration: number): void

setDimension

  • setDimension(width: number, height: number): this

setDuration

  • setDuration(duration: number): this

setFile

  • setFile(file: string, mime?: undefined | string): this

setHTML

  • setHTML(html: string): this

setLocation

  • setLocation(longitude: number, latitude: number): this

setOverrideSenderName

  • setOverrideSenderName(senderName: string): this

setQuote

  • setQuote(quotedMessage: Message | null): this

setText

  • setText(text: string): this

toJson

  • toJson(): { chatId: number; downloadState: MessageDownloadState; duration: number; file: string; fromId: number; hasDeviatingTimestamp: any; hasHTML: boolean; hasLocation: boolean; id: number; isForwarded: boolean; isInfo: boolean; isSetupmessage: boolean; overrideSenderName: string; parentId: undefined | number; quotedMessageId: null | number; quotedText: string; receivedTimestamp: number; showPadlock: boolean; sortTimestamp: number; state: any; subject: string; summary: { state: number; text1: string; text1Meaning: string; text2: string; timestamp: number }; text: string; timestamp: number; videochatType: number; videochatUrl: string; viewType: any; webxdcInfo: null | { document?: undefined | string; icon: string; name: string; summary: string }; dimensions: object }
  • Returns { chatId: number; downloadState: MessageDownloadState; duration: number; file: string; fromId: number; hasDeviatingTimestamp: any; hasHTML: boolean; hasLocation: boolean; id: number; isForwarded: boolean; isInfo: boolean; isSetupmessage: boolean; overrideSenderName: string; parentId: undefined | number; quotedMessageId: null | number; quotedText: string; receivedTimestamp: number; showPadlock: boolean; sortTimestamp: number; state: any; subject: string; summary: { state: number; text1: string; text1Meaning: string; text2: string; timestamp: number }; text: string; timestamp: number; videochatType: number; videochatUrl: string; viewType: any; webxdcInfo: null | { document?: undefined | string; icon: string; name: string; summary: string }; dimensions: object }

    • chatId: number
    • downloadState: MessageDownloadState
    • duration: number
    • file: string
    • fromId: number
    • hasDeviatingTimestamp: any
    • hasHTML: boolean
    • hasLocation: boolean
    • id: number
    • isForwarded: boolean
    • isInfo: boolean
    • isSetupmessage: boolean
    • overrideSenderName: string
    • parentId: undefined | number
    • quotedMessageId: null | number
    • quotedText: string
    • receivedTimestamp: number
    • showPadlock: boolean
    • sortTimestamp: number
    • state: any
    • subject: string
    • summary: { state: number; text1: string; text1Meaning: string; text2: string; timestamp: number }
      • state: number
      • text1: string
      • text1Meaning: string
      • text2: string
      • timestamp: number
    • text: string
    • timestamp: number
    • videochatType: number
    • videochatUrl: string
    • viewType: any
    • webxdcInfo: null | { document?: undefined | string; icon: string; name: string; summary: string }
    • dimensions: object
      • height: number
      • width: number

Generated using TypeDoc