Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
TD.Data.MessageContent
Synopsis
- data MessageContent
- = MessageText { }
- | MessageAnimation { }
- | MessageAudio { }
- | MessageDocument { }
- | MessagePaidMedia { }
- | MessagePhoto { }
- | MessageSticker { }
- | MessageVideo { }
- | MessageVideoNote { }
- | MessageVoiceNote { }
- | MessageExpiredPhoto
- | MessageExpiredVideo
- | MessageExpiredVideoNote
- | MessageExpiredVoiceNote
- | MessageLocation { }
- | MessageVenue { }
- | MessageContact { }
- | MessageAnimatedEmoji { }
- | MessageDice { }
- | MessageGame { }
- | MessagePoll { }
- | MessageStory { }
- | MessageInvoice { }
- | MessageCall { }
- | MessageGroupCall { }
- | MessageVideoChatScheduled {
- group_call_id :: Maybe Int
- start_date :: Maybe Int
- | MessageVideoChatStarted { }
- | MessageVideoChatEnded { }
- | MessageInviteVideoChatParticipants { }
- | MessageBasicGroupChatCreate { }
- | MessageSupergroupChatCreate { }
- | MessageChatChangeTitle { }
- | MessageChatChangePhoto { }
- | MessageChatDeletePhoto
- | MessageChatAddMembers {
- member_user_ids :: Maybe [Int]
- | MessageChatJoinByLink
- | MessageChatJoinByRequest
- | MessageChatDeleteMember { }
- | MessageChatUpgradeTo { }
- | MessageChatUpgradeFrom { }
- | MessagePinMessage {
- message_id :: Maybe Int
- | MessageScreenshotTaken
- | MessageChatSetBackground { }
- | MessageChatSetTheme {
- theme_name :: Maybe Text
- | MessageChatSetMessageAutoDeleteTime { }
- | MessageChatBoost {
- boost_count :: Maybe Int
- | MessageForumTopicCreated { }
- | MessageForumTopicEdited { }
- | MessageForumTopicIsClosedToggled { }
- | MessageForumTopicIsHiddenToggled { }
- | MessageSuggestProfilePhoto { }
- | MessageCustomServiceAction { }
- | MessageGameScore { }
- | MessagePaymentSuccessful { }
- | MessagePaymentSuccessfulBot {
- currency :: Maybe Text
- total_amount :: Maybe Int
- subscription_until_date :: Maybe Int
- is_recurring :: Maybe Bool
- is_first_recurring :: Maybe Bool
- invoice_payload :: Maybe ByteString
- shipping_option_id :: Maybe Text
- order_info :: Maybe OrderInfo
- telegram_payment_charge_id :: Maybe Text
- provider_payment_charge_id :: Maybe Text
- | MessagePaymentRefunded { }
- | MessageGiftedPremium { }
- | MessagePremiumGiftCode { }
- | MessageGiveawayCreated {
- star_count :: Maybe Int
- | MessageGiveaway { }
- | MessageGiveawayCompleted { }
- | MessageGiveawayWinners {
- boosted_chat_id :: Maybe Int
- giveaway_message_id :: Maybe Int
- additional_chat_count :: Maybe Int
- actual_winners_selection_date :: Maybe Int
- only_new_members :: Maybe Bool
- was_refunded :: Maybe Bool
- prize :: Maybe GiveawayPrize
- prize_description :: Maybe Text
- winner_count :: Maybe Int
- winner_user_ids :: Maybe [Int]
- unclaimed_prize_count :: Maybe Int
- | MessageGiftedStars { }
- | MessageGiveawayPrizeStars { }
- | MessageGift {
- gift :: Maybe Gift
- sender_id :: Maybe MessageSender
- receiver_id :: Maybe MessageSender
- received_gift_id :: Maybe Text
- text :: Maybe FormattedText
- sell_star_count :: Maybe Int
- prepaid_upgrade_star_count :: Maybe Int
- is_private :: Maybe Bool
- is_saved :: Maybe Bool
- can_be_upgraded :: Maybe Bool
- was_converted :: Maybe Bool
- was_upgraded :: Maybe Bool
- was_refunded :: Maybe Bool
- upgraded_received_gift_id :: Maybe Text
- | MessageUpgradedGift {
- _gift :: Maybe UpgradedGift
- sender_id :: Maybe MessageSender
- receiver_id :: Maybe MessageSender
- received_gift_id :: Maybe Text
- is_upgrade :: Maybe Bool
- is_saved :: Maybe Bool
- can_be_transferred :: Maybe Bool
- was_transferred :: Maybe Bool
- last_resale_star_count :: Maybe Int
- transfer_star_count :: Maybe Int
- next_transfer_date :: Maybe Int
- next_resale_date :: Maybe Int
- export_date :: Maybe Int
- | MessageRefundedUpgradedGift { }
- | MessagePaidMessagesRefunded {
- message_count :: Maybe Int
- star_count :: Maybe Int
- | MessagePaidMessagePriceChanged { }
- | MessageDirectMessagePriceChanged { }
- | MessageContactRegistered
- | MessageUsersShared { }
- | MessageChatShared { }
- | MessageBotWriteAccessAllowed { }
- | MessageWebAppDataSent {
- button_text :: Maybe Text
- | MessageWebAppDataReceived { }
- | MessagePassportDataSent { }
- | MessagePassportDataReceived { }
- | MessageProximityAlertTriggered { }
- | MessageUnsupported
Documentation
data MessageContent Source #
Contains the content of a message
Constructors
MessageText | A text message |
Fields
| |
MessageAnimation | An animation message (GIF-style). |
Fields
| |
MessageAudio | An audio message |
MessageDocument | A document message (general file) |
MessagePaidMedia | A message with paid media |
Fields
| |
MessagePhoto | A photo message |
Fields
| |
MessageSticker | A sticker message |
MessageVideo | A video message |
Fields
| |
MessageVideoNote | A video note message |
MessageVoiceNote | A voice note message |
Fields
| |
MessageExpiredPhoto | A self-destructed photo message |
MessageExpiredVideo | A self-destructed video message |
MessageExpiredVideoNote | A self-destructed video note message |
MessageExpiredVoiceNote | A self-destructed voice note message |
MessageLocation | A message with a location |
Fields
| |
MessageVenue | A message with information about a venue |
MessageContact | A message with a user contact |
MessageAnimatedEmoji | A message with an animated emoji |
Fields
| |
MessageDice | A dice message. The dice value is randomly generated by the server |
Fields
| |
MessageGame | A message with a game |
MessagePoll | A message with a poll |
MessageStory | A message with a forwarded story |
Fields
| |
MessageInvoice | A message with an invoice from a bot. Use getInternalLink with internalLinkTypeBotStart to share the invoice |
Fields
| |
MessageCall | A message with information about an ended call |
Fields
| |
MessageGroupCall | A message with information about a group call not bound to a chat. If the message is incoming, the call isn't active, isn't missed, and has no duration, and getOption("can_accept_calls") is true, then incoming call screen must be shown to the user. Use getGroupCallParticipants to show current group call participants on the screen. Use joinGroupCall to accept the call or declineGroupCallInvitation to decline it. If the call become active or missed, then the call screen must be hidden |
Fields
| |
MessageVideoChatScheduled | A new video chat was scheduled |
Fields
| |
MessageVideoChatStarted | A newly created video chat |
Fields
| |
MessageVideoChatEnded | A message with information about an ended video chat |
MessageInviteVideoChatParticipants | A message with information about an invitation to a video chat |
MessageBasicGroupChatCreate | A newly created basic group |
MessageSupergroupChatCreate | A newly created supergroup or channel |
MessageChatChangeTitle | An updated chat title |
MessageChatChangePhoto | An updated chat photo |
MessageChatDeletePhoto | A deleted chat photo |
MessageChatAddMembers | New chat members were added |
Fields
| |
MessageChatJoinByLink | A new member joined the chat via an invite link |
MessageChatJoinByRequest | A new member was accepted to the chat by an administrator |
MessageChatDeleteMember | A chat member was deleted |
MessageChatUpgradeTo | A basic group was upgraded to a supergroup and was deactivated as the result |
Fields
| |
MessageChatUpgradeFrom | A supergroup has been created from a basic group |
MessagePinMessage | A message has been pinned |
Fields
| |
MessageScreenshotTaken | A screenshot of a message in the chat has been taken |
MessageChatSetBackground | A new background was set in the chat |
Fields
| |
MessageChatSetTheme | A theme in the chat has been changed |
Fields
| |
MessageChatSetMessageAutoDeleteTime | The auto-delete or self-destruct timer for messages in the chat has been changed |
Fields
| |
MessageChatBoost | The chat was boosted by the sender of the message |
Fields
| |
MessageForumTopicCreated | A forum topic has been created |
MessageForumTopicEdited | A forum topic has been edited |
Fields
| |
MessageForumTopicIsClosedToggled | A forum topic has been closed or opened |
MessageForumTopicIsHiddenToggled | A General forum topic has been hidden or unhidden |
MessageSuggestProfilePhoto | A profile photo was suggested to a user in a private chat |
MessageCustomServiceAction | A non-standard action has happened in the chat |
MessageGameScore | A new high score was achieved in a game |
MessagePaymentSuccessful | A payment has been sent to a bot or a business account |
Fields
| |
MessagePaymentSuccessfulBot | A payment has been received by the bot or the business account |
Fields
| |
MessagePaymentRefunded | A payment has been refunded |
Fields
| |
MessageGiftedPremium | Telegram Premium was gifted to a user |
Fields
| |
MessagePremiumGiftCode | A Telegram Premium gift code was created for the user |
Fields
| |
MessageGiveawayCreated | A giveaway was created for the chat. Use telegramPaymentPurposePremiumGiveaway, storePaymentPurposePremiumGiveaway, telegramPaymentPurposeStarGiveaway, or storePaymentPurposeStarGiveaway to create a giveaway |
Fields
| |
MessageGiveaway | A giveaway |
Fields
| |
MessageGiveawayCompleted | A giveaway without public winners has been completed for the chat |
Fields
| |
MessageGiveawayWinners | A giveaway with public winners has been completed for the chat |
Fields
| |
MessageGiftedStars | Telegram Stars were gifted to a user |
Fields
| |
MessageGiveawayPrizeStars | A Telegram Stars were received by the current user from a giveaway |
Fields
| |
MessageGift | A regular gift was received or sent by the current user, or the current user was notified about a channel gift |
Fields
| |
MessageUpgradedGift | An upgraded gift was received or sent by the current user, or the current user was notified about a channel gift |
Fields
| |
MessageRefundedUpgradedGift | A gift which purchase, upgrade or transfer were refunded |
Fields
| |
MessagePaidMessagesRefunded | Paid messages were refunded |
Fields
| |
MessagePaidMessagePriceChanged | A price for paid messages was changed in the supergroup chat |
Fields
| |
MessageDirectMessagePriceChanged | A price for direct messages was changed in the channel chat |
Fields
| |
MessageContactRegistered | A contact has registered with Telegram |
MessageUsersShared | The current user shared users, which were requested by the bot |
MessageChatShared | The current user shared a chat, which was requested by the bot |
MessageBotWriteAccessAllowed | The user allowed the bot to send messages |
Fields
| |
MessageWebAppDataSent | Data from a Web App has been sent to a bot |
Fields
| |
MessageWebAppDataReceived | Data from a Web App has been received; for bots only |
MessagePassportDataSent | Telegram Passport data has been sent to a bot |
Fields
| |
MessagePassportDataReceived | Telegram Passport data has been received; for bots only |
Fields
| |
MessageProximityAlertTriggered | A user in the chat came within proximity alert range |
Fields
| |
MessageUnsupported | A message content that is not supported in the current TDLib version |
Instances
FromJSON MessageContent Source # | |
Defined in TD.Data.MessageContent Methods parseJSON :: Value -> Parser MessageContent # parseJSONList :: Value -> Parser [MessageContent] # | |
Show MessageContent Source # | |
Defined in TD.Data.MessageContent Methods showsPrec :: Int -> MessageContent -> ShowS # show :: MessageContent -> String # showList :: [MessageContent] -> ShowS # | |
Eq MessageContent Source # | |
Defined in TD.Data.MessageContent Methods (==) :: MessageContent -> MessageContent -> Bool # (/=) :: MessageContent -> MessageContent -> Bool # | |
ShortShow MessageContent Source # | |
Defined in TD.Data.MessageContent Methods shortShow :: MessageContent -> String Source # |