InputMessageContent
public indirect enum InputMessageContent : Codable, Equatable, FunctionResult, TDEnum, EquatableEnum
Undocumented
-
A text message
- text: Formatted text to be sent; 1-GetOption(“message_text_length_max”) characters. Only Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities are allowed to be specified manually
- disableWebPagePreview: True, if rich web page previews for URLs in the message text should be disabled
- clearDraft: True, if a chat message draft should be deleted
Declaration
Swift
case inputMessageText(text: FormattedText, disableWebPagePreview: Bool, clearDraft: Bool)
-
An animation message (GIF-style).
- animation: Animation file to be sent
- thumbnail: Animation thumbnail, if available
- duration: Duration of the animation, in seconds
- width: Width of the animation; may be replaced by the server
- height: Height of the animation; may be replaced by the server
- caption: Animation caption; 0-GetOption(“message_caption_length_max”) characters
Declaration
Swift
case inputMessageAnimation(animation: InputFile, thumbnail: InputThumbnail, duration: Int32, width: Int32, height: Int32, caption: FormattedText)
-
An audio message
- audio: Audio file to be sent
- albumCoverThumbnail: Thumbnail of the cover for the album, if available
- duration: Duration of the audio, in seconds; may be replaced by the server
- title: Title of the audio; 0-64 characters; may be replaced by the server
- performer: Performer of the audio; 0-64 characters, may be replaced by the server
- caption: Audio caption; 0-GetOption(“message_caption_length_max”) characters
Declaration
Swift
case inputMessageAudio(audio: InputFile, albumCoverThumbnail: InputThumbnail, duration: Int32, title: String, performer: String, caption: FormattedText)
-
A document message (general file)
- document: Document to be sent
- thumbnail: Document thumbnail, if available
- caption: Document caption; 0-GetOption(“message_caption_length_max”) characters
Declaration
Swift
case inputMessageDocument(document: InputFile, thumbnail: InputThumbnail, caption: FormattedText)
-
A photo message
- photo: Photo to send
- thumbnail: Photo thumbnail to be sent, this is sent to the other party in secret chats only
- addedStickerFileIds: File identifiers of the stickers added to the photo, if applicable
- width: Photo width
- height: Photo height
- caption: Photo caption; 0-GetOption(“message_caption_length_max”) characters
- ttl: Photo TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats
Declaration
Swift
case inputMessagePhoto(photo: InputFile, thumbnail: InputThumbnail, addedStickerFileIds: [Int32], width: Int32, height: Int32, caption: FormattedText, ttl: Int32)
-
A sticker message
- sticker: Sticker to be sent
- thumbnail: Sticker thumbnail, if available
- width: Sticker width
- height: Sticker height
Declaration
Swift
case inputMessageSticker(sticker: InputFile, thumbnail: InputThumbnail, width: Int32, height: Int32)
-
inputMessageVideo(video:thumbnail:addedStickerFileIds:duration:width:height:supportsStreaming:caption:ttl:)
A video message
- video: Video to be sent
- thumbnail: Video thumbnail, if available
- addedStickerFileIds: File identifiers of the stickers added to the video, if applicable
- duration: Duration of the video, in seconds
- width: Video width
- height: Video height
- supportsStreaming: True, if the video should be tried to be streamed
- caption: Video caption; 0-GetOption(“message_caption_length_max”) characters
- ttl: Video TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats
Declaration
Swift
case inputMessageVideo(video: InputFile, thumbnail: InputThumbnail, addedStickerFileIds: [Int32], duration: Int32, width: Int32, height: Int32, supportsStreaming: Bool, caption: FormattedText, ttl: Int32)
-
A video note message
- videoNote: Video note to be sent
- thumbnail: Video thumbnail, if available
- duration: Duration of the video, in seconds
- length: Video width and height; must be positive and not greater than 640
Declaration
Swift
case inputMessageVideoNote(videoNote: InputFile, thumbnail: InputThumbnail, duration: Int32, length: Int32)
-
A voice note message
- voiceNote: Voice note to be sent
- duration: Duration of the voice note, in seconds
- waveform: Waveform representation of the voice note, in 5-bit format
- caption: Voice note caption; 0-GetOption(“message_caption_length_max”) characters
Declaration
Swift
case inputMessageVoiceNote(voiceNote: InputFile, duration: Int32, waveform: Bytes, caption: FormattedText)
-
A message with a location
- location: Location to be sent
- livePeriod: Period for which the location can be updated, in seconds; should be between 60 and 86400 for a live location and 0 otherwise
Declaration
Swift
case inputMessageLocation(location: Location, livePeriod: Int32)
-
A message with information about a venue
- venue: Venue to send
Declaration
Swift
case inputMessageVenue(venue: Venue)
-
A message containing a user contact
- contact: Contact to send
Declaration
Swift
case inputMessageContact(contact: Contact)
-
A message with a game; not supported for channels or secret chats
- botUserId: User identifier of the bot that owns the game
- gameShortName: Short name of the game
Declaration
Swift
case inputMessageGame(botUserId: Int32, gameShortName: String)
-
inputMessageInvoice(invoice:title:description:photoUrl:photoSize:photoWidth:photoHeight:payload:providerToken:providerData:startParameter:)
A message with an invoice; can be used only by bots and only in private chats
- invoice: Invoice
- title: Product title; 1-32 characters
- description: Product description; 0-255 characters
- photoUrl: Product photo URL; optional
- photoSize: Product photo size
- photoWidth: Product photo width
- photoHeight: Product photo height
- payload: The invoice payload
- providerToken: Payment provider token
- providerData: JSON-encoded data about the invoice, which will be shared with the payment provider
- startParameter: Unique invoice bot start_parameter for the generation of this invoice
Declaration
-
A message with a poll. Polls can’t be sent to secret chats. Polls can be sent only to a private chat with a bot
- question: Poll question, 1-255 characters
- options: List of poll answer options, 2-10 strings 1-100 characters each
- isAnonymous: True, if the poll voters are anonymous. Non-anonymous polls can’t be sent or forwarded to channels
- type: Type of the poll
- isClosed: True, if the poll needs to be sent already closed; for bots only
Declaration
Swift
case inputMessagePoll(question: String, options: [String], isAnonymous: Bool, type: PollType, isClosed: Bool?)
-
A forwarded message
- fromChatId: Identifier for the chat this forwarded message came from
- messageId: Identifier of the message to forward
- inGameShare: True, if a game message should be shared within a launched game; applies only to game messages
- sendCopy: True, if content of the message needs to be copied without a link to the original message. Always true if the message is forwarded to a secret chat
- removeCaption: True, if media caption of the message copy needs to be removed. Ignored if send_copy is false
Declaration