Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/grammy/types.ts>Message

The Telegram Bot Framework.
Very Popular
Go to Latest
interface Message
implements [Message.MediaMessage]
Re-export
import { type Message } from "https://deno.land/x/grammy@v1.10.1/types.ts";

Properties

optional
text: string

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

optional
entities: MessageEntity[]

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

optional
animation: Animation

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

optional
document: Document

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
video: Video

Message is a video, information about the video

optional
video_note: VideoNote

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

optional
location: Location

Message is a shared location, information about the location

optional
new_chat_members: User[]

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

optional
left_chat_member: User

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

optional
new_chat_photo: PhotoSize[]

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

optional
supergroup_chat_created: true

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.

optional
message_auto_delete_timer_changed: MessageAutoDeleteTimerChanged

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. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.

optional
migrate_from_chat_id: number

The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.

optional
pinned_message: ReplyMessage

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

optional
invoice: Invoice

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

optional
successful_payment: SuccessfulPayment

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

optional
connected_website: string

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

optional
passport_data: PassportData

Telegram Passport data

optional
proximity_alert_triggered: ProximityAlertTriggered

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

optional
video_chat_scheduled: VideoChatScheduled

Service message: video chat scheduled

optional
video_chat_started: VideoChatStarted

Service message: video chat started

optional
video_chat_ended: VideoChatEnded

Service message: video chat ended

optional
video_chat_participants_invited: VideoChatParticipantsInvited

Service message: new participants invited to a video chat

optional
web_app_data: WebAppData

Service message: data sent by a Web App