MessageContent
public indirect enum MessageContent : Codable, Equatable, FunctionResult, TDEnum, EquatableEnum
Undocumented
-
A text message
- text: Text of the message
- webPage: A preview of the web page that’s mentioned in the text; may be null
Declaration
Swift
case messageText(text: FormattedText, webPage: WebPage?) -
An animation message (GIF-style).
- animation: The animation description
- caption: Animation caption
- isSecret: True, if the animation thumbnail must be blurred and the animation must be shown only while tapped
Declaration
Swift
case messageAnimation(animation: Animation, caption: FormattedText, isSecret: Bool) -
An audio message
- audio: The audio description
- caption: Audio caption
Declaration
Swift
case messageAudio(audio: Audio, caption: FormattedText) -
A document message (general file)
- document: The document description
- caption: Document caption
Declaration
Swift
case messageDocument(document: Document, caption: FormattedText) -
A photo message
- photo: The photo description
- caption: Photo caption
- isSecret: True, if the photo must be blurred and must be shown only while tapped
Declaration
Swift
case messagePhoto(photo: Photo, caption: FormattedText, isSecret: Bool) -
An expired photo message (self-destructed after TTL has elapsed)
Declaration
Swift
case messageExpiredPhoto -
A sticker message
- sticker: The sticker description
Declaration
Swift
case messageSticker(sticker: Sticker) -
A video message
- video: The video description
- caption: Video caption
- isSecret: True, if the video thumbnail must be blurred and the video must be shown only while tapped
Declaration
Swift
case messageVideo(video: Video, caption: FormattedText, isSecret: Bool) -
An expired video message (self-destructed after TTL has elapsed)
Declaration
Swift
case messageExpiredVideo -
A video note message
- videoNote: The video note description
- isViewed: True, if at least one of the recipients has viewed the video note
- isSecret: True, if the video note thumbnail must be blurred and the video note must be shown only while tapped
Declaration
Swift
case messageVideoNote(videoNote: VideoNote, isViewed: Bool, isSecret: Bool) -
A voice note message
- voiceNote: The voice note description
- caption: Voice note caption
- isListened: True, if at least one of the recipients has listened to the voice note
Declaration
Swift
case messageVoiceNote(voiceNote: VoiceNote, caption: FormattedText, isListened: Bool) -
A message with a location
- location: The location description
- livePeriod: Time relative to the message sent date until which the location can be updated, in seconds
- expiresIn: Left time for which the location can be updated, in seconds. updateMessageContent is not sent when this field changes
Declaration
Swift
case messageLocation(location: Location, livePeriod: Int32, expiresIn: Int32) -
A message with information about a venue
- venue: The venue description
Declaration
Swift
case messageVenue(venue: Venue) -
A message with a user contact
- contact: The contact description
Declaration
Swift
case messageContact(contact: Contact) -
A message with a game
- game: The game description
Declaration
Swift
case messageGame(game: Game) -
A message with a poll
- poll: The poll description
Declaration
Swift
case messagePoll(poll: Poll) -
messageInvoice(title:description:photo:currency:totalAmount:startParameter:isTest:needShippingAddress:receiptMessageId:)A message with an invoice from a bot
- title: Product title
- description: Product description
- photo: Product photo; may be null
- currency: Currency for the product price
- totalAmount: Product total price in the minimal quantity of the currency
- startParameter: Unique invoice bot start_parameter. To share an invoice use the URL https://t.me/{bot_username}?start={start_parameter}
- isTest: True, if the invoice is a test invoice
- needShippingAddress: True, if the shipping address should be specified
- receiptMessageId: The identifier of the message with the receipt, after the product has been purchased
Declaration
-
A message with information about an ended call
- discardReason: Reason why the call was discarded
- duration: Call duration, in seconds
Declaration
Swift
case messageCall(discardReason: CallDiscardReason, duration: Int32) -
A newly created basic group
- title: Title of the basic group
- memberUserIds: User identifiers of members in the basic group
Declaration
Swift
case messageBasicGroupChatCreate(title: String, memberUserIds: [Int32]) -
A newly created supergroup or channel
- title: Title of the supergroup or channel
Declaration
Swift
case messageSupergroupChatCreate(title: String) -
An updated chat title
- title: New chat title
Declaration
Swift
case messageChatChangeTitle(title: String) -
An updated chat photo
- photo: New chat photo
Declaration
Swift
case messageChatChangePhoto(photo: Photo) -
A deleted chat photo
Declaration
Swift
case messageChatDeletePhoto -
New chat members were added
- memberUserIds: User identifiers of the new members
Declaration
Swift
case messageChatAddMembers(memberUserIds: [Int32]) -
A new member joined the chat by invite link
Declaration
Swift
case messageChatJoinByLink -
A chat member was deleted
- userId: User identifier of the deleted chat member
Declaration
Swift
case messageChatDeleteMember(userId: Int32) -
A basic group was upgraded to a supergroup and was deactivated as the result
- supergroupId: Identifier of the supergroup to which the basic group was upgraded
Declaration
Swift
case messageChatUpgradeTo(supergroupId: Int32) -
A supergroup has been created from a basic group
- title: Title of the newly created supergroup
- basicGroupId: The identifier of the original basic group
Declaration
Swift
case messageChatUpgradeFrom(title: String, basicGroupId: Int32) -
A message has been pinned
- messageId: Identifier of the pinned message, can be an identifier of a deleted message or 0
Declaration
Swift
case messagePinMessage(messageId: Int53) -
A screenshot of a message in the chat has been taken
Declaration
Swift
case messageScreenshotTaken -
The TTL (Time To Live) setting messages in a secret chat has been changed
- ttl: New TTL
Declaration
Swift
case messageChatSetTtl(ttl: Int32) -
A non-standard action has happened in the chat
- text: Message text to be shown in the chat
Declaration
Swift
case messageCustomServiceAction(text: String) -
A new high score was achieved in a game
- gameMessageId: Identifier of the message with the game, can be an identifier of a deleted message
- gameId: Identifier of the game; may be different from the games presented in the message with the game
- score: New score
-
A payment has been completed
- invoiceMessageId: Identifier of the message with the corresponding invoice; can be an identifier of a deleted message
- currency: Currency for the price of the product
- totalAmount: Total price for the product, in the minimal quantity of the currency
Declaration
-
messagePaymentSuccessfulBot(invoiceMessageId:currency:totalAmount:invoicePayload:shippingOptionId:orderInfo:telegramPaymentChargeId:providerPaymentChargeId:)A payment has been completed; for bots only
- invoiceMessageId: Identifier of the message with the corresponding invoice; can be an identifier of a deleted message
- currency: Currency for price of the product
- totalAmount: Total price for the product, in the minimal quantity of the currency
- invoicePayload: Invoice payload
- shippingOptionId: Identifier of the shipping option chosen by the user; may be empty if not applicable
- orderInfo: Information about the order; may be null
- telegramPaymentChargeId: Telegram payment identifier
- providerPaymentChargeId: Provider payment identifier
Declaration
-
A contact has registered with Telegram
Declaration
Swift
case messageContactRegistered -
The current user has connected a website by logging in using Telegram Login Widget on it
- domainName: Domain name of the connected website
Declaration
Swift
case messageWebsiteConnected(domainName: String) -
Telegram Passport data has been sent
- types: List of Telegram Passport element types sent
Declaration
Swift
case messagePassportDataSent(types: [PassportElementType]) -
Telegram Passport data has been received; for bots only
- elements: List of received Telegram Passport elements
- credentials: Encrypted data credentials
Declaration
Swift
case messagePassportDataReceived(elements: [EncryptedPassportElement], credentials: EncryptedCredentials) -
Message content that is not supported by the client
Declaration
Swift
case messageUnsupported
View on GitHub
Install in Dash
MessageContent Enumeration Reference