Options
All
  • Public
  • Public/Protected
  • All
Menu

Module telegram/components

Index

Component

Props

Other

Component

Send a animation by a file_id alreay uploaded, a external url or uploading a new file.

props

AnimationProps

guides

Check official reference.

Send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert.

props

AnswerCallbackQueryProps

guides

Check official reference.

Send answers to an inline query

props

AnswerInlineQueryProps

guides

Check official reference.

Send answers to an inline query

props

AnswerInlineQueryProps

guides

Check official reference.

Send answers to an inline query

props

AnswerInlineQueryProps

guides

Check official reference.

Send a audio by a file_id alreay uploaded, a external url or uploading a new file.

props

AudioProps

guides

Check official reference.

A CallbackQueryEvent will be triggered when button is pressed.

props

CallbackButtonProps

guides

Check official reference.

Inform user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status).

props

ChatActionProps

guides

Check official reference.

Send a location point on the map.

props

ContactProps

guides

Check official reference.

The user's phone number will be sent as a contact when the button is pressed. Available in private chats only

props

ContactReplyProps

guides

Check official reference.

Delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.

props

{}

guides

Check official reference.

DeleteChatStickerSet: TelegramComponent<{}, UnitSegment<TelegramSegmentValue>> = ...

Leave a group, supergroup or channel.

props

{}

guides

Check official reference.

Edit a text and game message

props

DeleteMessageProps

guides

Check official reference.

Send a location point on the map.

props

DiceProps

guides

Check official reference.

Send a document by a file_id alreay uploaded, a external url or uploading a new file.

props

DocumentProps

guides

Check official reference.

Edit captions of a media messages

props

EditCaptionProps

guides

Check official reference.

Edit a sent live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by StopLiveLocation.

props

EditLiveLocationProps

guides

Check official reference.

Edit a animation, audio, document, photo, or video messages. If a message is a part of a message album, then it can be edited only to a photo or a video. Otherwise, message type can be changed arbitrarily. When inline message is edited, new file can't be uploaded. Use previously uploaded file via its file_id or specify a URL.

props

EditMediaProps

guides

Check official reference.

Edit a text and game message

props

EditTextProps

guides

Check official reference.

Control options including disableNotification, parseMode of a group of messages. Or add a replyMarkup at the last message in the Expression.

props

ExpressionProps

Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use oneTimeBeyboard in ReplyKeyboard)

props

ForceReplyProps

guides

Check official reference.

Forward messages of any kind

props

ForwardMessageProps

guides

Check official reference.

Send a location point on the map.

props

GameProps

guides

Check official reference.

Description of the game that will be launched when the user presses the button. This type of button must always be the first button in the first row.

props

GameButtonProps

guides

Check official reference.

props

InlineKeyboardProps

guides

Check official reference.

InlineQueryResultArticle: TelegramComponent<InlineQueryResultArticleProps, PartSegment<any>> = ...

Represents a link to an article or web page.

props

{@link InlineQueryResultArticleProps}

guides

Check official reference.

InlineQueryResultAudio: TelegramComponent<InlineQueryResultAudioProps, PartSegment<any>> = ...

Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use inputMessageContent to send a message with the specified content instead of the audio.

props

{@link InlineQueryResultAudioProps}

guides

Check official reference.

InlineQueryResultContact: TelegramComponent<InlineQueryResultContactProps, PartSegment<any>> = ...

Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use inputMessageContent to send a message with the specified content instead of the contact.

props

{@link InlineQueryResultContactProps}

guides

Check official reference.

InlineQueryResultDocument: TelegramComponent<InlineQueryResultDocumentProps, PartSegment<any>> = ...

Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use inputMessageContent to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method.

props

{@link InlineQueryResultDocumentProps}

guides

Check official reference.

InlineQueryResultGame: TelegramComponent<InlineQueryResultGameProps, PartSegment<any>> = ...

Represents a Game.

props

InlineQueryResultGameProps

guides

Check official reference.

InlineQueryResultGif: TelegramComponent<InlineQueryResultGifProps, PartSegment<any>> = ...

Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use inputMessageContent to send a message with the specified content instead of the animation.

props

{@link InlineQueryResultGifProps}

guides

Check official reference.

InlineQueryResultLocation: TelegramComponent<InlineQueryResultLocationProps, PartSegment<any>> = ...

Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use inputMessageContent to send a message with the specified content instead of the location.

props

{@link InlineQueryResultLocationProps}

guides

Check official reference.

InlineQueryResultMpeg4Gif: TelegramComponent<InlineQueryResultMpeg4GifProps, PartSegment<any>> = ...

Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use inputMessageContent to send a message with the specified content instead of the animation.

props

{@link InlineQueryResultMpeg4GifProps}

guides

Check official reference.

InlineQueryResultPhoto: TelegramComponent<InlineQueryResultPhotoProps, PartSegment<any>> = ...

Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use inputMessageContent to send a message with the specified content instead of the photo.

props

{@link InlineQueryResultPhotoProps}

guides

Check official reference.

InlineQueryResultSticker: TelegramComponent<InlineQueryResultStickerProps, PartSegment<any>> = ...

Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use inputMessageContent to send a message with the specified content instead of the sticker.

props

{@link InlineQueryResultStickerProps}

guides

Check official reference.

InlineQueryResultVenue: TelegramComponent<InlineQueryResultVenueProps, PartSegment<any>> = ...

Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use inputMessageContent to send a message with the specified content instead of the venue.

props

{@link InlineQueryResultVenueProps}

guides

Check official reference.

InlineQueryResultVideo: TelegramComponent<InlineQueryResultVideoProps, PartSegment<any>> = ...

Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use inputMessageContent to send a message with the specified content instead of the video.

props

{@link InlineQueryResultVideoProps}

guides

Check official reference.

InlineQueryResultVoice: TelegramComponent<InlineQueryResultVoiceProps, PartSegment<any>> = ...

Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use inputMessageContent to send a message with the specified content instead of the the voice message.

props

{@link InlineQueryResultVoiceProps}

guides

Check official reference.

Send a location point on the map.

props

InvoiceProps

guides

Check official reference.

Represent a row of buttons within InlineKeyboard or ReplyKeyboard.

props

KeyboardRowProps

guides

Check official reference.

Kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.

props

KickChatMemberProps

guides

Check official reference.

Leave a group, supergroup or channel.

props

{}

guides

Check official reference.

Send a location point on the map.

props

LocationProps

guides

Check official reference.

The user's current location will be sent when the button is pressed. Available in private chats only

props

LocationReplyProps

guides

Check official reference.

Send a video note by a file_id alreay uploaded, a external url or uploading a new file.

props

MediaGroupProps

guides

Check official reference.

Description of the game that will be launched when the user presses the button. This type of button must always be the first button in the first row.

props

PayButtonProps

guides

Check official reference.

Send a photo by a file_id alreay uploaded, a external url or uploading a new file.

props

PhotoProps

guides

Check official reference.

Pin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel.

props

PinChatMessageProps

guides

Check official reference.

Send a location point on the map.

props

PollProps

guides

Check official reference.

The user will be asked to create a poll and send it to the bot when the button is pressed. Available in private chats only

props

PollReplyProps

guides

Check official reference.

Promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass False for all boolean parameters to demote a user.

props

PromoteChatMemberProps

guides

Check official reference.

RemoveReplyKeyboard: TelegramComponent<RemoveReplyKeyboardProps, PartSegment<any>> = ...

Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use oneTimeBeyboard in ReplyKeyboard)

props

RemoveReplyKeyboardProps

guides

Check official reference.

props

ReplyKeyboardProps

guides

Check official reference.

Restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass True for all permissions to lift restrictions from a user.

props

RestrictChatMemberProps

guides

Check official reference.

Set a custom title for an administrator in a supergroup promoted by the bot.

props

SetChatAdministratorCustomTitleProps

guides

Check official reference.

Change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.

props

SetChatDescriptionProps

guides

Check official reference.

Set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members admin rights.

props

ChatPromotionProps

guides

Check official reference.

Set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.

props

SetChatPhotoProps

guides

Check official reference.

Change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.

props

SetChatStickerSetProps

guides

Check official reference.

Change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.

props

SetChatTitleProps

guides

Check official reference.

Send static .WEBP or animated .TGS stickers

props

StickerProps

guides

Check official reference.

Stop a sent live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by StopLiveLocation.

props

StopLiveLocationProps

guides

Check official reference.

Edit a text and game message

props

StopPollProps

guides

Check official reference.

SwitchQueryButton: TelegramComponent<SwitchQueryButtonProps, PartSegment<any>> = ...

Pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field.

props

SwitchQueryButtonProps

guides

Check official reference.

Send a location point on the map.

props

TextProps

guides

Check official reference.

Text of button will be sent as a message by the user when the button is pressed

props

TextReplyProps

guides

Check official reference.

Unban a previously kicked user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work.

props

UnbanChatMemberProps

guides

Check official reference.

UnpinChatMessage: TelegramComponent<{}, UnitSegment<TelegramSegmentValue>> = ...

Unpin a message in a group, a supergroup, or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel.

props

{}

guides

Check official reference.

The url will be opened by the client when button is pressed. If login is set, the authorization data will be provided within querystrings. The login mode is an easier replacement for the Telegram Login Widget.

props

UrlButtonProps

guides

Check official reference.

Send a location point on the map.

props

VenueProps

guides

Check official reference.

Send a video by a file_id alreay uploaded, a external url or uploading a new file.

props

VideoProps

guides

Check official reference.

Send a video note by a file_id alreay uploaded, a external url or uploading a new file.

props

VideoNoteProps

guides

Check official reference.

Send a voice by a file_id alreay uploaded, a external url or uploading a new file.

props

VoiceProps

guides

Check official reference.

Other

InlineButton: typeof UrlButton | typeof CallbackButton | typeof GameButton | typeof SwitchQueryButton | typeof PayButton
MessageProps: { disableNotification?: boolean; replyMarkup?: SociablyNode; replyToMessageId?: number }

Type declaration

  • Optional disableNotification?: boolean

    Sends the message silently. Users will receive a notification with no sound.

  • Optional replyMarkup?: SociablyNode

    One ReplyMarkup element for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

  • Optional replyToMessageId?: number

    If the message is a reply, ID of the original message

ReplyButton: typeof TextReply | typeof LocationReply | typeof ContactReply | typeof PollReply
ReplyMarkup: typeof InlineKeyboard | typeof ReplyKeyboard | typeof RemoveReplyKeyboard | typeof ForceReply

Generated using TypeDoc