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

x/grammy_types/message.ts

Type declarations of the Telegram Bot API.
Go to Latest
import * as grammyTypes from "https://deno.land/x/grammy_types@v3.5.1/message.ts";

Interfaces

This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).

This object represents an audio file to be treated as music by the Telegram clients.

This object represents a service message about a user boosting a chat.

This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.

This object represents a phone contact.

This object represents an animated emoji that displays a random value.

This object represents a general file (as opposed to photos, voice messages and audio files).

This object contains information about a message that is being replied to, which may come from another chat or forum topic.

This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.

This object represents a service message about a forum topic closed in the chat. Currently holds no information.

This object represents a service message about a new forum topic created in the chat.

This object represents a service message about an edited forum topic.

This object represents a service message about a forum topic reopened in the chat. Currently holds no information.

This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.

This object represents one row of the high scores table for a game.

This object represents a service message about General forum topic hidden in the chat. Currently holds no information.

This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.

This object represents a message about a scheduled giveaway.

This object represents a service message about the completion of a giveaway without public winners.

This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.

This object represents a message about the completion of a giveaway with public winners.

This object describes a message that was deleted or is otherwise inaccessible to the bot.

Describes the options used for link preview generation.

This object represents a point on the map.

This object describes the position on faces where a mask should be placed by default.

This object represents a service message about a change in auto-delete timer settings.

This object represents a unique message identifier.

The message was originally sent to a channel chat.

The message was originally sent on behalf of a chat to a group chat.

The message was originally sent by an unknown user.

The message was originally sent by a known user.

This object represents reaction changes on a message with anonymous reactions.

This object represents a change of a reaction on a message performed by a user.

This object represents one size of a photo or a file / sticker thumbnail.

This object contains information about a poll.

This object represents an answer of a user in a non-anonymous poll.

This object contains information about one answer option in a poll.

This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.

Represents a reaction added to a message along with the number of times it was added.

The reaction is based on a custom emoji.

The reaction is based on an emoji.

Describes reply parameters for the message that is being sent.

Describes an inline message sent by a Web App on behalf of a user.

This object represents a sticker.

This object represents a sticker set.

This object represents a story.

This object contains information about the quoted part of a message that is replied to by the given message.

This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUsers button.

This object represents a venue.

This object represents a video file.

This object represents a service message about a video chat ended in the chat.

This object represents a service message about new members invited to a video chat.

This object represents a service message about a video chat scheduled in the chat.

This object represents a service message about a video chat started in the chat. Currently holds no information.

This object represents a video message (available in Telegram apps as of v.4.0).

This object represents a voice note.

Describes data sent from a Web App to the bot.

This object represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess.

Type Aliases

This object describes a message that can be inaccessible to the bot. It can be one of

  • Message
  • InaccessibleMessage

This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.

This object describes the origin of a message. It can be one of

  • MessageOriginUser
  • MessageOriginHiddenUser
  • MessageOriginChat
  • MessageOriginChannel

The Bot API supports basic formatting for messages. You can use bold, italic, underlined, strikethrough, spoiler text, block quotations as well as inline links and pre-formatted code in your bots' messages. Telegram clients will render them accordingly. You can specify text entities directly, or use markdown-style or HTML-style formatting.

This object describes the type of a reaction. Currently, it can be one of