Skip to content

TypeScript Types

VibeGram provides 32+ TypeScript interfaces for type-safe development. All types are exported from the main package.

typescript
import { Update, Message, User, Chat, ChatFullInfo, CallbackQuery, ... } from 'vibegram';

Core Types

InterfaceDescription
UpdateIncoming update from Telegram
MessageA message object
UserA Telegram user
ChatCompact chat identity from updates
ChatFullInfoFull chat metadata returned by getChat
CallbackQueryInline button callback
InlineQueryInline mode query

Media Types

InterfaceDescription
PhotoSizePhoto with dimensions
AudioAudio file (music)
DocumentGeneral file
VideoVideo file
VoiceVoice note (OGG/Opus)
VideoNoteCircular video message
AnimationGIF or H.264 animation
StickerSticker with emoji and set info
ContactPhone contact
LocationGeographic coordinates

Interactive Types

InterfaceDescription
PollPoll with options and settings
PollOptionSingle poll option
DiceAnimated dice with emoji and value
VenueVenue with location
GameGame object
WebAppDataData sent from Mini App

Keyboard Types

InterfaceDescription
InlineKeyboardButtonInline keyboard button
InlineKeyboardMarkupInline keyboard layout
ChatPermissionsChat permission flags

Entity Types

InterfaceDescription
MessageEntityText entity (bold, link, command, etc.)

Supported entity types: mention, hashtag, cashtag, bot_command, url, email, phone_number, bold, italic, underline, strikethrough, spoiler, code, pre, text_link, text_mention, custom_emoji, blockquote, expandable_blockquote, date_time

Update Types

InterfaceDescription
ChatMemberUpdatedMember status change
ChatJoinRequestJoin request
ShippingQueryPayment shipping query
PreCheckoutQueryPayment pre-checkout
ChatBoostUpdatedChat boost event
ChatBoostRemovedChat boost removed

Extra Types (Request Parameters)

InterfaceDescription
ExtraReplyMessageOptions for text messages
ExtraMediaOptions for media messages
ExtraEditMessageOptions for editing messages
BotOptionsBot constructor options
UpdateTypeUnion of all update type strings

Released under the ISC License.