interface Message
extends [Message.MediaMessage]

This object represents a message.

Properties

optional
text: string

For text messages, the actual UTF-8 text of the message

For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text

Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set

optional
audio: Audio

Message is an audio file, information about the file

Message is a general file, information about the file

optional
photo: PhotoSize[]

Message is a photo, available sizes of the photo

optional
sticker: Sticker

Message is a sticker, information about the sticker

optional
story: Story

Message is a forwarded story

optional
video: Video

Message is a video, information about the video

Message is a video note, information about the video message

optional
voice: Voice

Message is a voice message, information about the file

optional
contact: Contact

Message is a shared contact, information about the contact

optional
dice: Dice

Message is a dice with random value

optional
game: Game

Message is a game, information about the game. More about games »

optional
poll: Poll

Message is a native poll, information about the poll

optional
venue: Venue

Message is a venue, information about the venue. For backward compatibility, when this field is set, the location field will also be set

Message is a shared location, information about the location

Message contains paid media; information about the paid media

Message is a checklist

Service message: some tasks in a checklist were marked as done or not done

Service message: tasks were added to a checklist

Information about suggested post parameters if the message is a suggested post in a channel direct messages chat. If the message is an approved or declined suggested post, then it can't be edited.

Service message: a suggested post was approved

Service message: approval of a suggested post has failed

Service message: a suggested post was declined

Service message: payment for a suggested post was received

Service message: payment for a suggested post was refunded

New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)

A member was removed from the group, information about them (this member may be the bot itself)

optional
new_chat_title: string

A chat title was changed to this value

A chat photo was change to this value

optional
delete_chat_photo: true

Service message: the chat photo was deleted

optional
group_chat_created: true

Service message: the group has been created

Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.

optional
channel_chat_created: true

Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can't be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.

Service message: auto-delete timer settings changed in the chat

optional
migrate_to_chat_id: number

The group has been migrated to a supergroup with the specified identifier.

optional
migrate_from_chat_id: number

The supergroup has been migrated from a group with the specified identifier.

Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.

optional
invoice: Invoice

Message is an invoice for a payment, information about the invoice. More about payments »

Message is a service message about a successful payment, information about the payment. More about payments »

Message is a service message about a refunded payment, information about the payment. More about payments »

Service message: users were shared with the bot

Service message: a chat was shared with the bot

optional
connected_website: string

The domain name of the website on which the user has logged in. More about Telegram Login »

Service message: the user allowed the bot to write messages after adding it to the attachment or side menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess

Telegram Passport data

Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.

Service message: user boosted the chat

Service message: forum topic created

Service message: forum topic edited

Service message: forum topic closed

Service message: forum topic reopened

Service message: the 'General' forum topic hidden

Service message: the 'General' forum topic unhidden

Service message: a scheduled giveaway was created

The message is a scheduled giveaway message

A giveaway with public winners was completed

Service message: a giveaway without public winners was completed

optional
gift: GiftInfo

Service message: a regular gift was sent or received

Service message: upgrade of a gift was purchased after the gift was sent

Service message: a unique gift was sent or received

Service message: the price for paid messages has changed in the chat

Service message: the price for paid messages in the corresponding direct messages chat of a channel has changed

Service message: video chat scheduled

Service message: video chat started

Service message: video chat ended

Service message: new participants invited to a video chat

Service message: data sent by a Web App

namespace Message

Interfaces

Type Aliases

T
Message.AnimationMessage
No documentation available
T
Message.AudioMessage
No documentation available
T
Message.BoostAddedMessage
No documentation available
T
Message.ChannelChatCreatedMessage
No documentation available
T
Message.ChatBackgroundSetMessage
No documentation available
T
Message.ChatSharedMessage
No documentation available
T
Message.ChecklistMessage
No documentation available
T
Message.ChecklistTasksAddedMessage
No documentation available
T
Message.ChecklistTasksDoneMessage
No documentation available
T
Message.ConnectedWebsiteMessage
No documentation available
T
Message.ContactMessage
No documentation available
T
Message.DeleteChatPhotoMessage
No documentation available
T
Message.DiceMessage
No documentation available
T
Message.DirectMessagePriceChangedMessage
No documentation available
T
Message.DocumentMessage
No documentation available
T
Message.ForumTopicClosedMessage
No documentation available
T
Message.ForumTopicCreatedMessage
No documentation available
T
Message.ForumTopicEditedMessage
No documentation available
T
Message.ForumTopicReopenedMessage
No documentation available
T
Message.GameMessage
No documentation available
T
Message.GeneralForumTopicHiddenMessage
No documentation available
T
Message.GeneralForumTopicUnhiddenMessage
No documentation available
T
Message.GiftMessage
No documentation available
T
Message.GiftUpgradeSentMessage
No documentation available
T
Message.GiveawayCompletedMessage
No documentation available
T
Message.GiveawayCreatedMessage
No documentation available
T
Message.GiveawayMessage
No documentation available
T
Message.GiveawayWinnersMessage
No documentation available
T
Message.GroupChatCreatedMessage
No documentation available
T
Message.InvoiceMessage
No documentation available
T
Message.LeftChatMemberMessage
No documentation available
T
Message.LocationMessage
No documentation available
T
T
Message.MigrateFromChatIdMessage
No documentation available
T
Message.MigrateToChatIdMessage
No documentation available
T
Message.NewChatMembersMessage
No documentation available
T
Message.NewChatPhotoMessage
No documentation available
T
Message.NewChatTitleMessage
No documentation available
T
Message.PaidMediaMessage
No documentation available
T
Message.PaidMessagePriceChangedMessage
No documentation available
T
Message.PassportDataMessage
No documentation available
T
Message.PhotoMessage
No documentation available
T
Message.PinnedMessageMessage
No documentation available
T
Message.PollMessage
No documentation available
T
Message.ProximityAlertTriggeredMessage
No documentation available
T
Message.RefundedPaymentMessage
No documentation available
T
Message.StickerMessage
No documentation available
T
Message.StoryMessage
No documentation available
T
Message.SuccessfulPaymentMessage
No documentation available
T
Message.SuggestedPostApprovalFailedMessage
No documentation available
T
Message.SuggestedPostApprovedMessage
No documentation available
T
Message.SuggestedPostDeclinedMessage
No documentation available
T
Message.SuggestedPostInfoMessage
No documentation available
T
Message.SuggestedPostPaidMessage
No documentation available
T
Message.SuggestedPostRefundedMessage
No documentation available
T
Message.SupergroupChatCreated
No documentation available
T
Message.TextMessage
No documentation available
T
Message.UniqueGiftMessage
No documentation available
T
Message.UsersSharedMessage
No documentation available
T
Message.VenueMessage
No documentation available
T
Message.VideoChatEndedMessage
No documentation available
T
T
Message.VideoChatScheduledMessage
No documentation available
T
Message.VideoChatStartedMessage
No documentation available
T
Message.VideoMessage
No documentation available
T
Message.VideoNoteMessage
No documentation available
T
Message.VoiceMessage
No documentation available
T
Message.WebAppDataMessage
No documentation available
T
Message.WriteAccessAllowedMessage
No documentation available

Usage

import { Message } from "types";