telega/model/types
This module contains all types from Telegram Bot API.
Most of types named in the same way as in the official documentation.
But some types are renamed to more verbose names for using from Gleam code (ex. type -> type_).
Types
Official reference: This object describes the types of gifts that can be gifted to a user or a chat.
pub type AcceptedGiftTypes {
AcceptedGiftTypes(
unlimited_gifts: Bool,
limited_gifts: Bool,
unique_gifts: Bool,
premium_subscription: Bool,
gifts_from_channels: Bool,
)
}
Constructors
-
AcceptedGiftTypes( unlimited_gifts: Bool, limited_gifts: Bool, unique_gifts: Bool, premium_subscription: Bool, gifts_from_channels: Bool, )Arguments
- unlimited_gifts
-
True, if unlimited regular gifts are accepted
- limited_gifts
-
True, if limited regular gifts are accepted
- unique_gifts
-
True, if unique gifts or gifts that can be upgraded to unique for free are accepted
- premium_subscription
-
True, if a Telegram Premium subscription is accepted
- gifts_from_channels
-
True, if transfers of unique gifts from channels are accepted
pub type AddStickerToSetParameters {
AddStickerToSetParameters(
user_id: Int,
name: String,
sticker: InputSticker,
)
}
Constructors
-
AddStickerToSetParameters( user_id: Int, name: String, sticker: InputSticker, )Arguments
- user_id
-
User identifier of sticker set owner
- name
-
Sticker set name
- sticker
-
A JSON-serialized object with information about the added sticker
Official reference: Contains information about the affiliate that received a commission via this transaction.
pub type AffiliateInfo {
AffiliateInfo(
affiliate_user: option.Option(User),
affiliate_chat: option.Option(Chat),
commission_per_mille: Int,
amount: Int,
nanostar_amount: option.Option(Int),
)
}
Constructors
-
AffiliateInfo( affiliate_user: option.Option(User), affiliate_chat: option.Option(Chat), commission_per_mille: Int, amount: Int, nanostar_amount: option.Option(Int), )Arguments
- affiliate_user
-
Optional. The bot or the user that received an affiliate commission if it was received by a bot or a user
- affiliate_chat
-
Optional. The chat that received an affiliate commission if it was received by a chat
- commission_per_mille
-
The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users
- amount
-
Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds
- nanostar_amount
-
Optional. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds
Official reference: This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
pub type Animation {
Animation(
file_id: String,
file_unique_id: String,
width: Int,
height: Int,
duration: Int,
thumbnail: option.Option(PhotoSize),
file_name: option.Option(String),
mime_type: option.Option(String),
file_size: option.Option(Int),
)
}
Constructors
-
Animation( file_id: String, file_unique_id: String, width: Int, height: Int, duration: Int, thumbnail: option.Option(PhotoSize), file_name: option.Option(String), mime_type: option.Option(String), file_size: option.Option(Int), )Arguments
- file_id
-
Identifier for this file, which can be used to download or reuse the file
- file_unique_id
-
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can’t be used to download or reuse the file.
- width
-
Video width as defined by the sender
- height
-
Video height as defined by the sender
- duration
-
Duration of the video in seconds as defined by the sender
- thumbnail
-
Optional. Animation thumbnail as defined by the sender
- file_name
-
Optional. Original animation filename as defined by the sender
- mime_type
-
Optional. MIME type of the file as defined by the sender
- file_size
-
Optional. File size in bytes. It can be bigger than 2^31 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 value.
pub type AnswerCallbackQueryParameters {
AnswerCallbackQueryParameters(
callback_query_id: String,
text: option.Option(String),
show_alert: option.Option(Bool),
url: option.Option(String),
cache_time: option.Option(Int),
)
}
Constructors
-
AnswerCallbackQueryParameters( callback_query_id: String, text: option.Option(String), show_alert: option.Option(Bool), url: option.Option(String), cache_time: option.Option(Int), )Arguments
- callback_query_id
-
Unique identifier for the query to be answered
- text
-
Text of the notification. If not specified, nothing will be shown to the user
- show_alert
-
If true, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.
- url
-
URL that will be opened by the user’s client. If you have created a Game, you can use this field to redirect the player to your game
- cache_time
-
The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.
Parameters for answerChatJoinRequestQuery (Bot API 10.2).
pub type AnswerChatJoinRequestQueryParameters {
AnswerChatJoinRequestQueryParameters(
chat_join_request_query_id: String,
result: String,
)
}
Constructors
-
AnswerChatJoinRequestQueryParameters( chat_join_request_query_id: String, result: String, )Arguments
- chat_join_request_query_id
-
Unique identifier of the join request query as returned in
ChatJoinRequest.query_id - result
-
Result of the join request query, one of “approved”, “declined” or “default”
Parameters for answerGuestQuery (Bot API 10.0).
pub type AnswerGuestQueryParameters {
AnswerGuestQueryParameters(
guest_query_id: String,
text: String,
parse_mode: option.Option(String),
entities: option.Option(List(MessageEntity)),
link_preview_options: option.Option(LinkPreviewOptions),
reply_markup: option.Option(InlineKeyboardMarkup),
)
}
Constructors
-
AnswerGuestQueryParameters( guest_query_id: String, text: String, parse_mode: option.Option(String), entities: option.Option(List(MessageEntity)), link_preview_options: option.Option(LinkPreviewOptions), reply_markup: option.Option(InlineKeyboardMarkup), )Arguments
- guest_query_id
-
Unique identifier of the guest query as returned in
Message.guest_query_id - text
-
Text of the message to be sent, 0-4096 characters
- parse_mode
-
Optional. Mode for parsing entities in the message text
- entities
-
Optional. A JSON-serialized list of special entities that appear in the message text
- link_preview_options
-
Optional. Link preview generation options for the message
- reply_markup
-
Optional. Additional interface options. A JSON-serialized object for an inline keyboard
pub type AnswerInlineQueryParameters {
AnswerInlineQueryParameters(
inline_query_id: String,
results: List(InlineQueryResult),
cache_time: option.Option(Int),
is_personal: option.Option(Bool),
next_offset: option.Option(String),
button: option.Option(InlineQueryResultsButton),
)
}
Constructors
-
AnswerInlineQueryParameters( inline_query_id: String, results: List(InlineQueryResult), cache_time: option.Option(Int), is_personal: option.Option(Bool), next_offset: option.Option(String), button: option.Option(InlineQueryResultsButton), )Arguments
- inline_query_id
-
Unique identifier for the answered query
- results
-
A JSON-serialized array of results for the inline query
- cache_time
-
The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.
- is_personal
-
Pass
Trueif results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query. - next_offset
-
Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don’t support pagination. Offset length can’t exceed 64 bytes.
- button
-
A JSON-serialized object describing a button to be shown above inline query results
pub type AnswerPreCheckoutQueryParameters {
AnswerPreCheckoutQueryParameters(
pre_checkout_query_id: String,
ok: Bool,
error_message: option.Option(String),
)
}
Constructors
-
AnswerPreCheckoutQueryParameters( pre_checkout_query_id: String, ok: Bool, error_message: option.Option(String), )Arguments
- pre_checkout_query_id
-
Unique identifier for the query to be answered
- ok
-
Specify True if everything is alright and the bot is ready to proceed with the order. Use False if there are any problems.
- error_message
-
Required if ok is False. Error message in human readable form that explains the reason for failure to proceed with the checkout
pub type AnswerShippingQueryParameters {
AnswerShippingQueryParameters(
shipping_query_id: String,
ok: Bool,
shipping_options: option.Option(List(ShippingOption)),
error_message: option.Option(String),
)
}
Constructors
-
AnswerShippingQueryParameters( shipping_query_id: String, ok: Bool, shipping_options: option.Option(List(ShippingOption)), error_message: option.Option(String), )Arguments
- shipping_query_id
-
Unique identifier for the query to be answered
- ok
-
Pass True if delivery to the specified address is possible and False if there are any problems
- shipping_options
-
Required if ok is True. A JSON-serialized array of available shipping options.
- error_message
-
Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order
pub type ApproveChatJoinRequestParameters {
ApproveChatJoinRequestParameters(
chat_id: IntOrString,
user_id: Int,
)
}
Constructors
-
ApproveChatJoinRequestParameters( chat_id: IntOrString, user_id: Int, )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel (in the format
@channelusername) - user_id
-
Unique identifier of the target user
Official reference: This object represents an audio file to be treated as music by the Telegram clients.
pub type Audio {
Audio(
file_id: String,
file_unique_id: String,
duration: Int,
performer: option.Option(String),
title: option.Option(String),
file_name: option.Option(String),
mime_type: option.Option(String),
file_size: option.Option(Int),
thumbnail: option.Option(PhotoSize),
)
}
Constructors
-
Audio( file_id: String, file_unique_id: String, duration: Int, performer: option.Option(String), title: option.Option(String), file_name: option.Option(String), mime_type: option.Option(String), file_size: option.Option(Int), thumbnail: option.Option(PhotoSize), )Arguments
- file_id
-
Identifier for this file, which can be used to download or reuse the file
- file_unique_id
-
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can’t be used to download or reuse the file.
- duration
-
Duration of the audio in seconds as defined by the sender
- performer
-
Optional. Performer of the audio as defined by the sender or by audio tags
- title
-
Optional. Title of the audio as defined by the sender or by audio tags
- file_name
-
Optional. Original filename as defined by the sender
- mime_type
-
Optional. MIME type of the file as defined by the sender
- file_size
-
Optional. File size in bytes. It can be bigger than 2^31 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 value.
- thumbnail
-
Optional. Thumbnail of the album cover to which the music file belongs
pub type BackgroundFill {
BackgroundFillSolidBackgroundFill(BackgroundFillSolid)
BackgroundFillGradientBackgroundFill(BackgroundFillGradient)
BackgroundFillFreeformGradientBackgroundFill(
BackgroundFillFreeformGradient,
)
}
Constructors
-
BackgroundFillSolidBackgroundFill(BackgroundFillSolid) -
BackgroundFillGradientBackgroundFill(BackgroundFillGradient) -
BackgroundFillFreeformGradientBackgroundFill( BackgroundFillFreeformGradient, )
Official reference: The background is a freeform gradient that rotates after every message in the chat.
pub type BackgroundFillFreeformGradient {
BackgroundFillFreeformGradient(
type_: String,
colors: List(Int),
)
}
Constructors
-
BackgroundFillFreeformGradient(type_: String, colors: List(Int))Arguments
- type_
-
Type of the background fill, always “freeform_gradient”
- colors
-
A list of the 3 or 4 base colors that are used to generate the freeform gradient in the RGB24 format
Official reference: The background is a gradient fill.
pub type BackgroundFillGradient {
BackgroundFillGradient(
type_: String,
top_color: Int,
bottom_color: Int,
rotation_angle: Int,
)
}
Constructors
-
BackgroundFillGradient( type_: String, top_color: Int, bottom_color: Int, rotation_angle: Int, )Arguments
- type_
-
Type of the background fill, always “gradient”
- top_color
-
Top color of the gradient in the RGB24 format
- bottom_color
-
Bottom color of the gradient in the RGB24 format
- rotation_angle
-
Clockwise rotation angle of the background fill in degrees; 0-359
Official reference: The background is filled using the selected color.
pub type BackgroundFillSolid {
BackgroundFillSolid(type_: String, color: Int)
}
Constructors
-
BackgroundFillSolid(type_: String, color: Int)Arguments
- type_
-
Type of the background fill, always “solid”
- color
-
The color of the background fill in the RGB24 format
pub type BackgroundType {
BackgroundTypeFillBackgroundType(BackgroundTypeFill)
BackgroundTypeWallpaperBackgroundType(BackgroundTypeWallpaper)
BackgroundTypePatternBackgroundType(BackgroundTypePattern)
BackgroundTypeChatThemeBackgroundType(BackgroundTypeChatTheme)
}
Constructors
-
BackgroundTypeFillBackgroundType(BackgroundTypeFill) -
BackgroundTypeWallpaperBackgroundType(BackgroundTypeWallpaper) -
BackgroundTypePatternBackgroundType(BackgroundTypePattern) -
BackgroundTypeChatThemeBackgroundType(BackgroundTypeChatTheme)
Official reference: The background is taken directly from a built-in chat theme.
pub type BackgroundTypeChatTheme {
BackgroundTypeChatTheme(type_: String, theme_name: String)
}
Constructors
-
BackgroundTypeChatTheme(type_: String, theme_name: String)Arguments
- type_
-
Type of the background, always “chat_theme”
- theme_name
-
Name of the chat theme, which is usually an emoji
Official reference: The background is automatically filled based on the selected colors.
pub type BackgroundTypeFill {
BackgroundTypeFill(
type_: String,
fill: BackgroundFill,
dark_theme_dimming: Int,
)
}
Constructors
-
BackgroundTypeFill( type_: String, fill: BackgroundFill, dark_theme_dimming: Int, )Arguments
- type_
-
Type of the background, always “fill”
- fill
-
The background fill
- dark_theme_dimming
-
Dimming of the background in dark themes, as a percentage; 0-100
Official reference: The background is a .PNG or .TGV (gzipped subset of SVG with MIME type “application/x-tgwallpattern”) pattern to be combined with the background fill chosen by the user.
pub type BackgroundTypePattern {
BackgroundTypePattern(
type_: String,
document: Document,
fill: BackgroundFill,
intensity: Int,
is_inverted: option.Option(Bool),
is_moving: option.Option(Bool),
)
}
Constructors
-
BackgroundTypePattern( type_: String, document: Document, fill: BackgroundFill, intensity: Int, is_inverted: option.Option(Bool), is_moving: option.Option(Bool), )Arguments
- type_
-
Type of the background, always “pattern”
- document
-
Document with the pattern
- fill
-
The background fill that is combined with the pattern
- intensity
-
Intensity of the pattern when it is shown above the filled background; 0-100
- is_inverted
-
Optional. True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only.
- is_moving
-
Optional. True, if the background moves slightly when the device is tilted
Official reference: The background is a wallpaper in the JPEG format.
pub type BackgroundTypeWallpaper {
BackgroundTypeWallpaper(
type_: String,
document: Document,
dark_theme_dimming: Int,
is_blurred: option.Option(Bool),
is_moving: option.Option(Bool),
)
}
Constructors
-
BackgroundTypeWallpaper( type_: String, document: Document, dark_theme_dimming: Int, is_blurred: option.Option(Bool), is_moving: option.Option(Bool), )Arguments
- type_
-
Type of the background, always “wallpaper”
- document
-
Document with the wallpaper
- dark_theme_dimming
-
Dimming of the background in dark themes, as a percentage; 0-100
- is_blurred
-
Optional. True, if the wallpaper is downscaled to fit in a 450x450 square and then box-blurred with radius 12
- is_moving
-
Optional. True, if the background moves slightly when the device is tilted
pub type BanChatMemberParameters {
BanChatMemberParameters(
chat_id: IntOrString,
user_id: Int,
until_date: option.Option(Int),
revoke_messages: option.Option(Bool),
)
}
Constructors
-
BanChatMemberParameters( chat_id: IntOrString, user_id: Int, until_date: option.Option(Int), revoke_messages: option.Option(Bool), )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel (in the format
@channelusername) - user_id
-
Unique identifier of the target user
- until_date
-
Date when the user will be unbanned; Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Applied for supergroups and channels only.
- revoke_messages
-
Pass
Trueto delete all messages from the chat for the user that is being removed. IfFalse, the user will be able to see messages in the group that were sent before the user was removed. AlwaysTruefor supergroups and channels.
pub type BanChatSenderChatParameters {
BanChatSenderChatParameters(
chat_id: IntOrString,
sender_chat_id: Int,
)
}
Constructors
-
BanChatSenderChatParameters( chat_id: IntOrString, sender_chat_id: Int, )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel (in the format
@channelusername) - sender_chat_id
-
Unique identifier of the target sender chat
Official reference: Describes the birthdate of a user.
pub type Birthdate {
Birthdate(day: Int, month: Int, year: option.Option(Int))
}
Constructors
-
Birthdate(day: Int, month: Int, year: option.Option(Int))Arguments
- day
-
Day of the user’s birth; 1-31
- month
-
Month of the user’s birth; 1-12
- year
-
Optional. Year of the user’s birth
Official reference: This object describes the access settings of a bot.
pub type BotAccessSettings {
BotAccessSettings(
is_access_restricted: Bool,
added_users: option.Option(List(User)),
)
}
Constructors
-
BotAccessSettings( is_access_restricted: Bool, added_users: option.Option(List(User)), )Arguments
- is_access_restricted
-
True, if only selected users can access the bot. The bot’s owner can always access it.
- added_users
-
Optional. The list of other users who have access to the bot if the access is restricted
Official reference: This object represents a bot command.
pub type BotCommand {
BotCommand(
command: String,
description: String,
is_ephemeral: option.Option(Bool),
)
}
Constructors
-
BotCommand( command: String, description: String, is_ephemeral: option.Option(Bool), )Arguments
- command
-
Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.
- description
-
Description of the command; 1-256 characters
- is_ephemeral
-
Optional. True, if the command sends an ephemeral message, which can be seen only by the sender of the message and the bot
pub type BotCommandParameters {
BotCommandParameters(
scope: option.Option(BotCommandScope),
language_code: option.Option(String),
)
}
Constructors
-
BotCommandParameters( scope: option.Option(BotCommandScope), language_code: option.Option(String), )Arguments
- scope
-
An object, describing scope of users for which the commands are relevant. Defaults to
BotCommandScopeDefault. - language_code
-
A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands
pub type BotCommandScope {
BotCommandScopeDefaultBotCommandScope(BotCommandScopeDefault)
BotCommandScopeAllPrivateChatsBotCommandScope(
BotCommandScopeAllPrivateChats,
)
BotCommandScopeAllGroupChatsBotCommandScope(
BotCommandScopeAllGroupChats,
)
BotCommandScopeAllChatAdministratorsBotCommandScope(
BotCommandScopeAllChatAdministrators,
)
BotCommandScopeChatBotCommandScope(BotCommandScopeChat)
BotCommandScopeChatAdministratorsBotCommandScope(
BotCommandScopeChatAdministrators,
)
BotCommandScopeChatMemberBotCommandScope(
BotCommandScopeChatMember,
)
}
Constructors
-
BotCommandScopeDefaultBotCommandScope(BotCommandScopeDefault) -
BotCommandScopeAllPrivateChatsBotCommandScope( BotCommandScopeAllPrivateChats, ) -
BotCommandScopeAllGroupChatsBotCommandScope( BotCommandScopeAllGroupChats, ) -
BotCommandScopeAllChatAdministratorsBotCommandScope( BotCommandScopeAllChatAdministrators, ) -
BotCommandScopeChatBotCommandScope(BotCommandScopeChat) -
BotCommandScopeChatAdministratorsBotCommandScope( BotCommandScopeChatAdministrators, ) -
BotCommandScopeChatMemberBotCommandScope( BotCommandScopeChatMember, )
Official reference: Represents the scope of bot commands, covering all group and supergroup chat administrators.
pub type BotCommandScopeAllChatAdministrators {
BotCommandScopeAllChatAdministrators(type_: String)
}
Constructors
-
BotCommandScopeAllChatAdministrators(type_: String)Arguments
- type_
-
Scope type, must be all_chat_administrators
Official reference: Represents the scope of bot commands, covering all group and supergroup chats.
pub type BotCommandScopeAllGroupChats {
BotCommandScopeAllGroupChats(type_: String)
}
Constructors
-
BotCommandScopeAllGroupChats(type_: String)Arguments
- type_
-
Scope type, must be all_group_chats
Official reference: Represents the scope of bot commands, covering all private chats.
pub type BotCommandScopeAllPrivateChats {
BotCommandScopeAllPrivateChats(type_: String)
}
Constructors
-
BotCommandScopeAllPrivateChats(type_: String)Arguments
- type_
-
Scope type, must be all_private_chats
Official reference: Represents the scope of bot commands, covering a specific chat.
pub type BotCommandScopeChat {
BotCommandScopeChat(type_: String, chat_id: IntOrString)
}
Constructors
-
BotCommandScopeChat(type_: String, chat_id: IntOrString)Arguments
- type_
-
Scope type, must be chat
- chat_id
-
Unique identifier for the target chat or username of the target supergroup in the format @username. Channel direct messages chats and channel chats aren’t supported.
Official reference: Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.
pub type BotCommandScopeChatAdministrators {
BotCommandScopeChatAdministrators(
type_: String,
chat_id: IntOrString,
)
}
Constructors
-
BotCommandScopeChatAdministrators( type_: String, chat_id: IntOrString, )Arguments
- type_
-
Scope type, must be chat_administrators
- chat_id
-
Unique identifier for the target chat or username of the target supergroup in the format @username. Channel direct messages chats and channel chats aren’t supported.
Official reference: Represents the scope of bot commands, covering a specific member of a group or supergroup chat.
pub type BotCommandScopeChatMember {
BotCommandScopeChatMember(
type_: String,
chat_id: IntOrString,
user_id: Int,
)
}
Constructors
-
BotCommandScopeChatMember( type_: String, chat_id: IntOrString, user_id: Int, )Arguments
- type_
-
Scope type, must be chat_member
- chat_id
-
Unique identifier for the target chat or username of the target supergroup in the format @username. Channel direct messages chats and channel chats aren’t supported.
- user_id
-
Unique identifier of the target user
Official reference: Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.
pub type BotCommandScopeDefault {
BotCommandScopeDefault(type_: String)
}
Constructors
-
BotCommandScopeDefault(type_: String)Arguments
- type_
-
Scope type, must be default
Official reference: This object represents the bot’s description.
pub type BotDescription {
BotDescription(description: String)
}
Constructors
-
BotDescription(description: String)Arguments
- description
-
The bot’s description
Official reference: This object represents the bot’s name.
pub type BotName {
BotName(name: String)
}
Constructors
-
BotName(name: String)Arguments
- name
-
The bot’s name
Official reference: This object represents the bot’s short description.
pub type BotShortDescription {
BotShortDescription(short_description: String)
}
Constructors
-
BotShortDescription(short_description: String)Arguments
- short_description
-
The bot’s short description
Official reference: This object contains information about changes to a user payment subscription toward the current bot.
pub type BotSubscriptionUpdated {
BotSubscriptionUpdated(
user: User,
invoice_payload: String,
state: String,
)
}
Constructors
-
BotSubscriptionUpdated( user: User, invoice_payload: String, state: String, )Arguments
- user
-
User who subscribed for payments toward the bot
- invoice_payload
-
Bot-specified invoice payload
- state
-
The new state of the subscription. Currently, it can be one of “canceled” if the user canceled the subscription, “active” if the user re-enabled a previously canceled subscription, or “failed” if payment for the subscription failed.
Official reference: Represents the rights of a business bot.
pub type BusinessBotRights {
BusinessBotRights(
can_reply: option.Option(Bool),
can_read_messages: option.Option(Bool),
can_delete_sent_messages: option.Option(Bool),
can_delete_all_messages: option.Option(Bool),
can_edit_name: option.Option(Bool),
can_edit_bio: option.Option(Bool),
can_edit_profile_photo: option.Option(Bool),
can_edit_username: option.Option(Bool),
can_change_gift_settings: option.Option(Bool),
can_view_gifts_and_stars: option.Option(Bool),
can_convert_gifts_to_stars: option.Option(Bool),
can_transfer_and_upgrade_gifts: option.Option(Bool),
can_transfer_stars: option.Option(Bool),
can_manage_stories: option.Option(Bool),
)
}
Constructors
-
BusinessBotRights( can_reply: option.Option(Bool), can_read_messages: option.Option(Bool), can_delete_sent_messages: option.Option(Bool), can_delete_all_messages: option.Option(Bool), can_edit_name: option.Option(Bool), can_edit_bio: option.Option(Bool), can_edit_profile_photo: option.Option(Bool), can_edit_username: option.Option(Bool), can_change_gift_settings: option.Option(Bool), can_view_gifts_and_stars: option.Option(Bool), can_convert_gifts_to_stars: option.Option(Bool), can_transfer_and_upgrade_gifts: option.Option(Bool), can_transfer_stars: option.Option(Bool), can_manage_stories: option.Option(Bool), )Arguments
- can_reply
-
Optional. True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours
- can_read_messages
-
Optional. True, if the bot can mark incoming private messages as read
- can_delete_sent_messages
-
Optional. True, if the bot can delete messages sent by the bot
- can_delete_all_messages
-
Optional. True, if the bot can delete all private messages in managed chats
- can_edit_name
-
Optional. True, if the bot can edit the first and last name of the business account
- can_edit_bio
-
Optional. True, if the bot can edit the bio of the business account
- can_edit_profile_photo
-
Optional. True, if the bot can edit the profile photo of the business account
- can_edit_username
-
Optional. True, if the bot can edit the username of the business account
- can_change_gift_settings
-
Optional. True, if the bot can change the privacy settings pertaining to gifts for the business account
- can_view_gifts_and_stars
-
Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by the business account
- can_convert_gifts_to_stars
-
Optional. True, if the bot can convert regular gifts owned by the business account to Telegram Stars
- can_transfer_and_upgrade_gifts
-
Optional. True, if the bot can transfer and upgrade gifts owned by the business account
- can_transfer_stars
-
Optional. True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts
- can_manage_stories
-
Optional. True, if the bot can post, edit and delete stories on behalf of the business account
Official reference: Describes the connection of the bot with a business account.
pub type BusinessConnection {
BusinessConnection(
id: String,
user: User,
user_chat_id: Int,
date: Int,
rights: option.Option(BusinessBotRights),
is_enabled: Bool,
)
}
Constructors
-
BusinessConnection( id: String, user: User, user_chat_id: Int, date: Int, rights: option.Option(BusinessBotRights), is_enabled: Bool, )Arguments
- id
-
Unique identifier of the business connection
- user
-
Business account user that created the business connection
- user_chat_id
-
Identifier of a private chat with the user who created the business connection. 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 64-bit integer or double-precision float type are safe for storing this identifier.
- date
-
Date the connection was established in Unix time
- rights
-
Optional. Rights of the business bot
- is_enabled
-
True, if the connection is active
Official reference: Contains information about the start page settings of a Telegram Business account.
pub type BusinessIntro {
BusinessIntro(
title: option.Option(String),
message: option.Option(String),
sticker: option.Option(Sticker),
)
}
Constructors
-
BusinessIntro( title: option.Option(String), message: option.Option(String), sticker: option.Option(Sticker), )Arguments
- title
-
Optional. Title text of the business intro
- message
-
Optional. Message text of the business intro
- sticker
-
Optional. Sticker of the business intro
Official reference: Contains information about the location of a Telegram Business account.
pub type BusinessLocation {
BusinessLocation(
address: String,
location: option.Option(Location),
)
}
Constructors
-
BusinessLocation( address: String, location: option.Option(Location), )Arguments
- address
-
Address of the business
- location
-
Optional. Location of the business
Official reference: This object is received when messages are deleted from a connected business account.
pub type BusinessMessagesDeleted {
BusinessMessagesDeleted(
business_connection_id: String,
chat: Chat,
message_ids: List(Int),
)
}
Constructors
-
BusinessMessagesDeleted( business_connection_id: String, chat: Chat, message_ids: List(Int), )Arguments
- business_connection_id
-
Unique identifier of the business connection
- chat
-
Information about a chat in the business account. The bot may not have access to the chat or the corresponding user.
- message_ids
-
The list of identifiers of deleted messages in the chat of the business account
Official reference: Describes the opening hours of a business.
pub type BusinessOpeningHours {
BusinessOpeningHours(
time_zone_name: String,
opening_hours: List(BusinessOpeningHoursInterval),
)
}
Constructors
-
BusinessOpeningHours( time_zone_name: String, opening_hours: List(BusinessOpeningHoursInterval), )Arguments
- time_zone_name
-
Unique name of the time zone for which the opening hours are defined
- opening_hours
-
List of time intervals describing business opening hours
Official reference: Describes an interval of time during which a business is open.
pub type BusinessOpeningHoursInterval {
BusinessOpeningHoursInterval(
opening_minute: Int,
closing_minute: Int,
)
}
Constructors
-
BusinessOpeningHoursInterval( opening_minute: Int, closing_minute: Int, )Arguments
- opening_minute
-
The minute’s sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60
- closing_minute
-
The minute’s sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60
Official reference: A placeholder, currently holds no information. Use BotFather to set up your game.
pub type CallbackGame {
CallbackGame
}
Constructors
-
CallbackGame
Official reference: This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.
pub type CallbackQuery {
CallbackQuery(
id: String,
from: User,
message: option.Option(MaybeInaccessibleMessage),
inline_message_id: option.Option(String),
chat_instance: String,
data: option.Option(String),
game_short_name: option.Option(String),
)
}
Constructors
-
CallbackQuery( id: String, from: User, message: option.Option(MaybeInaccessibleMessage), inline_message_id: option.Option(String), chat_instance: String, data: option.Option(String), game_short_name: option.Option(String), )Arguments
- id
-
Unique identifier for this query
- from
-
Sender
- message
-
Optional. Message sent by the bot with the callback button that originated the query
- inline_message_id
-
Optional. Identifier of the message sent via the bot in inline mode, that originated the query
- chat_instance
-
Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.
- data
-
Optional. Data associated with the callback button. Be aware that the message originated the query can contain no callback buttons with this data.
- game_short_name
-
Optional. Short name of a Game to be returned, serves as the unique identifier for the game
Official reference: This object represents a chat.
pub type Chat {
Chat(
id: Int,
type_: String,
title: option.Option(String),
username: option.Option(String),
first_name: option.Option(String),
last_name: option.Option(String),
is_forum: option.Option(Bool),
is_direct_messages: option.Option(Bool),
)
}
Constructors
-
Chat( id: Int, type_: String, title: option.Option(String), username: option.Option(String), first_name: option.Option(String), last_name: option.Option(String), is_forum: option.Option(Bool), is_direct_messages: option.Option(Bool), )Arguments
- id
-
Unique identifier for this chat. 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.
- type_
-
Type of the chat, can be either “private”, “group”, “supergroup” or “channel”
- title
-
Optional. Title, for supergroups, channels and group chats
- username
-
Optional. Username, for private chats, supergroups and channels if available
- first_name
-
Optional. First name of the other party in a private chat
- last_name
-
Optional. Last name of the other party in a private chat
- is_forum
-
Optional. True, if the supergroup chat is a forum (has topics enabled)
- is_direct_messages
-
Optional. True, if the chat is the direct messages chat of a channel
pub type ChatAction {
Typing
UploadPhoto
RecordVideo
UploadVideo
RecordVoice
UploadVoice
UploadDocument
ChooseSticker
FindLocation
RecordVideoNote
UploadVideoNote
}
Constructors
-
Typing -
UploadPhoto -
RecordVideo -
UploadVideo -
RecordVoice -
UploadVoice -
UploadDocument -
ChooseSticker -
FindLocation -
RecordVideoNote -
UploadVideoNote
Official reference: Represents the rights of an administrator in a chat.
pub type ChatAdministratorRights {
ChatAdministratorRights(
is_anonymous: Bool,
can_manage_chat: Bool,
can_delete_messages: Bool,
can_manage_video_chats: Bool,
can_restrict_members: Bool,
can_promote_members: Bool,
can_change_info: Bool,
can_invite_users: Bool,
can_post_stories: Bool,
can_edit_stories: Bool,
can_delete_stories: Bool,
can_post_messages: option.Option(Bool),
can_edit_messages: option.Option(Bool),
can_pin_messages: option.Option(Bool),
can_manage_topics: option.Option(Bool),
can_manage_direct_messages: option.Option(Bool),
can_manage_tags: option.Option(Bool),
)
}
Constructors
-
ChatAdministratorRights( is_anonymous: Bool, can_manage_chat: Bool, can_delete_messages: Bool, can_manage_video_chats: Bool, can_restrict_members: Bool, can_promote_members: Bool, can_change_info: Bool, can_invite_users: Bool, can_post_stories: Bool, can_edit_stories: Bool, can_delete_stories: Bool, can_post_messages: option.Option(Bool), can_edit_messages: option.Option(Bool), can_pin_messages: option.Option(Bool), can_manage_topics: option.Option(Bool), can_manage_direct_messages: option.Option(Bool), can_manage_tags: option.Option(Bool), )Arguments
- is_anonymous
-
True, if the user’s presence in the chat is hidden
- can_manage_chat
-
True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.
- can_delete_messages
-
True, if the administrator can delete messages of other users
- can_manage_video_chats
-
True, if the administrator can manage video chats
- can_restrict_members
-
True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics
- can_promote_members
-
True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)
- can_change_info
-
True, if the user is allowed to change the chat title, photo and other settings
- can_invite_users
-
True, if the user is allowed to invite new users to the chat
- can_post_stories
-
True, if the administrator can post stories to the chat
- can_edit_stories
-
True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat’s story archive
- can_delete_stories
-
True, if the administrator can delete stories posted by other users
- can_post_messages
-
Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only
- can_edit_messages
-
Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only
- can_pin_messages
-
Optional. True, if the user is allowed to pin messages; for groups and supergroups only
- can_manage_topics
-
Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only
- can_manage_direct_messages
-
Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only
- can_manage_tags
-
Optional. True, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted, defaults to the value of can_pin_messages.
Official reference: This object represents a chat background.
pub type ChatBackground {
ChatBackground(type_: BackgroundType)
}
Constructors
-
ChatBackground(type_: BackgroundType)Arguments
- type_
-
Type of the background
Official reference: This object contains information about a chat boost.
pub type ChatBoost {
ChatBoost(
boost_id: String,
add_date: Int,
expiration_date: Int,
source: ChatBoostSource,
)
}
Constructors
-
ChatBoost( boost_id: String, add_date: Int, expiration_date: Int, source: ChatBoostSource, )Arguments
- boost_id
-
Unique identifier of the boost
- add_date
-
Point in time (Unix timestamp) when the chat was boosted
- expiration_date
-
Point in time (Unix timestamp) when the boost will automatically expire, unless the booster’s Telegram Premium subscription is prolonged
- source
-
Source of the added boost
Official reference: This object represents a service message about a user boosting a chat.
pub type ChatBoostAdded {
ChatBoostAdded(boost_count: Int)
}
Constructors
-
ChatBoostAdded(boost_count: Int)Arguments
- boost_count
-
Number of boosts added by the user
Official reference: This object represents a boost removed from a chat.
pub type ChatBoostRemoved {
ChatBoostRemoved(
chat: Chat,
boost_id: String,
remove_date: Int,
source: ChatBoostSource,
)
}
Constructors
-
ChatBoostRemoved( chat: Chat, boost_id: String, remove_date: Int, source: ChatBoostSource, )Arguments
- chat
-
Chat which was boosted
- boost_id
-
Unique identifier of the boost
- remove_date
-
Point in time (Unix timestamp) when the boost was removed
- source
-
Source of the removed boost
pub type ChatBoostSource {
ChatBoostSourcePremiumChatBoostSource(ChatBoostSourcePremium)
ChatBoostSourceGiftCodeChatBoostSource(ChatBoostSourceGiftCode)
ChatBoostSourceGiveawayChatBoostSource(ChatBoostSourceGiveaway)
}
Constructors
-
ChatBoostSourcePremiumChatBoostSource(ChatBoostSourcePremium) -
ChatBoostSourceGiftCodeChatBoostSource(ChatBoostSourceGiftCode) -
ChatBoostSourceGiveawayChatBoostSource(ChatBoostSourceGiveaway)
Official reference: The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.
pub type ChatBoostSourceGiftCode {
ChatBoostSourceGiftCode(source: String, user: User)
}
Constructors
-
ChatBoostSourceGiftCode(source: String, user: User)Arguments
- source
-
Source of the boost, always “gift_code”
- user
-
User for which the gift code was created
Official reference: The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and prize_star_count / 500 times for one year for Telegram Star giveaways.
pub type ChatBoostSourceGiveaway {
ChatBoostSourceGiveaway(
source: String,
giveaway_message_id: Int,
user: option.Option(User),
prize_star_count: option.Option(Int),
is_unclaimed: option.Option(Bool),
)
}
Constructors
-
ChatBoostSourceGiveaway( source: String, giveaway_message_id: Int, user: option.Option(User), prize_star_count: option.Option(Int), is_unclaimed: option.Option(Bool), )Arguments
- source
-
Source of the boost, always “giveaway”
- giveaway_message_id
-
Identifier of a message in the chat with the giveaway; the message could have been deleted already. May be 0 if the message isn’t sent yet.
- user
-
Optional. User that won the prize in the giveaway if any; for Telegram Premium giveaways only
- prize_star_count
-
Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only
- is_unclaimed
-
Optional. True, if the giveaway was completed, but there was no user to win the prize
Official reference: The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.
pub type ChatBoostSourcePremium {
ChatBoostSourcePremium(source: String, user: User)
}
Constructors
-
ChatBoostSourcePremium(source: String, user: User)Arguments
- source
-
Source of the boost, always “premium”
- user
-
User that boosted the chat
Official reference: This object contains full information about a chat.
pub type ChatFullInfo {
ChatFullInfo(
id: Int,
type_: String,
title: option.Option(String),
username: option.Option(String),
first_name: option.Option(String),
last_name: option.Option(String),
is_forum: option.Option(Bool),
is_direct_messages: option.Option(Bool),
accent_color_id: Int,
max_reaction_count: Int,
photo: option.Option(ChatPhoto),
active_usernames: option.Option(List(String)),
birthdate: option.Option(Birthdate),
business_intro: option.Option(BusinessIntro),
business_location: option.Option(BusinessLocation),
business_opening_hours: option.Option(BusinessOpeningHours),
personal_chat: option.Option(Chat),
parent_chat: option.Option(Chat),
available_reactions: option.Option(List(ReactionType)),
background_custom_emoji_id: option.Option(String),
profile_accent_color_id: option.Option(Int),
profile_background_custom_emoji_id: option.Option(String),
emoji_status_custom_emoji_id: option.Option(String),
emoji_status_expiration_date: option.Option(Int),
bio: option.Option(String),
has_private_forwards: option.Option(Bool),
has_restricted_voice_and_video_messages: option.Option(Bool),
join_to_send_messages: option.Option(Bool),
join_by_request: option.Option(Bool),
description: option.Option(String),
invite_link: option.Option(String),
pinned_message: option.Option(Message),
permissions: option.Option(ChatPermissions),
accepted_gift_types: AcceptedGiftTypes,
can_send_paid_media: option.Option(Bool),
slow_mode_delay: option.Option(Int),
unrestrict_boost_count: option.Option(Int),
message_auto_delete_time: option.Option(Int),
has_aggressive_anti_spam_enabled: option.Option(Bool),
has_hidden_members: option.Option(Bool),
has_protected_content: option.Option(Bool),
has_visible_history: option.Option(Bool),
sticker_set_name: option.Option(String),
can_set_sticker_set: option.Option(Bool),
custom_emoji_sticker_set_name: option.Option(String),
linked_chat_id: option.Option(Int),
location: option.Option(ChatLocation),
rating: option.Option(UserRating),
first_profile_audio: option.Option(Audio),
unique_gift_colors: option.Option(UniqueGiftColors),
paid_message_star_count: option.Option(Int),
guard_bot: option.Option(User),
community: option.Option(Community),
)
}
Constructors
-
ChatFullInfo( id: Int, type_: String, title: option.Option(String), username: option.Option(String), first_name: option.Option(String), last_name: option.Option(String), is_forum: option.Option(Bool), is_direct_messages: option.Option(Bool), accent_color_id: Int, max_reaction_count: Int, photo: option.Option(ChatPhoto), active_usernames: option.Option(List(String)), birthdate: option.Option(Birthdate), business_intro: option.Option(BusinessIntro), business_location: option.Option(BusinessLocation), business_opening_hours: option.Option(BusinessOpeningHours), personal_chat: option.Option(Chat), parent_chat: option.Option(Chat), available_reactions: option.Option(List(ReactionType)), background_custom_emoji_id: option.Option(String), profile_accent_color_id: option.Option(Int), profile_background_custom_emoji_id: option.Option(String), emoji_status_custom_emoji_id: option.Option(String), emoji_status_expiration_date: option.Option(Int), bio: option.Option(String), has_private_forwards: option.Option(Bool), has_restricted_voice_and_video_messages: option.Option(Bool), join_to_send_messages: option.Option(Bool), join_by_request: option.Option(Bool), description: option.Option(String), invite_link: option.Option(String), pinned_message: option.Option(Message), permissions: option.Option(ChatPermissions), accepted_gift_types: AcceptedGiftTypes, can_send_paid_media: option.Option(Bool), slow_mode_delay: option.Option(Int), unrestrict_boost_count: option.Option(Int), message_auto_delete_time: option.Option(Int), has_aggressive_anti_spam_enabled: option.Option(Bool), has_hidden_members: option.Option(Bool), has_protected_content: option.Option(Bool), has_visible_history: option.Option(Bool), sticker_set_name: option.Option(String), can_set_sticker_set: option.Option(Bool), custom_emoji_sticker_set_name: option.Option(String), linked_chat_id: option.Option(Int), location: option.Option(ChatLocation), rating: option.Option(UserRating), first_profile_audio: option.Option(Audio), unique_gift_colors: option.Option(UniqueGiftColors), paid_message_star_count: option.Option(Int), guard_bot: option.Option(User), community: option.Option(Community), )Arguments
- id
-
Unique identifier for this chat. 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.
- type_
-
Type of the chat, can be either “private”, “group”, “supergroup” or “channel”
- title
-
Optional. Title, for supergroups, channels and group chats
- username
-
Optional. Username, for private chats, supergroups and channels if available
- first_name
-
Optional. First name of the other party in a private chat
- last_name
-
Optional. Last name of the other party in a private chat
- is_forum
-
Optional. True, if the supergroup chat is a forum (has topics enabled)
- is_direct_messages
-
Optional. True, if the chat is the direct messages chat of a channel
- accent_color_id
-
Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details.
- max_reaction_count
-
The maximum number of reactions that can be set on a message in the chat
- photo
-
Optional. Chat photo
- active_usernames
-
Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels
- birthdate
-
Optional. For private chats, the date of birth of the user
- business_intro
-
Optional. For private chats with business accounts, the intro of the business
- business_location
-
Optional. For private chats with business accounts, the location of the business
- business_opening_hours
-
Optional. For private chats with business accounts, the opening hours of the business
- personal_chat
-
Optional. For private chats, the personal channel of the user
- parent_chat
-
Optional. Information about the corresponding channel chat; for direct messages chats only
- available_reactions
-
Optional. List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed.
- background_custom_emoji_id
-
Optional. Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background
- profile_accent_color_id
-
Optional. Identifier of the accent color for the chat’s profile background. See profile accent colors for more details.
- profile_background_custom_emoji_id
-
Optional. Custom emoji identifier of the emoji chosen by the chat for its profile background
- emoji_status_custom_emoji_id
-
Optional. Custom emoji identifier of the emoji status of the chat or the other party in a private chat
- emoji_status_expiration_date
-
Optional. Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any
- bio
-
Optional. Bio of the other party in a private chat
- has_private_forwards
-
Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user
- has_restricted_voice_and_video_messages
-
Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat
- join_to_send_messages
-
Optional. True, if users need to join the supergroup before they can send messages
- join_by_request
-
Optional. True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators
- description
-
Optional. Description, for groups, supergroups and channel chats
- invite_link
-
Optional. Primary invite link, for groups, supergroups and channel chats
- pinned_message
-
Optional. The most recent pinned message (by sending date)
- permissions
-
Optional. Default chat member permissions, for groups and supergroups
- accepted_gift_types
-
Information about types of gifts that are accepted by the chat or by the corresponding user for private chats
- can_send_paid_media
-
Optional. True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.
- slow_mode_delay
-
Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds
- unrestrict_boost_count
-
Optional. For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions
- message_auto_delete_time
-
Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds
- has_aggressive_anti_spam_enabled
-
Optional. True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators.
- has_hidden_members
-
Optional. True, if non-administrators can only get the list of bots and administrators in the chat
- has_protected_content
-
Optional. True, if messages from the chat can’t be forwarded to other chats
- has_visible_history
-
Optional. True, if new chat members will have access to old messages; available only to chat administrators
- sticker_set_name
-
Optional. For supergroups, name of the group sticker set
- can_set_sticker_set
-
Optional. True, if the bot can change the group sticker set
- custom_emoji_sticker_set_name
-
Optional. For supergroups, the name of the group’s custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group.
- linked_chat_id
-
Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
- location
-
Optional. For supergroups, the location to which the supergroup is connected
- rating
-
Optional. For private chats, the rating of the user if any
- first_profile_audio
-
Optional. For private chats, the first audio added to the profile of the user
- unique_gift_colors
-
Optional. The color scheme based on a unique gift that must be used for the chat’s name, message replies and link previews
- paid_message_star_count
-
Optional. The number of Telegram Stars a general user has to pay to send a message to the chat
- guard_bot
-
Optional. The bot that processes join request queries in the chat. The field is only available to chat administrators.
- community
-
Optional. The Community to which the chat belongs
Official reference: Represents an invite link for a chat.
pub type ChatInviteLink {
ChatInviteLink(
invite_link: String,
creator: User,
creates_join_request: Bool,
is_primary: Bool,
is_revoked: Bool,
name: option.Option(String),
expire_date: option.Option(Int),
member_limit: option.Option(Int),
pending_join_request_count: option.Option(Int),
subscription_period: option.Option(Int),
subscription_price: option.Option(Int),
)
}
Constructors
-
ChatInviteLink( invite_link: String, creator: User, creates_join_request: Bool, is_primary: Bool, is_revoked: Bool, name: option.Option(String), expire_date: option.Option(Int), member_limit: option.Option(Int), pending_join_request_count: option.Option(Int), subscription_period: option.Option(Int), subscription_price: option.Option(Int), )Arguments
- invite_link
-
The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”.
- creator
-
Creator of the link
- creates_join_request
-
True, if users joining the chat via the link need to be approved by chat administrators
- is_primary
-
True, if the link is primary
- is_revoked
-
True, if the link is revoked
- name
-
Optional. Invite link name
- expire_date
-
Optional. Point in time (Unix timestamp) when the link will expire or has been expired
- member_limit
-
Optional. The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999
- pending_join_request_count
-
Optional. Number of pending join requests created using this link
- subscription_period
-
Optional. The number of seconds the subscription will be active for before the next payment
- subscription_price
-
Optional. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link
Official reference: Represents a join request sent to a chat.
pub type ChatJoinRequest {
ChatJoinRequest(
chat: Chat,
from: User,
user_chat_id: Int,
date: Int,
bio: option.Option(String),
invite_link: option.Option(ChatInviteLink),
query_id: option.Option(String),
)
}
Constructors
-
ChatJoinRequest( chat: Chat, from: User, user_chat_id: Int, date: Int, bio: option.Option(String), invite_link: option.Option(ChatInviteLink), query_id: option.Option(String), )Arguments
- chat
-
Chat to which the request was sent
- from
-
User that sent the join request
- user_chat_id
-
Identifier of a private chat with the user who sent the join request. 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 64-bit integer or double-precision float type are safe for storing this identifier. The bot can use this identifier for 5 minutes to send messages until the join request is processed, assuming no other administrator contacted the user.
- date
-
Date the request was sent in Unix time
- bio
-
Optional. Bio of the user
- invite_link
-
Optional. Chat invite link that was used by the user to send the join request
- query_id
-
Optional. Identifier of the join request query; for bots assigned to process join requests only. If present, then the bot must call sendChatJoinRequestWebApp or directly call answerChatJoinRequestQuery within 10 seconds.
Official reference: Represents a location to which a chat is connected.
pub type ChatLocation {
ChatLocation(location: Location, address: String)
}
Constructors
-
ChatLocation(location: Location, address: String)Arguments
- location
-
The location to which the supergroup is connected. Can’t be a live location.
- address
-
Location address; 1-64 characters, as defined by the chat owner
pub type ChatMember {
ChatMemberOwnerChatMember(ChatMemberOwner)
ChatMemberAdministratorChatMember(ChatMemberAdministrator)
ChatMemberMemberChatMember(ChatMemberMember)
ChatMemberRestrictedChatMember(ChatMemberRestricted)
ChatMemberLeftChatMember(ChatMemberLeft)
ChatMemberBannedChatMember(ChatMemberBanned)
}
Constructors
-
ChatMemberOwnerChatMember(ChatMemberOwner) -
ChatMemberAdministratorChatMember(ChatMemberAdministrator) -
ChatMemberMemberChatMember(ChatMemberMember) -
ChatMemberRestrictedChatMember(ChatMemberRestricted) -
ChatMemberLeftChatMember(ChatMemberLeft) -
ChatMemberBannedChatMember(ChatMemberBanned)
Official reference: Represents a chat member that has some additional privileges.
pub type ChatMemberAdministrator {
ChatMemberAdministrator(
status: String,
user: User,
can_be_edited: Bool,
is_anonymous: Bool,
can_manage_chat: Bool,
can_delete_messages: Bool,
can_manage_video_chats: Bool,
can_restrict_members: Bool,
can_promote_members: Bool,
can_change_info: Bool,
can_invite_users: Bool,
can_post_stories: Bool,
can_edit_stories: Bool,
can_delete_stories: Bool,
can_post_messages: option.Option(Bool),
can_edit_messages: option.Option(Bool),
can_pin_messages: option.Option(Bool),
can_manage_topics: option.Option(Bool),
can_manage_direct_messages: option.Option(Bool),
can_manage_tags: option.Option(Bool),
custom_title: option.Option(String),
)
}
Constructors
-
ChatMemberAdministrator( status: String, user: User, can_be_edited: Bool, is_anonymous: Bool, can_manage_chat: Bool, can_delete_messages: Bool, can_manage_video_chats: Bool, can_restrict_members: Bool, can_promote_members: Bool, can_change_info: Bool, can_invite_users: Bool, can_post_stories: Bool, can_edit_stories: Bool, can_delete_stories: Bool, can_post_messages: option.Option(Bool), can_edit_messages: option.Option(Bool), can_pin_messages: option.Option(Bool), can_manage_topics: option.Option(Bool), can_manage_direct_messages: option.Option(Bool), can_manage_tags: option.Option(Bool), custom_title: option.Option(String), )Arguments
- status
-
The member’s status in the chat, always “administrator”
- user
-
Information about the user
- can_be_edited
-
True, if the bot is allowed to edit administrator privileges of that user
- is_anonymous
-
True, if the user’s presence in the chat is hidden
- can_manage_chat
-
True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.
- can_delete_messages
-
True, if the administrator can delete messages of other users
- can_manage_video_chats
-
True, if the administrator can manage video chats
- can_restrict_members
-
True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics
- can_promote_members
-
True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)
- can_change_info
-
True, if the user is allowed to change the chat title, photo and other settings
- can_invite_users
-
True, if the user is allowed to invite new users to the chat
- can_post_stories
-
True, if the administrator can post stories to the chat
- can_edit_stories
-
True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat’s story archive
- can_delete_stories
-
True, if the administrator can delete stories posted by other users
- can_post_messages
-
Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only
- can_edit_messages
-
Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only
- can_pin_messages
-
Optional. True, if the user is allowed to pin messages; for groups and supergroups only
- can_manage_topics
-
Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only
- can_manage_direct_messages
-
Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only
- can_manage_tags
-
Optional. True, if the administrator can edit the tags of regular members; for groups and supergroups only. If omitted, defaults to the value of can_pin_messages.
- custom_title
-
Optional. Custom title for this user
Official reference: Represents a chat member that was banned in the chat and can’t return to the chat or view chat messages.
pub type ChatMemberBanned {
ChatMemberBanned(status: String, user: User, until_date: Int)
}
Constructors
-
ChatMemberBanned(status: String, user: User, until_date: Int)Arguments
- status
-
The member’s status in the chat, always “kicked”
- user
-
Information about the user
- until_date
-
Date when restrictions will be lifted for this user; Unix time. If 0, then the user is banned forever.
Official reference: Represents a chat member that isn’t currently a member of the chat, but may join it themselves.
pub type ChatMemberLeft {
ChatMemberLeft(status: String, user: User)
}
Constructors
-
ChatMemberLeft(status: String, user: User)Arguments
- status
-
The member’s status in the chat, always “left”
- user
-
Information about the user
Official reference: Represents a chat member that has no additional privileges or restrictions.
pub type ChatMemberMember {
ChatMemberMember(
status: String,
tag: option.Option(String),
user: User,
until_date: option.Option(Int),
)
}
Constructors
-
ChatMemberMember( status: String, tag: option.Option(String), user: User, until_date: option.Option(Int), )Arguments
- status
-
The member’s status in the chat, always “member”
- tag
-
Optional. Tag of the member
- user
-
Information about the user
- until_date
-
Optional. Date when the user’s subscription will expire; Unix time
Official reference: Represents a chat member that owns the chat and has all administrator privileges.
pub type ChatMemberOwner {
ChatMemberOwner(
status: String,
user: User,
is_anonymous: Bool,
custom_title: option.Option(String),
)
}
Constructors
-
ChatMemberOwner( status: String, user: User, is_anonymous: Bool, custom_title: option.Option(String), )Arguments
- status
-
The member’s status in the chat, always “creator”
- user
-
Information about the user
- is_anonymous
-
True, if the user’s presence in the chat is hidden
- custom_title
-
Optional. Custom title for this user
Official reference: Represents a chat member that is under certain restrictions in the chat. Supergroups only.
pub type ChatMemberRestricted {
ChatMemberRestricted(
status: String,
tag: option.Option(String),
user: User,
is_member: Bool,
can_send_messages: Bool,
can_send_audios: Bool,
can_send_documents: Bool,
can_send_photos: Bool,
can_send_videos: Bool,
can_send_video_notes: Bool,
can_send_voice_notes: Bool,
can_send_polls: Bool,
can_send_other_messages: Bool,
can_add_web_page_previews: Bool,
can_react_to_messages: Bool,
can_edit_tag: Bool,
can_change_info: Bool,
can_invite_users: Bool,
can_pin_messages: Bool,
can_manage_topics: Bool,
until_date: Int,
)
}
Constructors
-
ChatMemberRestricted( status: String, tag: option.Option(String), user: User, is_member: Bool, can_send_messages: Bool, can_send_audios: Bool, can_send_documents: Bool, can_send_photos: Bool, can_send_videos: Bool, can_send_video_notes: Bool, can_send_voice_notes: Bool, can_send_polls: Bool, can_send_other_messages: Bool, can_add_web_page_previews: Bool, can_react_to_messages: Bool, can_edit_tag: Bool, can_change_info: Bool, can_invite_users: Bool, can_pin_messages: Bool, can_manage_topics: Bool, until_date: Int, )Arguments
- status
-
The member’s status in the chat, always “restricted”
- tag
-
Optional. Tag of the member
- user
-
Information about the user
- is_member
-
True, if the user is a member of the chat at the moment of the request
- can_send_messages
-
True, if the user is allowed to send text messages, rich messages, contacts, giveaways, giveaway winners, invoices, locations and venues
- can_send_audios
-
True, if the user is allowed to send audios
- can_send_documents
-
True, if the user is allowed to send documents
- can_send_photos
-
True, if the user is allowed to send photos
- can_send_videos
-
True, if the user is allowed to send videos
- can_send_video_notes
-
True, if the user is allowed to send video notes
- can_send_voice_notes
-
True, if the user is allowed to send voice notes
- can_send_polls
-
True, if the user is allowed to send polls and checklists
- can_send_other_messages
-
True, if the user is allowed to send animations, games, stickers and use inline bots
- can_add_web_page_previews
-
True, if the user is allowed to add web page previews to their messages
- can_react_to_messages
-
True, if the user is allowed to react to messages
- can_edit_tag
-
True, if the user is allowed to edit their own tag
- can_change_info
-
True, if the user is allowed to change the chat title, photo and other settings
- can_invite_users
-
True, if the user is allowed to invite new users to the chat
- can_pin_messages
-
True, if the user is allowed to pin messages
- can_manage_topics
-
True, if the user is allowed to create forum topics
- until_date
-
Date when restrictions will be lifted for this user; Unix time. If 0, then the user is restricted forever.
Official reference: This object represents changes in the status of a chat member.
pub type ChatMemberUpdated {
ChatMemberUpdated(
chat: Chat,
from: User,
date: Int,
old_chat_member: ChatMember,
new_chat_member: ChatMember,
invite_link: option.Option(ChatInviteLink),
via_join_request: option.Option(Bool),
via_chat_folder_invite_link: option.Option(Bool),
)
}
Constructors
-
ChatMemberUpdated( chat: Chat, from: User, date: Int, old_chat_member: ChatMember, new_chat_member: ChatMember, invite_link: option.Option(ChatInviteLink), via_join_request: option.Option(Bool), via_chat_folder_invite_link: option.Option(Bool), )Arguments
- chat
-
Chat the user belongs to
- from
-
Performer of the action, which resulted in the change
- date
-
Date the change was done in Unix time
- old_chat_member
-
Previous information about the chat member
- new_chat_member
-
New information about the chat member
- invite_link
-
Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events only
- via_join_request
-
Optional. True, if the user joined the chat after sending a direct join request without using an invite link and being approved by an administrator
- via_chat_folder_invite_link
-
Optional. True, if the user joined the chat via a chat folder invite link
Official reference: Describes a service message about the chat owner leaving the chat.
pub type ChatOwnerLeft {
ChatOwnerLeft(new_owner: option.Option(User))
}
Constructors
-
ChatOwnerLeft(new_owner: option.Option(User))Arguments
- new_owner
-
Optional. The user who will become the new owner of the chat if the previous owner does not return to the chat
Official reference: Describes actions that a non-administrator user is allowed to take in a chat.
pub type ChatPermissions {
ChatPermissions(
can_send_messages: option.Option(Bool),
can_send_audios: option.Option(Bool),
can_send_documents: option.Option(Bool),
can_send_photos: option.Option(Bool),
can_send_videos: option.Option(Bool),
can_send_video_notes: option.Option(Bool),
can_send_voice_notes: option.Option(Bool),
can_send_polls: option.Option(Bool),
can_send_other_messages: option.Option(Bool),
can_add_web_page_previews: option.Option(Bool),
can_react_to_messages: option.Option(Bool),
can_edit_tag: option.Option(Bool),
can_change_info: option.Option(Bool),
can_invite_users: option.Option(Bool),
can_pin_messages: option.Option(Bool),
can_manage_topics: option.Option(Bool),
)
}
Constructors
-
ChatPermissions( can_send_messages: option.Option(Bool), can_send_audios: option.Option(Bool), can_send_documents: option.Option(Bool), can_send_photos: option.Option(Bool), can_send_videos: option.Option(Bool), can_send_video_notes: option.Option(Bool), can_send_voice_notes: option.Option(Bool), can_send_polls: option.Option(Bool), can_send_other_messages: option.Option(Bool), can_add_web_page_previews: option.Option(Bool), can_react_to_messages: option.Option(Bool), can_edit_tag: option.Option(Bool), can_change_info: option.Option(Bool), can_invite_users: option.Option(Bool), can_pin_messages: option.Option(Bool), can_manage_topics: option.Option(Bool), )Arguments
- can_send_messages
-
Optional. True, if the user is allowed to send text messages, rich messages, contacts, giveaways, giveaway winners, invoices, locations and venues
- can_send_audios
-
Optional. True, if the user is allowed to send audios
- can_send_documents
-
Optional. True, if the user is allowed to send documents
- can_send_photos
-
Optional. True, if the user is allowed to send photos
- can_send_videos
-
Optional. True, if the user is allowed to send videos
- can_send_video_notes
-
Optional. True, if the user is allowed to send video notes
- can_send_voice_notes
-
Optional. True, if the user is allowed to send voice notes
- can_send_polls
-
Optional. True, if the user is allowed to send polls and checklists
- can_send_other_messages
-
Optional. True, if the user is allowed to send animations, games, stickers and use inline bots
- can_add_web_page_previews
-
Optional. True, if the user is allowed to add web page previews to their messages
- can_react_to_messages
-
Optional. True, if the user is allowed to react to messages. If omitted, defaults to the value of can_send_messages.
- can_edit_tag
-
Optional. True, if the user is allowed to edit their own tag. If omitted, defaults to the value of can_pin_messages.
- can_change_info
-
Optional. True, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups.
- can_invite_users
-
Optional. True, if the user is allowed to invite new users to the chat
- can_pin_messages
-
Optional. True, if the user is allowed to pin messages. Ignored in public supergroups.
- can_manage_topics
-
Optional. True, if the user is allowed to create forum topics. If omitted, defaults to the value of can_pin_messages.
Official reference: This object represents a chat photo.
pub type ChatPhoto {
ChatPhoto(
small_file_id: String,
small_file_unique_id: String,
big_file_id: String,
big_file_unique_id: String,
)
}
Constructors
-
ChatPhoto( small_file_id: String, small_file_unique_id: String, big_file_id: String, big_file_unique_id: String, )Arguments
- small_file_id
-
File identifier of small (160x160) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.
- small_file_unique_id
-
Unique file identifier of small (160x160) chat photo, which is supposed to be the same over time and for different bots. Can’t be used to download or reuse the file.
- big_file_id
-
File identifier of big (640x640) chat photo. This file_id can be used only for photo download and only for as long as the photo is not changed.
- big_file_unique_id
-
Unique file identifier of big (640x640) chat photo, which is supposed to be the same over time and for different bots. Can’t be used to download or reuse the file.
Official reference: This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.
pub type ChatShared {
ChatShared(
request_id: Int,
chat_id: Int,
title: option.Option(String),
username: option.Option(String),
photo: option.Option(List(PhotoSize)),
)
}
Constructors
-
ChatShared( request_id: Int, chat_id: Int, title: option.Option(String), username: option.Option(String), photo: option.Option(List(PhotoSize)), )Arguments
- request_id
-
Identifier of the request
- chat_id
-
Identifier of the shared chat. 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 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.
- title
-
Optional. Title of the chat, if the title was requested by the bot
- username
-
Optional. Username of the chat, if the username was requested by the bot and available
- photo
-
Optional. Available sizes of the chat photo, if the photo was requested by the bot
Official reference: Describes a checklist.
pub type Checklist {
Checklist(
title: String,
title_entities: option.Option(List(MessageEntity)),
tasks: List(ChecklistTask),
others_can_add_tasks: option.Option(Bool),
others_can_mark_tasks_as_done: option.Option(Bool),
)
}
Constructors
-
Checklist( title: String, title_entities: option.Option(List(MessageEntity)), tasks: List(ChecklistTask), others_can_add_tasks: option.Option(Bool), others_can_mark_tasks_as_done: option.Option(Bool), )Arguments
- title
-
Title of the checklist
- title_entities
-
Optional. Special entities that appear in the checklist title
- tasks
-
List of tasks in the checklist
- others_can_add_tasks
-
Optional. True, if users other than the creator of the list can add tasks to the list
- others_can_mark_tasks_as_done
-
Optional. True, if users other than the creator of the list can mark tasks as done or not done
Official reference: Describes a task in a checklist.
pub type ChecklistTask {
ChecklistTask(
id: Int,
text: String,
text_entities: option.Option(List(MessageEntity)),
completed_by_user: option.Option(User),
completed_by_chat: option.Option(Chat),
completion_date: option.Option(Int),
)
}
Constructors
-
ChecklistTask( id: Int, text: String, text_entities: option.Option(List(MessageEntity)), completed_by_user: option.Option(User), completed_by_chat: option.Option(Chat), completion_date: option.Option(Int), )Arguments
- id
-
Unique identifier of the task
- text
-
Text of the task
- text_entities
-
Optional. Special entities that appear in the task text
- completed_by_user
-
Optional. User that completed the task; omitted if the task wasn’t completed by a user
- completed_by_chat
-
Optional. Chat that completed the task; omitted if the task wasn’t completed by a chat
- completion_date
-
Optional. Point in time (Unix timestamp) when the task was completed; 0 if the task wasn’t completed
Official reference: Describes a service message about tasks added to a checklist.
pub type ChecklistTasksAdded {
ChecklistTasksAdded(
checklist_message: option.Option(Message),
tasks: List(ChecklistTask),
)
}
Constructors
-
ChecklistTasksAdded( checklist_message: option.Option(Message), tasks: List(ChecklistTask), )Arguments
- checklist_message
-
Optional. Message containing the checklist to which the tasks were added. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.
- tasks
-
List of tasks added to the checklist
Official reference: Describes a service message about checklist tasks marked as done or not done.
pub type ChecklistTasksDone {
ChecklistTasksDone(
checklist_message: option.Option(Message),
marked_as_done_task_ids: option.Option(List(Int)),
marked_as_not_done_task_ids: option.Option(List(Int)),
)
}
Constructors
-
ChecklistTasksDone( checklist_message: option.Option(Message), marked_as_done_task_ids: option.Option(List(Int)), marked_as_not_done_task_ids: option.Option(List(Int)), )Arguments
- checklist_message
-
Optional. Message containing the checklist whose tasks were marked as done or not done. Note that the Message object in this field will not contain the reply_to_message field even if it itself is a reply.
- marked_as_done_task_ids
-
Optional. Identifiers of the tasks that were marked as done
- marked_as_not_done_task_ids
-
Optional. Identifiers of the tasks that were marked as not done
Official reference: Represents a result of an inline query that was chosen by the user and sent to their chat partner. Note: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates.
pub type ChosenInlineResult {
ChosenInlineResult(
result_id: String,
from: User,
location: option.Option(Location),
inline_message_id: option.Option(String),
query: String,
)
}
Constructors
-
ChosenInlineResult( result_id: String, from: User, location: option.Option(Location), inline_message_id: option.Option(String), query: String, )Arguments
- result_id
-
The unique identifier for the result that was chosen
- from
-
The user that chose the result
- location
-
Optional. Sender location, only for bots that require user location
- inline_message_id
-
Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message.
- query
-
The query that was used to obtain the result
pub type CloseForumTopicParameters {
CloseForumTopicParameters(
chat_id: IntOrString,
message_thread_id: Int,
)
}
Constructors
-
CloseForumTopicParameters( chat_id: IntOrString, message_thread_id: Int, )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target supergroup (in the format
@supergroupusername) - message_thread_id
-
Unique identifier for the target message thread of the forum topic
pub type CloseGeneralForumTopicParameters {
CloseGeneralForumTopicParameters(chat_id: IntOrString)
}
Constructors
-
CloseGeneralForumTopicParameters(chat_id: IntOrString)Arguments
- chat_id
-
Unique identifier for the target chat or username of the target supergroup (in the format
@supergroupusername)
Official reference: Represents a community (a group of chats).
pub type Community {
Community(id: Int, name: String)
}
Constructors
-
Community(id: Int, name: String)Arguments
- id
-
Unique identifier for this community. 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.
- name
-
Name of the community
Official reference: Describes a service message about a chat being removed from a community. Currently holds no information.
pub type CommunityChatRemoved {
CommunityChatRemoved
}
Constructors
-
CommunityChatRemoved
Official reference: This object represents a phone contact.
pub type Contact {
Contact(
phone_number: String,
first_name: String,
last_name: option.Option(String),
user_id: option.Option(Int),
vcard: option.Option(String),
)
}
Constructors
-
Contact( phone_number: String, first_name: String, last_name: option.Option(String), user_id: option.Option(Int), vcard: option.Option(String), )Arguments
- phone_number
-
Contact’s phone number
- first_name
-
Contact’s first name
- last_name
-
Optional. Contact’s last name
- user_id
-
Optional. Contact’s user identifier in Telegram. 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 64-bit integer or double-precision float type are safe for storing this identifier.
- vcard
-
Optional. Additional data about the contact in the form of a vCard
pub type ConvertGiftToStarsParameters {
ConvertGiftToStarsParameters(
business_connection_id: String,
owned_gift_id: String,
)
}
Constructors
-
ConvertGiftToStarsParameters( business_connection_id: String, owned_gift_id: String, )Arguments
- business_connection_id
-
Unique identifier of the business connection
- owned_gift_id
-
Unique identifier of the regular gift that should be converted to Telegram Stars
https://core.telegram.org/bots/api#copymessage
pub type CopyMessageParameters {
CopyMessageParameters(
chat_id: IntOrString,
message_thread_id: option.Option(Int),
from_chat_id: IntOrString,
message_id: Int,
video_start_timestamp: option.Option(Int),
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
show_caption_above_media: option.Option(Bool),
disable_notification: option.Option(Bool),
protect_content: option.Option(Bool),
allow_paid_broadcast: option.Option(Bool),
reply_parameters: option.Option(ReplyParameters),
reply_markup: option.Option(SendMessageReplyMarkupParameters),
)
}
Constructors
-
CopyMessageParameters( chat_id: IntOrString, message_thread_id: option.Option(Int), from_chat_id: IntOrString, message_id: Int, video_start_timestamp: option.Option(Int), caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), show_caption_above_media: option.Option(Bool), disable_notification: option.Option(Bool), protect_content: option.Option(Bool), allow_paid_broadcast: option.Option(Bool), reply_parameters: option.Option(ReplyParameters), reply_markup: option.Option(SendMessageReplyMarkupParameters), )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- message_thread_id
-
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
- from_chat_id
-
Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername)
- message_id
-
Message identifier in the chat specified in from_chat_id
- video_start_timestamp
-
New start timestamp for the copied video in the message
- caption
-
New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept
- parse_mode
-
Mode for parsing entities in the new caption. See formatting options for more details.
- caption_entities
-
A JSON-serialized list of special entities that appear in the new caption, which can be specified instead of parse_mode
- show_caption_above_media
-
Pass True, if the caption must be shown above the message media. Ignored if a new caption isn’t specified.
- disable_notification
-
Sends the message silently. Users will receive a notification with no sound.
- protect_content
-
Protects the contents of the sent message from forwarding and saving
- allow_paid_broadcast
-
Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balance
- reply_parameters
-
Description of the message to reply to
- reply_markup
-
Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove a reply keyboard or to force a reply from the user
https://core.telegram.org/bots/api#copymessages
pub type CopyMessagesParameters {
CopyMessagesParameters(
chat_id: IntOrString,
message_thread_id: option.Option(Int),
from_chat_id: IntOrString,
message_ids: List(Int),
disable_notification: option.Option(Bool),
protect_content: option.Option(Bool),
remove_caption: option.Option(Bool),
)
}
Constructors
-
CopyMessagesParameters( chat_id: IntOrString, message_thread_id: option.Option(Int), from_chat_id: IntOrString, message_ids: List(Int), disable_notification: option.Option(Bool), protect_content: option.Option(Bool), remove_caption: option.Option(Bool), )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel (in the format @channelusername)
- message_thread_id
-
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
- from_chat_id
-
Unique identifier for the chat where the original messages were sent (or channel username in the format @channelusername)
- message_ids
-
A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to copy
- disable_notification
-
Sends the messages silently. Users will receive a notification with no sound.
- protect_content
-
Protects the contents of the sent messages from forwarding and saving
- remove_caption
-
Pass True to copy the messages without their captions
Official reference: This object represents an inline keyboard button that copies specified text to the clipboard.
pub type CopyTextButton {
CopyTextButton(text: String)
}
Constructors
-
CopyTextButton(text: String)Arguments
- text
-
The text to be copied to the clipboard; 1-256 characters
pub type CreateChatInviteLinkParameters {
CreateChatInviteLinkParameters(
chat_id: IntOrString,
name: option.Option(String),
member_limit: option.Option(Int),
expire_date: option.Option(Int),
creates_join_request: option.Option(Bool),
)
}
Constructors
-
CreateChatInviteLinkParameters( chat_id: IntOrString, name: option.Option(String), member_limit: option.Option(Int), expire_date: option.Option(Int), creates_join_request: option.Option(Bool), )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel (in the format
@channelusername) - name
-
Invite link name; 0-32 characters
- member_limit
-
The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999
- expire_date
-
Point in time (Unix timestamp) when the link will expire.
- creates_join_request
-
True, if users joining the chat via the link need to be approved by chat administrators. IfTrue,member_limitcan’t be specified
pub type CreateChatSubscriptionInviteLinkParameters {
CreateChatSubscriptionInviteLinkParameters(
chat_id: IntOrString,
name: option.Option(String),
period: Int,
amount: Int,
)
}
Constructors
-
CreateChatSubscriptionInviteLinkParameters( chat_id: IntOrString, name: option.Option(String), period: Int, amount: Int, )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel (in the format
@channelusername) - name
-
Invite link name; 0-32 characters
- period
-
The number of seconds the subscription will be active for before the next payment. Currently, it must always be 2592000 (30 days).
- amount
-
The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat; 1-2500
pub type CreateForumTopicParameters {
CreateForumTopicParameters(
chat_id: IntOrString,
name: String,
icon_color: option.Option(Int),
icon_custom_emoji_id: option.Option(String),
)
}
Constructors
-
CreateForumTopicParameters( chat_id: IntOrString, name: String, icon_color: option.Option(Int), icon_custom_emoji_id: option.Option(String), )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target supergroup (in the format
@supergroupusername) - name
-
Topic name, 1-128 characters
- icon_color
-
Color of the topic icon in RGB format
- icon_custom_emoji_id
-
Unique identifier of the custom emoji shown as the topic icon
pub type CreateInvoiceLinkParameters {
CreateInvoiceLinkParameters(
business_connection_id: option.Option(String),
title: String,
description: String,
payload: String,
provider_token: option.Option(String),
currency: String,
prices: List(LabeledPrice),
subscription_period: option.Option(Int),
max_tip_amount: option.Option(Int),
suggested_tip_amounts: option.Option(List(Int)),
provider_data: option.Option(String),
photo_url: option.Option(String),
photo_size: option.Option(Int),
photo_width: option.Option(Int),
photo_height: option.Option(Int),
need_name: option.Option(Bool),
need_phone_number: option.Option(Bool),
need_email: option.Option(Bool),
need_shipping_address: option.Option(Bool),
send_phone_number_to_provider: option.Option(Bool),
send_email_to_provider: option.Option(Bool),
is_flexible: option.Option(Bool),
)
}
Constructors
-
CreateInvoiceLinkParameters( business_connection_id: option.Option(String), title: String, description: String, payload: String, provider_token: option.Option(String), currency: String, prices: List(LabeledPrice), subscription_period: option.Option(Int), max_tip_amount: option.Option(Int), suggested_tip_amounts: option.Option(List(Int)), provider_data: option.Option(String), photo_url: option.Option(String), photo_size: option.Option(Int), photo_width: option.Option(Int), photo_height: option.Option(Int), need_name: option.Option(Bool), need_phone_number: option.Option(Bool), need_email: option.Option(Bool), need_shipping_address: option.Option(Bool), send_phone_number_to_provider: option.Option(Bool), send_email_to_provider: option.Option(Bool), is_flexible: option.Option(Bool), )Arguments
- business_connection_id
-
Unique identifier of the business connection
- title
-
Product name, 1-32 characters
- description
-
Product description, 1-255 characters
- payload
-
Bot-defined invoice payload, 1-128 bytes
- provider_token
-
Payment provider token
- currency
-
Three-letter ISO 4217 currency code
- prices
-
Price breakdown
- subscription_period
-
Subscription period in seconds
- max_tip_amount
-
Maximum accepted amount for tips
- suggested_tip_amounts
-
Suggested amounts of tips
- provider_data
-
JSON-serialized data about the invoice
- photo_url
-
URL of the product photo
- photo_size
-
Photo size in bytes
- photo_width
-
Photo width
- photo_height
-
Photo height
- need_name
-
Require user’s full name
- need_phone_number
-
Require user’s phone number
- need_email
-
Require user’s email address
- need_shipping_address
-
Require user’s shipping address
- send_phone_number_to_provider
-
Send phone number to provider
- send_email_to_provider
-
Send email to provider
- is_flexible
-
Final price depends on shipping method
pub type CreateNewStickerSetParameters {
CreateNewStickerSetParameters(
user_id: Int,
name: String,
title: String,
stickers: List(InputSticker),
sticker_type: option.Option(String),
needs_repainting: option.Option(Bool),
)
}
Constructors
-
CreateNewStickerSetParameters( user_id: Int, name: String, title: String, stickers: List(InputSticker), sticker_type: option.Option(String), needs_repainting: option.Option(Bool), )Arguments
- user_id
-
User identifier of created sticker set owner
- name
-
Short name of sticker set, to be used in t.me/addstickers/ URLs
- title
-
Sticker set title, 1-64 characters
- stickers
-
A JSON-serialized list of 1-50 initial stickers to be added to the sticker set
- sticker_type
-
Type of stickers in the set, pass “regular”, “mask”, or “custom_emoji”. By default, a regular sticker set is created.
- needs_repainting
-
Pass True if stickers in the sticker set must be repainted to the color of text when used in messages
pub type DeclineChatJoinRequestParameters {
DeclineChatJoinRequestParameters(
chat_id: IntOrString,
user_id: Int,
)
}
Constructors
-
DeclineChatJoinRequestParameters( chat_id: IntOrString, user_id: Int, )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel (in the format
@channelusername) - user_id
-
Unique identifier of the target user
Parameters for deleteAllMessageReactions (Bot API 10.0).
pub type DeleteAllMessageReactionsParameters {
DeleteAllMessageReactionsParameters(
chat_id: IntOrString,
message_id: Int,
)
}
Constructors
-
DeleteAllMessageReactionsParameters( chat_id: IntOrString, message_id: Int, )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel
- message_id
-
Identifier of the target message
pub type DeleteBusinessMessagesParameters {
DeleteBusinessMessagesParameters(
business_connection_id: String,
message_ids: List(Int),
)
}
Constructors
-
DeleteBusinessMessagesParameters( business_connection_id: String, message_ids: List(Int), )Arguments
- business_connection_id
-
Unique identifier of the business connection on behalf of which to delete the messages
- message_ids
-
A JSON-serialized list of 1-100 identifiers of messages to delete. All messages must be from the same chat. See deleteMessage for limitations on which messages can be deleted
pub type DeleteChatPhotoParameters {
DeleteChatPhotoParameters(chat_id: IntOrString)
}
Constructors
-
DeleteChatPhotoParameters(chat_id: IntOrString)Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel (in the format
@channelusername)
pub type DeleteChatStickerSetParameters {
DeleteChatStickerSetParameters(chat_id: IntOrString)
}
Constructors
-
DeleteChatStickerSetParameters(chat_id: IntOrString)Arguments
- chat_id
-
Unique identifier for the target chat or username of the target supergroup (in the format
@supergroupusername)
Parameters for deleteEphemeralMessage (Bot API 10.2).
pub type DeleteEphemeralMessageParameters {
DeleteEphemeralMessageParameters(
chat_id: IntOrString,
receiver_user_id: Int,
ephemeral_message_id: Int,
)
}
Constructors
-
DeleteEphemeralMessageParameters( chat_id: IntOrString, receiver_user_id: Int, ephemeral_message_id: Int, )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel
- receiver_user_id
-
Unique identifier of the user who received the ephemeral message
- ephemeral_message_id
-
Identifier of the ephemeral message to delete
pub type DeleteForumTopicParameters {
DeleteForumTopicParameters(
chat_id: IntOrString,
message_thread_id: Int,
)
}
Constructors
-
DeleteForumTopicParameters( chat_id: IntOrString, message_thread_id: Int, )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target supergroup (in the format
@supergroupusername) - message_thread_id
-
Unique identifier for the target message thread of the forum topic
pub type DeleteMessageParameters {
DeleteMessageParameters(chat_id: IntOrString, message_id: Int)
}
Constructors
-
DeleteMessageParameters(chat_id: IntOrString, message_id: Int)Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel (in the format
@channelusername) - message_id
-
Identifier of the message to delete
Parameters for deleteMessageReaction (Bot API 10.0).
pub type DeleteMessageReactionParameters {
DeleteMessageReactionParameters(
chat_id: IntOrString,
message_id: Int,
user_id: Int,
reaction: ReactionType,
)
}
Constructors
-
DeleteMessageReactionParameters( chat_id: IntOrString, message_id: Int, user_id: Int, reaction: ReactionType, )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel
- message_id
-
Identifier of the target message
- user_id
-
Identifier of the user who set the reaction
- reaction
-
The reaction to remove from the message
pub type DeleteMessagesParameters {
DeleteMessagesParameters(
chat_id: IntOrString,
message_ids: List(Int),
)
}
Constructors
-
DeleteMessagesParameters( chat_id: IntOrString, message_ids: List(Int), )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel (in the format
@channelusername) - message_ids
-
A JSON-serialized list of 1-100 identifiers of messages to delete
pub type DeleteStickerFromSetParameters {
DeleteStickerFromSetParameters(sticker: String)
}
Constructors
-
DeleteStickerFromSetParameters(sticker: String)Arguments
- sticker
-
File identifier of the sticker
pub type DeleteStickerSetParameters {
DeleteStickerSetParameters(name: String)
}
Constructors
-
DeleteStickerSetParameters(name: String)Arguments
- name
-
Sticker set name
pub type DeleteStoryParameters {
DeleteStoryParameters(
business_connection_id: String,
story_id: Int,
)
}
Constructors
-
DeleteStoryParameters( business_connection_id: String, story_id: Int, )Arguments
- business_connection_id
-
Unique identifier of the business connection
- story_id
-
Unique identifier of the story to delete
Official reference: This object represents an animated emoji that displays a random value.
pub type Dice {
Dice(emoji: String, value: Int)
}
Constructors
-
Dice(emoji: String, value: Int)Arguments
- emoji
-
Emoji on which the dice throw animation is based
- value
-
Value of the dice, 1-6 for “🎲”, “🎯” and “🎳” base emoji, 1-5 for “🏀” and “⚽” base emoji, 1-64 for “🎰” base emoji
Official reference: Describes a service message about a change in the price of direct messages sent to a channel chat.
pub type DirectMessagePriceChanged {
DirectMessagePriceChanged(
are_direct_messages_enabled: Bool,
direct_message_star_count: option.Option(Int),
)
}
Constructors
-
DirectMessagePriceChanged( are_direct_messages_enabled: Bool, direct_message_star_count: option.Option(Int), )Arguments
- are_direct_messages_enabled
-
True, if direct messages are enabled for the channel chat; False otherwise
- direct_message_star_count
-
Optional. The new number of Telegram Stars that must be paid by users for each direct message sent to the channel. Does not apply to users who have been exempted by administrators. Defaults to 0.
Official reference: Describes a topic of a direct messages chat.
pub type DirectMessagesTopic {
DirectMessagesTopic(topic_id: Int, user: option.Option(User))
}
Constructors
-
DirectMessagesTopic(topic_id: Int, user: option.Option(User))Arguments
- topic_id
-
Unique identifier of the topic. 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 64-bit integer or double-precision float type are safe for storing this identifier.
- user
-
Optional. Information about the user that created the topic. Currently, it is always present.
Official reference: This object represents a general file (as opposed to photos, voice messages and audio files).
pub type Document {
Document(
file_id: String,
file_unique_id: String,
thumbnail: option.Option(PhotoSize),
file_name: option.Option(String),
mime_type: option.Option(String),
file_size: option.Option(Int),
)
}
Constructors
-
Document( file_id: String, file_unique_id: String, thumbnail: option.Option(PhotoSize), file_name: option.Option(String), mime_type: option.Option(String), file_size: option.Option(Int), )Arguments
- file_id
-
Identifier for this file, which can be used to download or reuse the file
- file_unique_id
-
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can’t be used to download or reuse the file.
- thumbnail
-
Optional. Document thumbnail as defined by the sender
- file_name
-
Optional. Original filename as defined by the sender
- mime_type
-
Optional. MIME type of the file as defined by the sender
- file_size
-
Optional. File size in bytes. It can be bigger than 2^31 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 value.
pub type EditChatInviteLinkParameters {
EditChatInviteLinkParameters(
chat_id: IntOrString,
invite_link: String,
name: option.Option(String),
member_limit: option.Option(Int),
expire_date: option.Option(Int),
creates_join_request: option.Option(Bool),
)
}
Constructors
-
EditChatInviteLinkParameters( chat_id: IntOrString, invite_link: String, name: option.Option(String), member_limit: option.Option(Int), expire_date: option.Option(Int), creates_join_request: option.Option(Bool), )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel (in the format
@channelusername) - invite_link
-
Unique identifier of the invite link
- name
-
Invite link name; 0-32 characters
- member_limit
-
The maximum number of users that can be members of the chat simultaneously after joining the chat via the link; 1-99999
- expire_date
-
Point in time (Unix timestamp) when the link will expire.
- creates_join_request
-
True, if users joining the chat via the link need to be approved by chat administrators. IfTrue,member_limitcan’t be specified
pub type EditChatSubscriptionInviteLinkParameters {
EditChatSubscriptionInviteLinkParameters(
chat_id: IntOrString,
invite_link: String,
name: option.Option(String),
)
}
Constructors
-
EditChatSubscriptionInviteLinkParameters( chat_id: IntOrString, invite_link: String, name: option.Option(String), )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel (in the format
@channelusername) - invite_link
-
The invite link to edit
- name
-
Invite link name; 0-32 characters
Parameters for editEphemeralMessageCaption (Bot API 10.2).
pub type EditEphemeralMessageCaptionParameters {
EditEphemeralMessageCaptionParameters(
chat_id: IntOrString,
receiver_user_id: Int,
ephemeral_message_id: Int,
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
reply_markup: option.Option(InlineKeyboardMarkup),
)
}
Constructors
-
EditEphemeralMessageCaptionParameters( chat_id: IntOrString, receiver_user_id: Int, ephemeral_message_id: Int, caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), reply_markup: option.Option(InlineKeyboardMarkup), )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel
- receiver_user_id
-
Unique identifier of the user who received the ephemeral message
- ephemeral_message_id
-
Identifier of the ephemeral message to edit
- caption
-
Optional. New caption of the message, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the message caption
- caption_entities
-
Optional. A JSON-serialized list of special entities that appear in the caption
- reply_markup
-
Optional. A JSON-serialized object for an inline keyboard
Parameters for editEphemeralMessageMedia (Bot API 10.2).
pub type EditEphemeralMessageMediaParameters {
EditEphemeralMessageMediaParameters(
chat_id: IntOrString,
receiver_user_id: Int,
ephemeral_message_id: Int,
media: InputMedia,
reply_markup: option.Option(InlineKeyboardMarkup),
)
}
Constructors
-
EditEphemeralMessageMediaParameters( chat_id: IntOrString, receiver_user_id: Int, ephemeral_message_id: Int, media: InputMedia, reply_markup: option.Option(InlineKeyboardMarkup), )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel
- receiver_user_id
-
Unique identifier of the user who received the ephemeral message
- ephemeral_message_id
-
Identifier of the ephemeral message to edit
- media
-
A JSON-serialized object for a new media content of the message
- reply_markup
-
Optional. A JSON-serialized object for an inline keyboard
Parameters for editEphemeralMessageReplyMarkup (Bot API 10.2).
pub type EditEphemeralMessageReplyMarkupParameters {
EditEphemeralMessageReplyMarkupParameters(
chat_id: IntOrString,
receiver_user_id: Int,
ephemeral_message_id: Int,
reply_markup: option.Option(InlineKeyboardMarkup),
)
}
Constructors
-
EditEphemeralMessageReplyMarkupParameters( chat_id: IntOrString, receiver_user_id: Int, ephemeral_message_id: Int, reply_markup: option.Option(InlineKeyboardMarkup), )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel
- receiver_user_id
-
Unique identifier of the user who received the ephemeral message
- ephemeral_message_id
-
Identifier of the ephemeral message to edit
- reply_markup
-
Optional. A JSON-serialized object for an inline keyboard
Parameters for editEphemeralMessageText (Bot API 10.2).
pub type EditEphemeralMessageTextParameters {
EditEphemeralMessageTextParameters(
chat_id: IntOrString,
receiver_user_id: Int,
ephemeral_message_id: Int,
text: String,
parse_mode: option.Option(String),
entities: option.Option(List(MessageEntity)),
link_preview_options: option.Option(LinkPreviewOptions),
reply_markup: option.Option(InlineKeyboardMarkup),
)
}
Constructors
-
EditEphemeralMessageTextParameters( chat_id: IntOrString, receiver_user_id: Int, ephemeral_message_id: Int, text: String, parse_mode: option.Option(String), entities: option.Option(List(MessageEntity)), link_preview_options: option.Option(LinkPreviewOptions), reply_markup: option.Option(InlineKeyboardMarkup), )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel
- receiver_user_id
-
Unique identifier of the user who received the ephemeral message
- ephemeral_message_id
-
Identifier of the ephemeral message to edit
- text
-
New text of the message, 1-4096 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the message text
- entities
-
Optional. A JSON-serialized list of special entities that appear in message text
- link_preview_options
-
Optional. Link preview generation options for the message
- reply_markup
-
Optional. A JSON-serialized object for an inline keyboard
pub type EditForumTopicParameters {
EditForumTopicParameters(
chat_id: IntOrString,
message_thread_id: Int,
name: option.Option(String),
icon_custom_emoji_id: option.Option(String),
)
}
Constructors
-
EditForumTopicParameters( chat_id: IntOrString, message_thread_id: Int, name: option.Option(String), icon_custom_emoji_id: option.Option(String), )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target supergroup (in the format
@supergroupusername) - message_thread_id
-
Unique identifier for the target message thread of the forum topic
- name
-
New topic name, 0-128 characters
- icon_custom_emoji_id
-
New unique identifier of the custom emoji shown as the topic icon
pub type EditGeneralForumTopicParameters {
EditGeneralForumTopicParameters(
chat_id: IntOrString,
name: String,
)
}
Constructors
-
EditGeneralForumTopicParameters( chat_id: IntOrString, name: String, )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target supergroup (in the format
@supergroupusername) - name
-
New topic name, 1-128 characters
pub type EditMessageCaptionParameters {
EditMessageCaptionParameters(
business_connection_id: option.Option(String),
chat_id: option.Option(IntOrString),
message_id: option.Option(Int),
inline_message_id: option.Option(String),
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
show_caption_above_media: option.Option(Bool),
reply_markup: option.Option(InlineKeyboardMarkup),
)
}
Constructors
-
EditMessageCaptionParameters( business_connection_id: option.Option(String), chat_id: option.Option(IntOrString), message_id: option.Option(Int), inline_message_id: option.Option(String), caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), show_caption_above_media: option.Option(Bool), reply_markup: option.Option(InlineKeyboardMarkup), )Arguments
- business_connection_id
-
Unique identifier of the business connection on behalf of which the message to be edited was sent
- chat_id
-
Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format
@channelusername) - message_id
-
Required if inline_message_id is not specified. Identifier of the message to edit
- inline_message_id
-
Required if chat_id and message_id are not specified. Identifier of the inline message
- caption
-
New text of the message, 1-4096 characters after entities parsing
- parse_mode
-
Mode for parsing entities in the message text. See formatting options for more details.
- caption_entities
-
A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode
- show_caption_above_media
-
Link preview generation options for the message
- reply_markup
-
A JSON-serialized object for an inline keyboard.
pub type EditMessageLiveLocationParameters {
EditMessageLiveLocationParameters(
business_connection_id: option.Option(String),
chat_id: option.Option(IntOrString),
message_id: option.Option(Int),
inline_message_id: option.Option(String),
latitude: Float,
longitude: Float,
live_period: option.Option(Int),
horizontal_accuracy: option.Option(Float),
heading: option.Option(Int),
proximity_alert_radius: option.Option(Int),
reply_markup: option.Option(InlineKeyboardMarkup),
)
}
Constructors
-
EditMessageLiveLocationParameters( business_connection_id: option.Option(String), chat_id: option.Option(IntOrString), message_id: option.Option(Int), inline_message_id: option.Option(String), latitude: Float, longitude: Float, live_period: option.Option(Int), horizontal_accuracy: option.Option(Float), heading: option.Option(Int), proximity_alert_radius: option.Option(Int), reply_markup: option.Option(InlineKeyboardMarkup), )Arguments
- business_connection_id
-
Unique identifier of the business connection
- chat_id
-
Unique identifier for the target chat
- message_id
-
Identifier of the message to edit
- inline_message_id
-
Identifier of the inline message
- latitude
-
Latitude of new location
- longitude
-
Longitude of new location
- live_period
-
Period for location updates
- horizontal_accuracy
-
Radius of uncertainty for the location
- heading
-
Direction of movement
- proximity_alert_radius
-
Maximum distance for proximity alerts
- reply_markup
-
Inline keyboard markup
pub type EditMessageMediaParameters {
EditMessageMediaParameters(
business_connection_id: option.Option(String),
chat_id: option.Option(IntOrString),
message_id: option.Option(Int),
inline_message_id: option.Option(String),
media: InputMedia,
reply_markup: option.Option(InlineKeyboardMarkup),
)
}
Constructors
-
EditMessageMediaParameters( business_connection_id: option.Option(String), chat_id: option.Option(IntOrString), message_id: option.Option(Int), inline_message_id: option.Option(String), media: InputMedia, reply_markup: option.Option(InlineKeyboardMarkup), )Arguments
- business_connection_id
-
Unique identifier of the business connection on behalf of which the message to be edited was sent
- chat_id
-
Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format
@channelusername) - message_id
-
Required if inline_message_id is not specified. Identifier of the message to edit
- inline_message_id
-
Required if chat_id and message_id are not specified. Identifier of the inline message
- media
-
A JSON-serialized object for a new media content of the message
- reply_markup
-
A JSON-serialized object for an inline keyboard.
pub type EditMessageReplyMarkupParameters {
EditMessageReplyMarkupParameters(
business_connection_id: option.Option(String),
chat_id: option.Option(IntOrString),
message_id: option.Option(Int),
inline_message_id: option.Option(String),
reply_markup: option.Option(InlineKeyboardMarkup),
)
}
Constructors
-
EditMessageReplyMarkupParameters( business_connection_id: option.Option(String), chat_id: option.Option(IntOrString), message_id: option.Option(Int), inline_message_id: option.Option(String), reply_markup: option.Option(InlineKeyboardMarkup), )Arguments
- business_connection_id
-
Unique identifier of the business connection on behalf of which the message to be edited was sent
- chat_id
-
Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format
@channelusername) - message_id
-
Required if inline_message_id is not specified. Identifier of the message to edit
- inline_message_id
-
Required if chat_id and message_id are not specified. Identifier of the inline message
- reply_markup
-
A JSON-serialized object for an inline keyboard
pub type EditMessageTextParameters {
EditMessageTextParameters(
chat_id: option.Option(IntOrString),
message_id: option.Option(Int),
inline_message_id: option.Option(String),
text: String,
parse_mode: option.Option(String),
entities: option.Option(List(MessageEntity)),
link_preview_options: option.Option(LinkPreviewOptions),
reply_markup: option.Option(InlineKeyboardMarkup),
)
}
Constructors
-
EditMessageTextParameters( chat_id: option.Option(IntOrString), message_id: option.Option(Int), inline_message_id: option.Option(String), text: String, parse_mode: option.Option(String), entities: option.Option(List(MessageEntity)), link_preview_options: option.Option(LinkPreviewOptions), reply_markup: option.Option(InlineKeyboardMarkup), )Arguments
- chat_id
-
Required if inline_message_id is not specified. Unique identifier for the target chat or username of the target channel (in the format
@channelusername) - message_id
-
Required if inline_message_id is not specified. Identifier of the message to edit
- inline_message_id
-
Required if chat_id and message_id are not specified. Identifier of the inline message
- text
-
New text of the message, 1-4096 characters after entities parsing
- parse_mode
-
Mode for parsing entities in the message text. See formatting options for more details.
- entities
-
A JSON-serialized list of special entities that appear in message text, which can be specified instead of parse_mode
- link_preview_options
-
Link preview generation options for the message
- reply_markup
-
A JSON-serialized object for an inline keyboard.
pub type EditStoryParameters {
EditStoryParameters(
business_connection_id: String,
story_id: Int,
content: InputStoryContent,
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
areas: option.Option(List(StoryArea)),
)
}
Constructors
-
EditStoryParameters( business_connection_id: String, story_id: Int, content: InputStoryContent, caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), areas: option.Option(List(StoryArea)), )Arguments
- business_connection_id
-
Unique identifier of the business connection
- story_id
-
Unique identifier of the story to edit
- content
-
Content of the story
- caption
-
Caption of the story, 0-2048 characters after entities parsing
- parse_mode
-
Mode for parsing entities in the story caption. See formatting options for more details.
- caption_entities
-
A JSON-serialized list of special entities that appear in the caption, which can be specified instead of parse_mode
- areas
-
A JSON-serialized list of clickable areas to be shown on the story
pub type EditUserStarSubscriptionParameters {
EditUserStarSubscriptionParameters(
user_id: Int,
telegram_payment_charge_id: String,
is_canceled: Bool,
)
}
Constructors
-
EditUserStarSubscriptionParameters( user_id: Int, telegram_payment_charge_id: String, is_canceled: Bool, )Arguments
- user_id
-
Identifier of the user whose subscription will be edited
- telegram_payment_charge_id
-
Telegram payment identifier for the subscription
- is_canceled
-
Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass False to allow the user to re-enable a subscription that was previously canceled by the bot.
Official reference: Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.
pub type EncryptedCredentials {
EncryptedCredentials(
data: String,
hash: String,
secret: String,
)
}
Constructors
-
EncryptedCredentials(data: String, hash: String, secret: String)Arguments
- data
-
Base64-encoded encrypted JSON-serialized data with unique user’s payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication
- hash
-
Base64-encoded data hash for data authentication
- secret
-
Base64-encoded secret, encrypted with the bot’s public RSA key, required for data decryption
Official reference: Describes documents or other Telegram Passport elements shared with the bot by the user.
pub type EncryptedPassportElement {
EncryptedPassportElement(
type_: String,
data: option.Option(String),
phone_number: option.Option(String),
email: option.Option(String),
files: option.Option(List(PassportFile)),
front_side: option.Option(PassportFile),
reverse_side: option.Option(PassportFile),
selfie: option.Option(PassportFile),
translation: option.Option(List(PassportFile)),
hash: String,
)
}
Constructors
-
EncryptedPassportElement( type_: String, data: option.Option(String), phone_number: option.Option(String), email: option.Option(String), files: option.Option(List(PassportFile)), front_side: option.Option(PassportFile), reverse_side: option.Option(PassportFile), selfie: option.Option(PassportFile), translation: option.Option(List(PassportFile)), hash: String, )Arguments
- type_
-
Element type. One of “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport”, “address”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration”, “temporary_registration”, “phone_number”, “email”.
- data
-
Optional. Base64-encoded encrypted Telegram Passport element data provided by the user; available only for “personal_details”, “passport”, “driver_license”, “identity_card”, “internal_passport” and “address” types. Can be decrypted and verified using the accompanying EncryptedCredentials.
- phone_number
-
Optional. User’s verified phone number; available only for “phone_number” type
-
Optional. User’s verified email address; available only for “email” type
- files
-
Optional. Array of encrypted files with documents provided by the user; available only for “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
- front_side
-
Optional. Encrypted file with the front side of the document, provided by the user; available only for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
- reverse_side
-
Optional. Encrypted file with the reverse side of the document, provided by the user; available only for “driver_license” and “identity_card”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
- selfie
-
Optional. Encrypted file with the selfie of the user holding a document, provided by the user; available if requested for “passport”, “driver_license”, “identity_card” and “internal_passport”. The file can be decrypted and verified using the accompanying EncryptedCredentials.
- translation
-
Optional. Array of encrypted files with translated versions of documents provided by the user; available if requested for “passport”, “driver_license”, “identity_card”, “internal_passport”, “utility_bill”, “bank_statement”, “rental_agreement”, “passport_registration” and “temporary_registration” types. Files can be decrypted and verified using the accompanying EncryptedCredentials.
- hash
-
Base64-encoded element hash for using in PassportElementErrorUnspecified
pub type ExportChatInviteLinkParameters {
ExportChatInviteLinkParameters(chat_id: IntOrString)
}
Constructors
-
ExportChatInviteLinkParameters(chat_id: IntOrString)Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel (in the format
@channelusername)
Official reference: This object contains information about a message that is being replied to, which may come from another chat or forum topic.
pub type ExternalReplyInfo {
ExternalReplyInfo(
origin: MessageOrigin,
chat: option.Option(Chat),
message_id: option.Option(Int),
link_preview_options: option.Option(LinkPreviewOptions),
animation: option.Option(Animation),
audio: option.Option(Audio),
document: option.Option(Document),
live_photo: option.Option(LivePhoto),
paid_media: option.Option(PaidMediaInfo),
photo: option.Option(List(PhotoSize)),
sticker: option.Option(Sticker),
story: option.Option(Story),
video: option.Option(Video),
video_note: option.Option(VideoNote),
voice: option.Option(Voice),
has_media_spoiler: option.Option(Bool),
checklist: option.Option(Checklist),
contact: option.Option(Contact),
dice: option.Option(Dice),
game: option.Option(Game),
giveaway: option.Option(Giveaway),
giveaway_winners: option.Option(GiveawayWinners),
invoice: option.Option(Invoice),
location: option.Option(Location),
poll: option.Option(Poll),
venue: option.Option(Venue),
)
}
Constructors
-
ExternalReplyInfo( origin: MessageOrigin, chat: option.Option(Chat), message_id: option.Option(Int), link_preview_options: option.Option(LinkPreviewOptions), animation: option.Option(Animation), audio: option.Option(Audio), document: option.Option(Document), live_photo: option.Option(LivePhoto), paid_media: option.Option(PaidMediaInfo), photo: option.Option(List(PhotoSize)), sticker: option.Option(Sticker), story: option.Option(Story), video: option.Option(Video), video_note: option.Option(VideoNote), voice: option.Option(Voice), has_media_spoiler: option.Option(Bool), checklist: option.Option(Checklist), contact: option.Option(Contact), dice: option.Option(Dice), game: option.Option(Game), giveaway: option.Option(Giveaway), giveaway_winners: option.Option(GiveawayWinners), invoice: option.Option(Invoice), location: option.Option(Location), poll: option.Option(Poll), venue: option.Option(Venue), )Arguments
- origin
-
Origin of the message replied to by the given message
- chat
-
Optional. Chat the original message belongs to. Available only if the chat is a supergroup or a channel.
- message_id
-
Optional. Unique message identifier inside the original chat. Available only if the original chat is a supergroup or a channel.
- link_preview_options
-
Optional. Options used for link preview generation for the original message, if it is a text message
- animation
-
Optional. Message is an animation, information about the animation
- audio
-
Optional. Message is an audio file, information about the file
- document
-
Optional. Message is a general file, information about the file
- live_photo
-
Optional. Message is a live photo, information about the live photo
- paid_media
-
Optional. Message contains paid media; information about the paid media
- photo
-
Optional. Message is a photo, available sizes of the photo
- sticker
-
Optional. Message is a sticker, information about the sticker
- story
-
Optional. Message is a forwarded story
- video
-
Optional. Message is a video, information about the video
- video_note
-
Optional. Message is a video note, information about the video message
- voice
-
Optional. Message is a voice message, information about the file
- has_media_spoiler
-
Optional. True, if the message media is covered by a spoiler animation
- checklist
-
Optional. Message is a checklist
- contact
-
Optional. Message is a shared contact, information about the contact
- dice
-
Optional. Message is a dice with random value
- game
-
Optional. Message is a game, information about the game. More about games: https://core.telegram.org/bots/api#games
- giveaway
-
Optional. Message is a scheduled giveaway, information about the giveaway
- giveaway_winners
-
Optional. A giveaway with public winners was completed
- invoice
-
Optional. Message is an invoice for a payment, information about the invoice. More about payments: https://core.telegram.org/bots/api#payments
- location
-
Optional. Message is a shared location, information about the location
- poll
-
Optional. Message is a native poll, information about the poll
- venue
-
Optional. Message is a venue, information about the venue
Official reference: This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot
pub type File {
File(
file_id: String,
file_unique_id: String,
file_size: option.Option(Int),
file_path: option.Option(String),
)
}
Constructors
-
File( file_id: String, file_unique_id: String, file_size: option.Option(Int), file_path: option.Option(String), )Arguments
- file_id
-
Identifier for this file, which can be used to download or reuse the file
- file_unique_id
-
Unique identifier for this file, which is supposed to be the same over time and for different bots. Can’t be used to download or reuse the file.
- file_size
-
Optional. File size in bytes. It can be bigger than 2^31 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 value.
- file_path
-
Optional. File path. Use https://api.telegram.org/file/bot
/<file_path> to get the file.
Official reference: Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot’s message and tapped ‘Reply’). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. Not supported in channels and for messages sent on behalf of a user account.
pub type ForceReply {
ForceReply(
force_reply: Bool,
input_field_placeholder: option.Option(String),
selective: option.Option(Bool),
)
}
Constructors
-
ForceReply( force_reply: Bool, input_field_placeholder: option.Option(String), selective: option.Option(Bool), )Arguments
- force_reply
-
Shows reply interface to the user, as if they manually selected the bot’s message and tapped ‘Reply’
- input_field_placeholder
-
Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters
- selective
-
Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot’s message is a reply to a message in the same chat and forum topic, sender of the original message.
Official reference: This object represents a forum topic.
pub type ForumTopic {
ForumTopic(
message_thread_id: Int,
name: String,
icon_color: Int,
icon_custom_emoji_id: option.Option(String),
is_name_implicit: option.Option(Bool),
)
}
Constructors
-
ForumTopic( message_thread_id: Int, name: String, icon_color: Int, icon_custom_emoji_id: option.Option(String), is_name_implicit: option.Option(Bool), )Arguments
- message_thread_id
-
Unique identifier of the forum topic
- name
-
Name of the topic
- icon_color
-
Color of the topic icon in RGB format
- icon_custom_emoji_id
-
Optional. Unique identifier of the custom emoji shown as the topic icon
- is_name_implicit
-
Optional. True, if the name of the topic wasn’t specified explicitly by its creator and likely needs to be changed by the bot
Official reference: This object represents a service message about a forum topic closed in the chat. Currently holds no information.
pub type ForumTopicClosed {
ForumTopicClosed
}
Constructors
-
ForumTopicClosed
Official reference: This object represents a service message about a new forum topic created in the chat.
pub type ForumTopicCreated {
ForumTopicCreated(
name: String,
icon_color: Int,
icon_custom_emoji_id: option.Option(String),
is_name_implicit: option.Option(Bool),
)
}
Constructors
-
ForumTopicCreated( name: String, icon_color: Int, icon_custom_emoji_id: option.Option(String), is_name_implicit: option.Option(Bool), )Arguments
- name
-
Name of the topic
- icon_color
-
Color of the topic icon in RGB format
- icon_custom_emoji_id
-
Optional. Unique identifier of the custom emoji shown as the topic icon
- is_name_implicit
-
Optional. True, if the name of the topic wasn’t specified explicitly by its creator and likely needs to be changed by the bot
Official reference: This object represents a service message about an edited forum topic.
pub type ForumTopicEdited {
ForumTopicEdited(
name: option.Option(String),
icon_custom_emoji_id: option.Option(String),
)
}
Constructors
-
ForumTopicEdited( name: option.Option(String), icon_custom_emoji_id: option.Option(String), )Arguments
- name
-
Optional. New name of the topic, if it was edited
- icon_custom_emoji_id
-
Optional. New identifier of the custom emoji shown as the topic icon, if it was edited; an empty string if the icon was removed
Official reference: This object represents a service message about a forum topic reopened in the chat. Currently holds no information.
pub type ForumTopicReopened {
ForumTopicReopened
}
Constructors
-
ForumTopicReopened
https://core.telegram.org/bots/api#forwardmessage
pub type ForwardMessageParameters {
ForwardMessageParameters(
chat_id: IntOrString,
from_chat_id: IntOrString,
message_id: Int,
disable_notification: option.Option(Bool),
message_thread_id: option.Option(Int),
protect_content: option.Option(Bool),
)
}
Constructors
-
ForwardMessageParameters( chat_id: IntOrString, from_chat_id: IntOrString, message_id: Int, disable_notification: option.Option(Bool), message_thread_id: option.Option(Int), protect_content: option.Option(Bool), )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel (in the format
@channelusername) - from_chat_id
-
Unique identifier for the chat where the original message was sent (or channel username in the format
@channelusername) - message_id
-
Message identifier in the chat specified in from_chat_id
- disable_notification
-
Sends the message silently. Users will receive a notification with no sound.
- message_thread_id
-
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
- protect_content
-
Protects the contents of the forwarded message from forwarding and saving
https://core.telegram.org/bots/api#forwardmessages
pub type ForwardMessagesParameters {
ForwardMessagesParameters(
chat_id: IntOrString,
message_thread_id: option.Option(Int),
from_chat_id: IntOrString,
message_ids: List(Int),
disable_notification: option.Option(Bool),
protect_content: option.Option(Bool),
)
}
Constructors
-
ForwardMessagesParameters( chat_id: IntOrString, message_thread_id: option.Option(Int), from_chat_id: IntOrString, message_ids: List(Int), disable_notification: option.Option(Bool), protect_content: option.Option(Bool), )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel (in the format
@channelusername) - message_thread_id
-
Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
- from_chat_id
-
Unique identifier for the chat where the original messages were sent (or channel username in the format
@channelusername) - message_ids
-
A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to forward. The identifiers must be specified in a strictly increasing order.
- disable_notification
-
Sends the messages silently. Users will receive a notification with no sound.
- protect_content
-
Protects the contents of the forwarded messages from forwarding and saving
Official reference: This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
pub type Game {
Game(
title: String,
description: String,
photo: List(PhotoSize),
text: option.Option(String),
text_entities: option.Option(List(MessageEntity)),
animation: option.Option(Animation),
)
}
Constructors
-
Game( title: String, description: String, photo: List(PhotoSize), text: option.Option(String), text_entities: option.Option(List(MessageEntity)), animation: option.Option(Animation), )Arguments
- title
-
Title of the game
- description
-
Description of the game
- photo
-
Photo that will be displayed in the game message in chats
- text
-
Optional. Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.
- text_entities
-
Optional. Special entities that appear in text, such as usernames, URLs, bot commands, etc.
- animation
-
Optional. Animation that will be displayed in the game message in chats. Upload via BotFather.
Official reference: This object represents one row of the high scores table for a game.
pub type GameHighScore {
GameHighScore(position: Int, user: User, score: Int)
}
Constructors
-
GameHighScore(position: Int, user: User, score: Int)Arguments
- position
-
Position in high score table for the game
- user
-
User
- score
-
Score
Official reference: This object represents a service message about General forum topic hidden in the chat. Currently holds no information.
pub type GeneralForumTopicHidden {
GeneralForumTopicHidden
}
Constructors
-
GeneralForumTopicHidden
Official reference: This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.
pub type GeneralForumTopicUnhidden {
GeneralForumTopicUnhidden
}
Constructors
-
GeneralForumTopicUnhidden
pub type GetBusinessAccountGiftsParameters {
GetBusinessAccountGiftsParameters(
business_connection_id: String,
exclude_unsaved: option.Option(Bool),
exclude_saved: option.Option(Bool),
exclude_unlimited: option.Option(Bool),
exclude_limited: option.Option(Bool),
exclude_unique: option.Option(Bool),
sort_by_price: option.Option(Bool),
offset: option.Option(String),
limit: option.Option(Int),
)
}
Constructors
-
GetBusinessAccountGiftsParameters( business_connection_id: String, exclude_unsaved: option.Option(Bool), exclude_saved: option.Option(Bool), exclude_unlimited: option.Option(Bool), exclude_limited: option.Option(Bool), exclude_unique: option.Option(Bool), sort_by_price: option.Option(Bool), offset: option.Option(String), limit: option.Option(Int), )Arguments
- business_connection_id
-
Unique identifier of the business connection
- exclude_unsaved
-
Pass True to exclude gifts that aren’t saved to the account’s profile page
- exclude_saved
-
Pass True to exclude gifts that are saved to the account’s profile page
- exclude_unlimited
-
Pass True to exclude gifts that can be purchased an unlimited number of times
- exclude_limited
-
Pass True to exclude gifts that can be purchased a limited number of times
- exclude_unique
-
Pass True to exclude unique gifts
- sort_by_price
-
Pass True to sort results by gift price instead of send date. Sorting is applied before pagination.
- offset
-
Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
- limit
-
The maximum number of gifts to be returned; 1-100. Defaults to 100
pub type GetBusinessAccountStarBalanceParameters {
GetBusinessAccountStarBalanceParameters(
business_connection_id: String,
)
}
Constructors
-
GetBusinessAccountStarBalanceParameters( business_connection_id: String, )Arguments
- business_connection_id
-
Unique identifier of the business connection
pub type GetBusinessConnectionParameters {
GetBusinessConnectionParameters(business_connection_id: String)
}
Constructors
-
GetBusinessConnectionParameters(business_connection_id: String)Arguments
- business_connection_id
-
Unique identifier of the business connection
pub type GetChatAdministratorsParameters {
GetChatAdministratorsParameters(
chat_id: IntOrString,
return_bots: option.Option(Bool),
)
}
Constructors
-
GetChatAdministratorsParameters( chat_id: IntOrString, return_bots: option.Option(Bool), )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target supergroup or channel (in the format
@channelusername) - return_bots
-
Bot API 10.0: pass True to also include bots in the returned list
Parameters for the getChatGifts method
pub type GetChatGiftsParameters {
GetChatGiftsParameters(
chat_id: IntOrString,
exclude_unsaved: option.Option(Bool),
exclude_saved: option.Option(Bool),
exclude_unlimited: option.Option(Bool),
exclude_limited_upgradable: option.Option(Bool),
exclude_limited_non_upgradable: option.Option(Bool),
exclude_from_blockchain: option.Option(Bool),
exclude_unique: option.Option(Bool),
sort_by_price: option.Option(Bool),
offset: option.Option(String),
limit: option.Option(Int),
)
}
Constructors
-
GetChatGiftsParameters( chat_id: IntOrString, exclude_unsaved: option.Option(Bool), exclude_saved: option.Option(Bool), exclude_unlimited: option.Option(Bool), exclude_limited_upgradable: option.Option(Bool), exclude_limited_non_upgradable: option.Option(Bool), exclude_from_blockchain: option.Option(Bool), exclude_unique: option.Option(Bool), sort_by_price: option.Option(Bool), offset: option.Option(String), limit: option.Option(Int), )Arguments
- chat_id
-
Unique identifier for the target chat or username of the target channel
- exclude_unsaved
-
Optional. Pass True to exclude gifts that aren’t saved to the chat’s profile page
- exclude_saved
-
Optional. Pass True to exclude gifts that are saved to the chat’s profile page
- exclude_unlimited
-
Optional. Pass True to exclude gifts that can be purchased an unlimited number of times
- exclude_limited_upgradable
-
Optional. Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique
- exclude_limited_non_upgradable
-
Optional. Pass True to exclude gifts that can be purchased a limited number of times and can’t be upgraded to unique
- exclude_from_blockchain
-
Optional. Pass True to exclude gifts that were assigned from the TON blockchain
- exclude_unique
-
Optional. Pass True to exclude unique gifts
- sort_by_price
-
Optional. Pass True to sort results by gift price instead of send date
- offset
-
Optional. Offset of the first entry to return
- limit
-
Optional. The maximum number of gifts to be returned; 1-100. Defaults to 100
pub type GetChatMemberCountParameters {
GetChatMemberCountParameters(chat_id: IntOrString)
}
Constructors
-
GetChatMemberCountParameters(chat_id: IntOrString)Arguments
- chat_id
-
Unique identifier for the target chat or username of the target supergroup or channel (in the format
@channelusername)
pub type GetChatMemberParameters {
GetChatMemberParameters(chat_id: IntOrString, user_id: Int)
}
Constructors
-
GetChatMemberParameters(chat_id: IntOrString, user_id: Int)Arguments
- chat_id
-
Unique identifier for the target chat or username of the target supergroup or channel (in the format
@channelusername) - user_id
-
Unique identifier of the target user
pub type GetChatMenuButtonParameters {
GetChatMenuButtonParameters(chat_id: option.Option(Int))
}
Constructors
-
GetChatMenuButtonParameters(chat_id: option.Option(Int))Arguments
- chat_id
-
Unique identifier for the target private chat. If not specified, default bot’s menu button will be returned
pub type GetCustomEmojiStickersParameters {
GetCustomEmojiStickersParameters(
custom_emoji_ids: List(String),
)
}
Constructors
-
GetCustomEmojiStickersParameters(custom_emoji_ids: List(String))Arguments
- custom_emoji_ids
-
A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.
pub type GetGameHighScoresParameters {
GetGameHighScoresParameters(
user_id: Int,
chat_id: option.Option(Int),
message_id: option.Option(Int),
inline_message_id: option.Option(String),
)
}
Constructors
-
GetGameHighScoresParameters( user_id: Int, chat_id: option.Option(Int), message_id: option.Option(Int), inline_message_id: option.Option(String), )Arguments
- user_id
-
Target user id
- chat_id
-
Required if inline_message_id is not specified. Unique identifier for the target chat
- message_id
-
Required if inline_message_id is not specified. Identifier of the sent message
- inline_message_id
-
Required if chat_id and message_id are not specified. Identifier of the inline message
Parameters for getManagedBotAccessSettings (Bot API 10.0).
pub type GetManagedBotAccessSettingsParameters {
GetManagedBotAccessSettingsParameters(bot_id: Int)
}
Constructors
-
GetManagedBotAccessSettingsParameters(bot_id: Int)Arguments
- bot_id
-
Unique identifier of the managed bot
pub type GetMyDefaultAdministratorRightsParameters {
GetMyDefaultAdministratorRightsParameters(
for_channels: option.Option(Bool),
)
}
Constructors
-
GetMyDefaultAdministratorRightsParameters( for_channels: option.Option(Bool), )Arguments
- for_channels
-
Pass True to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.
pub type GetMyDescriptionParameters {
GetMyDescriptionParameters(
language_code: option.Option(String),
)
}
Constructors
-
GetMyDescriptionParameters(language_code: option.Option(String))Arguments
- language_code
-
A two-letter ISO 639-1 language code or an empty string
pub type GetMyNameParameters {
GetMyNameParameters(language_code: option.Option(String))
}
Constructors
-
GetMyNameParameters(language_code: option.Option(String))Arguments
- language_code
-
A two-letter ISO 639-1 language code or an empty string
pub type GetMyShortDescriptionParameters {
GetMyShortDescriptionParameters(
language_code: option.Option(String),
)
}
Constructors
-
GetMyShortDescriptionParameters( language_code: option.Option(String), )Arguments
- language_code
-
A two-letter ISO 639-1 language code or an empty string
pub type GetStarTransactionsParameters {
GetStarTransactionsParameters(
offset: option.Option(Int),
limit: option.Option(Int),
)
}
Constructors
-
GetStarTransactionsParameters( offset: option.Option(Int), limit: option.Option(Int), )Arguments
- offset
-
Number of transactions to skip in the response
- limit
-
The maximum number of transactions to be retrieved. Values between 1-100 are accepted. Defaults to 100.
pub type GetStickerSetParameters {
GetStickerSetParameters(name: String)
}
Constructors
-
GetStickerSetParameters(name: String)Arguments
- name
-
Name of the sticker set
https://core.telegram.org/bots/api#getupdates
pub type GetUpdatesParameters {
GetUpdatesParameters(
offset: option.Option(Int),
limit: option.Option(Int),
timeout: option.Option(Int),
allowed_updates: option.Option(List(String)),
)
}
Constructors
-
GetUpdatesParameters( offset: option.Option(Int), limit: option.Option(Int), timeout: option.Option(Int), allowed_updates: option.Option(List(String)), )Arguments
- offset
-
Identifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as getUpdates is called with an offset higher than its update_id. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. All previous updates will be forgotten.
- limit
-
Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100.
- timeout
-
Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only.
- allowed_updates
-
A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member, message_reaction, and message_reaction_count (default). If not specified, the previous setting will be used.
Please note that this parameter doesn’t affect updates created before the call to getUpdates, so unwanted updates may be received for a short period of time.
pub type GetUserChatBoostsParameters {
GetUserChatBoostsParameters(chat_id: IntOrString, user_id: Int)
}
Constructors
-
GetUserChatBoostsParameters(chat_id: IntOrString, user_id: Int)Arguments
- chat_id
-
Unique identifier for the chat or username of the channel (in the format @channelusername)
- user_id
-
Unique identifier of the target user
Parameters for the getUserGifts method
pub type GetUserGiftsParameters {
GetUserGiftsParameters(
user_id: Int,
exclude_unlimited: option.Option(Bool),
exclude_limited_upgradable: option.Option(Bool),
exclude_limited_non_upgradable: option.Option(Bool),
exclude_from_blockchain: option.Option(Bool),
exclude_unique: option.Option(Bool),
sort_by_price: option.Option(Bool),
offset: option.Option(String),
limit: option.Option(Int),
)
}
Constructors
-
GetUserGiftsParameters( user_id: Int, exclude_unlimited: option.Option(Bool), exclude_limited_upgradable: option.Option(Bool), exclude_limited_non_upgradable: option.Option(Bool), exclude_from_blockchain: option.Option(Bool), exclude_unique: option.Option(Bool), sort_by_price: option.Option(Bool), offset: option.Option(String), limit: option.Option(Int), )Arguments
- user_id
-
Unique identifier of the user
- exclude_unlimited
-
Optional. Pass True to exclude gifts that can be purchased an unlimited number of times
- exclude_limited_upgradable
-
Optional. Pass True to exclude gifts that can be purchased a limited number of times and can be upgraded to unique
- exclude_limited_non_upgradable
-
Optional. Pass True to exclude gifts that can be purchased a limited number of times and can’t be upgraded to unique
- exclude_from_blockchain
-
Optional. Pass True to exclude gifts that were assigned from the TON blockchain
- exclude_unique
-
Optional. Pass True to exclude unique gifts
- sort_by_price
-
Optional. Pass True to sort results by gift price instead of send date
- offset
-
Optional. Offset of the first entry to return
- limit
-
Optional. The maximum number of gifts to be returned; 1-100. Defaults to 100
Parameters for getUserPersonalChatMessages (Bot API 10.0).
pub type GetUserPersonalChatMessagesParameters {
GetUserPersonalChatMessagesParameters(
user_id: Int,
message_ids: List(Int),
)
}
Constructors
-
GetUserPersonalChatMessagesParameters( user_id: Int, message_ids: List(Int), )Arguments
- user_id
-
Unique identifier of the target user
- message_ids
-
Identifiers of the messages to retrieve from the user’s personal chat (1-100)
pub type GetUserProfileAudiosParameters {
GetUserProfileAudiosParameters(
user_id: Int,
offset: option.Option(Int),
limit: option.Option(Int),
)
}
Constructors
-
GetUserProfileAudiosParameters( user_id: Int, offset: option.Option(Int), limit: option.Option(Int), )Arguments
- user_id
-
Unique identifier of the target user
- offset
-
Sequential number of the first audio to be returned (0-based)
- limit
-
Limits the number of audios to be retrieved (1-100)
pub type GetUserProfilePhotosParameters {
GetUserProfilePhotosParameters(
user_id: Int,
offset: option.Option(Int),
limit: option.Option(Int),
)
}
Constructors
-
GetUserProfilePhotosParameters( user_id: Int, offset: option.Option(Int), limit: option.Option(Int), )Arguments
- user_id
-
Unique identifier of the target user
- offset
-
Sequential number of the first photo to be returned (0-based)
- limit
-
Limits the number of photos to be retrieved (1-100)
Official reference: This object represents a gift that can be sent by the bot.
pub type Gift {
Gift(
id: String,
sticker: Sticker,
star_count: Int,
upgrade_star_count: option.Option(Int),
is_premium: option.Option(Bool),
has_colors: option.Option(Bool),
total_count: option.Option(Int),
remaining_count: option.Option(Int),
personal_total_count: option.Option(Int),
personal_remaining_count: option.Option(Int),
background: option.Option(GiftBackground),
unique_gift_variant_count: option.Option(Int),
publisher_chat: option.Option(Chat),
)
}
Constructors
-
Gift( id: String, sticker: Sticker, star_count: Int, upgrade_star_count: option.Option(Int), is_premium: option.Option(Bool), has_colors: option.Option(Bool), total_count: option.Option(Int), remaining_count: option.Option(Int), personal_total_count: option.Option(Int), personal_remaining_count: option.Option(Int), background: option.Option(GiftBackground), unique_gift_variant_count: option.Option(Int), publisher_chat: option.Option(Chat), )Arguments
- id
-
Unique identifier of the gift
- sticker
-
The sticker that represents the gift
- star_count
-
The number of Telegram Stars that must be paid to send the sticker
- upgrade_star_count
-
Optional. The number of Telegram Stars that must be paid to upgrade the gift to a unique one
- is_premium
-
Optional. True, if the gift can only be purchased by Telegram Premium subscribers
- has_colors
-
Optional. True, if the gift can be used (after being upgraded) to customize a user’s appearance
- total_count
-
Optional. The total number of gifts of this type that can be sent by all users; for limited gifts only
- remaining_count
-
Optional. The number of remaining gifts of this type that can be sent by all users; for limited gifts only
- personal_total_count
-
Optional. The total number of gifts of this type that can be sent by the bot; for limited gifts only
- personal_remaining_count
-
Optional. The number of remaining gifts of this type that can be sent by the bot; for limited gifts only
- background
-
Optional. Background of the gift
- unique_gift_variant_count
-
Optional. The total number of different unique gifts that can be obtained by upgrading the gift
- publisher_chat
-
Optional. Information about the chat that published the gift
Official reference: This object describes the background of a gift.
pub type GiftBackground {
GiftBackground(
center_color: Int,
edge_color: Int,
text_color: Int,
)
}
Constructors
-
GiftBackground( center_color: Int, edge_color: Int, text_color: Int, )Arguments
- center_color
-
Center color of the background in RGB format
- edge_color
-
Edge color of the background in RGB format
- text_color
-
Text color of the background in RGB format
Official reference: Describes a service message about a regular gift that was sent or received.
pub type GiftInfo {
GiftInfo(
gift: Gift,
owned_gift_id: option.Option(String),
convert_star_count: option.Option(Int),
prepaid_upgrade_star_count: option.Option(Int),
is_upgrade_separate: option.Option(Bool),
can_be_upgraded: option.Option(Bool),
text: option.Option(String),
entities: option.Option(List(MessageEntity)),
is_private: option.Option(Bool),
unique_gift_number: option.Option(Int),
)
}
Constructors
-
GiftInfo( gift: Gift, owned_gift_id: option.Option(String), convert_star_count: option.Option(Int), prepaid_upgrade_star_count: option.Option(Int), is_upgrade_separate: option.Option(Bool), can_be_upgraded: option.Option(Bool), text: option.Option(String), entities: option.Option(List(MessageEntity)), is_private: option.Option(Bool), unique_gift_number: option.Option(Int), )Arguments
- gift
-
Information about the gift
- owned_gift_id
-
Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts
- convert_star_count
-
Optional. Number of Telegram Stars that can be claimed by the receiver by converting the gift; omitted if conversion to Telegram Stars is impossible
- prepaid_upgrade_star_count
-
Optional. Number of Telegram Stars that were prepaid for the ability to upgrade the gift
- is_upgrade_separate
-
Optional. True, if the gift’s upgrade was purchased after the gift was sent
- can_be_upgraded
-
Optional. True, if the gift can be upgraded to a unique gift
- text
-
Optional. Text of the message that was added to the gift
- entities
-
Optional. Special entities that appear in the text
- is_private
-
Optional. True, if the sender and gift text are shown only to the gift receiver; otherwise, everyone will be able to see them
- unique_gift_number
-
Optional. Unique number reserved for this gift when upgraded. See the number field in UniqueGift.
pub type GiftPremiumSubscriptionParameters {
GiftPremiumSubscriptionParameters(
user_id: Int,
month_count: Int,
star_count: Int,
text: option.Option(String),
text_parse_mode: option.Option(String),
text_entities: option.Option(List(MessageEntity)),
)
}
Constructors
-
GiftPremiumSubscriptionParameters( user_id: Int, month_count: Int, star_count: Int, text: option.Option(String), text_parse_mode: option.Option(String), text_entities: option.Option(List(MessageEntity)), )Arguments
- user_id
-
Unique identifier of the target user who will receive a Telegram Premium subscription
- month_count
-
Number of months the Telegram Premium subscription will be active for the user; must be one of 3, 6, or 12
- star_count
-
Number of Telegram Stars to pay for the Telegram Premium subscription; must be 1000 for 3 months, 1500 for 6 months, and 2500 for 12 months
- text
-
Text that will be shown along with the service message about the subscription; 0-128 characters
- text_parse_mode
-
Mode for parsing entities in the text. See formatting options for more details.
- text_entities
-
A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode.
Official reference: This object represents a message about a scheduled giveaway.
pub type Giveaway {
Giveaway(
chats: List(Chat),
winners_selection_date: Int,
winner_count: Int,
only_new_members: option.Option(Bool),
has_public_winners: option.Option(Bool),
prize_description: option.Option(String),
country_codes: option.Option(List(String)),
prize_star_count: option.Option(Int),
premium_subscription_month_count: option.Option(Int),
)
}
Constructors
-
Giveaway( chats: List(Chat), winners_selection_date: Int, winner_count: Int, only_new_members: option.Option(Bool), has_public_winners: option.Option(Bool), prize_description: option.Option(String), country_codes: option.Option(List(String)), prize_star_count: option.Option(Int), premium_subscription_month_count: option.Option(Int), )Arguments
- chats
-
The list of chats which the user must join to participate in the giveaway
- winners_selection_date
-
Point in time (Unix timestamp) when winners of the giveaway will be selected
- winner_count
-
The number of users which are supposed to be selected as winners of the giveaway
- only_new_members
-
Optional. True, if only users who join the chats after the giveaway started should be eligible to win
- has_public_winners
-
Optional. True, if the list of giveaway winners will be visible to everyone
- prize_description
-
Optional. Description of additional giveaway prize
- country_codes
-
Optional. A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways.
- prize_star_count
-
Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only
- premium_subscription_month_count
-
Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only
Official reference: This object represents a service message about the completion of a giveaway without public winners.
pub type GiveawayCompleted {
GiveawayCompleted(
winner_count: Int,
unclaimed_prize_count: option.Option(Int),
giveaway_message: option.Option(Message),
is_star_giveaway: option.Option(Bool),
)
}
Constructors
-
GiveawayCompleted( winner_count: Int, unclaimed_prize_count: option.Option(Int), giveaway_message: option.Option(Message), is_star_giveaway: option.Option(Bool), )Arguments
- winner_count
-
Number of winners in the giveaway
- unclaimed_prize_count
-
Optional. Number of undistributed prizes
- giveaway_message
-
Optional. Message with the giveaway that was completed, if it wasn’t deleted
- is_star_giveaway
-
Optional. True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway.
Official reference: This object represents a service message about the creation of a scheduled giveaway.
pub type GiveawayCreated {
GiveawayCreated(prize_star_count: option.Option(Int))
}
Constructors
-
GiveawayCreated(prize_star_count: option.Option(Int))Arguments
- prize_star_count
-
Optional. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only
Official reference: This object represents a message about the completion of a giveaway with public winners.
pub type GiveawayWinners {
GiveawayWinners(
chat: Chat,
giveaway_message_id: Int,
winners_selection_date: Int,
winner_count: Int,
winners: List(User),
additional_chat_count: option.Option(Int),
prize_star_count: option.Option(Int),
premium_subscription_month_count: option.Option(Int),
unclaimed_prize_count: option.Option(Int),
only_new_members: option.Option(Bool),
was_refunded: option.Option(Bool),
prize_description: option.Option(String),
)
}
Constructors
-
GiveawayWinners( chat: Chat, giveaway_message_id: Int, winners_selection_date: Int, winner_count: Int, winners: List(User), additional_chat_count: option.Option(Int), prize_star_count: option.Option(Int), premium_subscription_month_count: option.Option(Int), unclaimed_prize_count: option.Option(Int), only_new_members: option.Option(Bool), was_refunded: option.Option(Bool), prize_description: option.Option(String), )Arguments
- chat
-
The chat that created the giveaway
- giveaway_message_id
-
Identifier of the message with the giveaway in the chat
- winners_selection_date
-
Point in time (Unix timestamp) when winners of the giveaway were selected
- winner_count
-
Total number of winners in the giveaway
- winners
-
List of up to 100 winners of the giveaway
- additional_chat_count
-
Optional. The number of other chats the user had to join in order to be eligible for the giveaway
- prize_star_count
-
Optional. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only
- premium_subscription_month_count
-
Optional. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only
- unclaimed_prize_count
-
Optional. Number of undistributed prizes
- only_new_members
-
Optional. True, if only users who had joined the chats after the giveaway started were eligible to win
- was_refunded
-
Optional. True, if the giveaway was canceled because the payment for it was refunded
- prize_description
-
Optional. Description of additional giveaway prize
pub type HideGeneralForumTopicParameters {
HideGeneralForumTopicParameters(chat_id: IntOrString)
}
Constructors
-
HideGeneralForumTopicParameters(chat_id: IntOrString)Arguments
- chat_id
-
Unique identifier for the target chat or username of the target supergroup (in the format
@supergroupusername)
Official reference: This object describes a message that was deleted or is otherwise inaccessible to the bot.
pub type InaccessibleMessage {
InaccessibleMessage(chat: Chat, message_id: Int, date: Int)
}
Constructors
-
InaccessibleMessage(chat: Chat, message_id: Int, date: Int)Arguments
- chat
-
Chat the message belonged to
- message_id
-
Unique message identifier inside the chat
- date
-
Always 0. The field can be used to differentiate regular and inaccessible messages.
Official reference: This object represents one button of an inline keyboard. Exactly one of the fields other than text, icon_custom_emoji_id, and style must be used to specify the type of the button.
pub type InlineKeyboardButton {
InlineKeyboardButton(
text: String,
icon_custom_emoji_id: option.Option(String),
style: option.Option(String),
url: option.Option(String),
callback_data: option.Option(String),
web_app: option.Option(WebAppInfo),
login_url: option.Option(LoginUrl),
switch_inline_query: option.Option(String),
switch_inline_query_current_chat: option.Option(String),
switch_inline_query_chosen_chat: option.Option(
SwitchInlineQueryChosenChat,
),
copy_text: option.Option(CopyTextButton),
callback_game: option.Option(CallbackGame),
pay: option.Option(Bool),
)
}
Constructors
-
InlineKeyboardButton( text: String, icon_custom_emoji_id: option.Option(String), style: option.Option(String), url: option.Option(String), callback_data: option.Option(String), web_app: option.Option(WebAppInfo), login_url: option.Option(LoginUrl), switch_inline_query: option.Option(String), switch_inline_query_current_chat: option.Option(String), switch_inline_query_chosen_chat: option.Option( SwitchInlineQueryChosenChat, ), copy_text: option.Option(CopyTextButton), callback_game: option.Option(CallbackGame), pay: option.Option(Bool), )Arguments
- text
-
Label text on the button
- icon_custom_emoji_id
-
Optional. Unique identifier of the custom emoji shown before the text of the button. Can only be used by bots that purchased additional usernames on Fragment or in the messages directly sent by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium subscription.
- style
-
Optional. Style of the button. Must be one of “danger” (red), “success” (green) or “primary” (blue). If omitted, then an app-specific style is used.
- url
-
Optional. HTTP or tg:// URL to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their identifier without using a username, if this is allowed by their privacy settings.
- callback_data
-
Optional. Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes
- web_app
-
Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Available only in private chats between a user and the bot. Not supported for messages sent on behalf of a business account.
- login_url
-
Optional. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget.
- switch_inline_query
-
Optional. If set, 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. May be empty, in which case just the bot’s username will be inserted. Not supported for messages sent in channel direct messages chats and on behalf of a business account.
- switch_inline_query_current_chat
-
Optional. If set, pressing the button will insert the bot’s username and the specified inline query in the current chat’s input field. May be empty, in which case only the bot’s username will be inserted. This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. Not supported in channels and for messages sent in channel direct messages chats and on behalf of a business account.
- switch_inline_query_chosen_chat
-
Optional. If set, pressing the button will prompt the user to select one of their chats of the specified type, open that chat and insert the bot’s username and the specified inline query in the input field. Not supported for messages sent in channel direct messages chats and on behalf of a business account.
- copy_text
-
Optional. Description of the button that copies the specified text to the clipboard
- callback_game
-
Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row.
- pay
-
Optional. Specify True, to send a Pay button. Substrings “⭐” and “XTR” in the buttons’s text will be replaced with a Telegram Star icon. NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages.
Official reference: This object represents an inline keyboard that appears right next to the message it belongs to.
pub type InlineKeyboardMarkup {
InlineKeyboardMarkup(
inline_keyboard: List(List(InlineKeyboardButton)),
)
}
Constructors
-
InlineKeyboardMarkup( inline_keyboard: List(List(InlineKeyboardButton)), )Arguments
- inline_keyboard
-
Array of button rows, each represented by an Array of InlineKeyboardButton objects
Official reference: This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
pub type InlineQuery {
InlineQuery(
id: String,
from: User,
query: String,
offset: String,
chat_type: option.Option(String),
location: option.Option(Location),
)
}
Constructors
-
InlineQuery( id: String, from: User, query: String, offset: String, chat_type: option.Option(String), location: option.Option(Location), )Arguments
- id
-
Unique identifier for this query
- from
-
Sender
- query
-
Text of the query (up to 256 characters)
- offset
-
Offset of the results to be returned, can be controlled by the bot
- chat_type
-
Optional. Type of the chat from which the inline query was sent. Can be either “sender” for a private chat with the inline query sender, “private”, “group”, “supergroup”, or “channel”. The chat type should be always known for requests sent from official clients and most third-party clients, unless the request was sent from a secret chat.
- location
-
Optional. Sender location, only for bots that request user location
pub type InlineQueryResult {
InlineQueryResultCachedAudioInlineQueryResult(
InlineQueryResultCachedAudio,
)
InlineQueryResultCachedDocumentInlineQueryResult(
InlineQueryResultCachedDocument,
)
InlineQueryResultCachedGifInlineQueryResult(
InlineQueryResultCachedGif,
)
InlineQueryResultCachedMpeg4GifInlineQueryResult(
InlineQueryResultCachedMpeg4Gif,
)
InlineQueryResultCachedPhotoInlineQueryResult(
InlineQueryResultCachedPhoto,
)
InlineQueryResultCachedStickerInlineQueryResult(
InlineQueryResultCachedSticker,
)
InlineQueryResultCachedVideoInlineQueryResult(
InlineQueryResultCachedVideo,
)
InlineQueryResultCachedVoiceInlineQueryResult(
InlineQueryResultCachedVoice,
)
InlineQueryResultArticleInlineQueryResult(
InlineQueryResultArticle,
)
InlineQueryResultAudioInlineQueryResult(InlineQueryResultAudio)
InlineQueryResultContactInlineQueryResult(
InlineQueryResultContact,
)
InlineQueryResultGameInlineQueryResult(InlineQueryResultGame)
InlineQueryResultDocumentInlineQueryResult(
InlineQueryResultDocument,
)
InlineQueryResultGifInlineQueryResult(InlineQueryResultGif)
InlineQueryResultLocationInlineQueryResult(
InlineQueryResultLocation,
)
InlineQueryResultMpeg4GifInlineQueryResult(
InlineQueryResultMpeg4Gif,
)
InlineQueryResultPhotoInlineQueryResult(InlineQueryResultPhoto)
InlineQueryResultVenueInlineQueryResult(InlineQueryResultVenue)
InlineQueryResultVideoInlineQueryResult(InlineQueryResultVideo)
InlineQueryResultVoiceInlineQueryResult(InlineQueryResultVoice)
}
Constructors
-
InlineQueryResultCachedAudioInlineQueryResult( InlineQueryResultCachedAudio, ) -
InlineQueryResultCachedDocumentInlineQueryResult( InlineQueryResultCachedDocument, ) -
InlineQueryResultCachedGifInlineQueryResult( InlineQueryResultCachedGif, ) -
InlineQueryResultCachedMpeg4GifInlineQueryResult( InlineQueryResultCachedMpeg4Gif, ) -
InlineQueryResultCachedPhotoInlineQueryResult( InlineQueryResultCachedPhoto, ) -
InlineQueryResultCachedStickerInlineQueryResult( InlineQueryResultCachedSticker, ) -
InlineQueryResultCachedVideoInlineQueryResult( InlineQueryResultCachedVideo, ) -
InlineQueryResultCachedVoiceInlineQueryResult( InlineQueryResultCachedVoice, ) -
InlineQueryResultArticleInlineQueryResult( InlineQueryResultArticle, ) -
InlineQueryResultAudioInlineQueryResult(InlineQueryResultAudio) -
InlineQueryResultContactInlineQueryResult( InlineQueryResultContact, ) -
InlineQueryResultGameInlineQueryResult(InlineQueryResultGame) -
InlineQueryResultDocumentInlineQueryResult( InlineQueryResultDocument, ) -
InlineQueryResultGifInlineQueryResult(InlineQueryResultGif) -
InlineQueryResultLocationInlineQueryResult( InlineQueryResultLocation, ) -
InlineQueryResultMpeg4GifInlineQueryResult( InlineQueryResultMpeg4Gif, ) -
InlineQueryResultPhotoInlineQueryResult(InlineQueryResultPhoto) -
InlineQueryResultVenueInlineQueryResult(InlineQueryResultVenue) -
InlineQueryResultVideoInlineQueryResult(InlineQueryResultVideo) -
InlineQueryResultVoiceInlineQueryResult(InlineQueryResultVoice)
Official reference: Represents a link to an article or web page.
pub type InlineQueryResultArticle {
InlineQueryResultArticle(
type_: String,
id: String,
title: String,
input_message_content: InputMessageContent,
reply_markup: option.Option(InlineKeyboardMarkup),
url: option.Option(String),
description: option.Option(String),
thumbnail_url: option.Option(String),
thumbnail_width: option.Option(Int),
thumbnail_height: option.Option(Int),
)
}
Constructors
-
InlineQueryResultArticle( type_: String, id: String, title: String, input_message_content: InputMessageContent, reply_markup: option.Option(InlineKeyboardMarkup), url: option.Option(String), description: option.Option(String), thumbnail_url: option.Option(String), thumbnail_width: option.Option(Int), thumbnail_height: option.Option(Int), )Arguments
- type_
-
Type of the result, must be article
- id
-
Unique identifier for this result, 1-64 Bytes
- title
-
Title of the result
- input_message_content
-
Content of the message to be sent
- reply_markup
-
Optional. Inline keyboard attached to the message
- url
-
Optional. URL of the result
- description
-
Optional. Short description of the result
- thumbnail_url
-
Optional. Url of the thumbnail for the result
- thumbnail_width
-
Optional. Thumbnail width
- thumbnail_height
-
Optional. Thumbnail height
Official reference: Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.
pub type InlineQueryResultAudio {
InlineQueryResultAudio(
type_: String,
id: String,
audio_url: String,
title: String,
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
performer: option.Option(String),
audio_duration: option.Option(Int),
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
)
}
Constructors
-
InlineQueryResultAudio( type_: String, id: String, audio_url: String, title: String, caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), performer: option.Option(String), audio_duration: option.Option(Int), reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), )Arguments
- type_
-
Type of the result, must be audio
- id
-
Unique identifier for this result, 1-64 bytes
- audio_url
-
A valid URL for the audio file
- title
-
Title
- caption
-
Optional. Caption, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the audio caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- performer
-
Optional. Performer
- audio_duration
-
Optional. Audio duration in seconds
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the audio
Official reference: Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.
pub type InlineQueryResultCachedAudio {
InlineQueryResultCachedAudio(
type_: String,
id: String,
audio_file_id: String,
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
)
}
Constructors
-
InlineQueryResultCachedAudio( type_: String, id: String, audio_file_id: String, caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), )Arguments
- type_
-
Type of the result, must be audio
- id
-
Unique identifier for this result, 1-64 bytes
- audio_file_id
-
A valid file identifier for the audio file
- caption
-
Optional. Caption, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the audio caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the audio
Official reference: Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file.
pub type InlineQueryResultCachedDocument {
InlineQueryResultCachedDocument(
type_: String,
id: String,
title: String,
document_file_id: String,
description: option.Option(String),
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
)
}
Constructors
-
InlineQueryResultCachedDocument( type_: String, id: String, title: String, document_file_id: String, description: option.Option(String), caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), )Arguments
- type_
-
Type of the result, must be document
- id
-
Unique identifier for this result, 1-64 bytes
- title
-
Title for the result
- document_file_id
-
A valid file identifier for the file
- description
-
Optional. Short description of the result
- caption
-
Optional. Caption of the document to be sent, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the document caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the file
Official reference: Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.
pub type InlineQueryResultCachedGif {
InlineQueryResultCachedGif(
type_: String,
id: String,
gif_file_id: String,
title: option.Option(String),
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
show_caption_above_media: option.Option(Bool),
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
)
}
Constructors
-
InlineQueryResultCachedGif( type_: String, id: String, gif_file_id: String, title: option.Option(String), caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), show_caption_above_media: option.Option(Bool), reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), )Arguments
- type_
-
Type of the result, must be gif
- id
-
Unique identifier for this result, 1-64 bytes
- gif_file_id
-
A valid file identifier for the GIF file
- title
-
Optional. Title for the result
- caption
-
Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- show_caption_above_media
-
Optional. Pass True if the caption must be shown above the message media
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the GIF animation
Official reference: Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
pub type InlineQueryResultCachedMpeg4Gif {
InlineQueryResultCachedMpeg4Gif(
type_: String,
id: String,
mpeg4_file_id: String,
title: option.Option(String),
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
show_caption_above_media: option.Option(Bool),
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
)
}
Constructors
-
InlineQueryResultCachedMpeg4Gif( type_: String, id: String, mpeg4_file_id: String, title: option.Option(String), caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), show_caption_above_media: option.Option(Bool), reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), )Arguments
- type_
-
Type of the result, must be mpeg4_gif
- id
-
Unique identifier for this result, 1-64 bytes
- mpeg4_file_id
-
A valid file identifier for the MPEG4 file
- title
-
Optional. Title for the result
- caption
-
Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- show_caption_above_media
-
Optional. Pass True if the caption must be shown above the message media
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the video animation
Official reference: Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.
pub type InlineQueryResultCachedPhoto {
InlineQueryResultCachedPhoto(
type_: String,
id: String,
photo_file_id: String,
title: option.Option(String),
description: option.Option(String),
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
show_caption_above_media: option.Option(Bool),
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
)
}
Constructors
-
InlineQueryResultCachedPhoto( type_: String, id: String, photo_file_id: String, title: option.Option(String), description: option.Option(String), caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), show_caption_above_media: option.Option(Bool), reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), )Arguments
- type_
-
Type of the result, must be photo
- id
-
Unique identifier for this result, 1-64 bytes
- photo_file_id
-
A valid file identifier of the photo
- title
-
Optional. Title for the result
- description
-
Optional. Short description of the result
- caption
-
Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- show_caption_above_media
-
Optional. Pass True if the caption must be shown above the message media
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the photo
Official reference: 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 input_message_content to send a message with the specified content instead of the sticker.
pub type InlineQueryResultCachedSticker {
InlineQueryResultCachedSticker(
type_: String,
id: String,
sticker_file_id: String,
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
)
}
Constructors
-
InlineQueryResultCachedSticker( type_: String, id: String, sticker_file_id: String, reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), )Arguments
- type_
-
Type of the result, must be sticker
- id
-
Unique identifier for this result, 1-64 bytes
- sticker_file_id
-
A valid file identifier of the sticker
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the sticker
Official reference: Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.
pub type InlineQueryResultCachedVideo {
InlineQueryResultCachedVideo(
type_: String,
id: String,
video_file_id: String,
title: String,
description: option.Option(String),
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
show_caption_above_media: option.Option(Bool),
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
)
}
Constructors
-
InlineQueryResultCachedVideo( type_: String, id: String, video_file_id: String, title: String, description: option.Option(String), caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), show_caption_above_media: option.Option(Bool), reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), )Arguments
- type_
-
Type of the result, must be video
- id
-
Unique identifier for this result, 1-64 bytes
- video_file_id
-
A valid file identifier for the video file
- title
-
Title for the result
- description
-
Optional. Short description of the result
- caption
-
Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the video caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- show_caption_above_media
-
Optional. Pass True if the caption must be shown above the message media
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the video
Official reference: Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message.
pub type InlineQueryResultCachedVoice {
InlineQueryResultCachedVoice(
type_: String,
id: String,
voice_file_id: String,
title: String,
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
)
}
Constructors
-
InlineQueryResultCachedVoice( type_: String, id: String, voice_file_id: String, title: String, caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), )Arguments
- type_
-
Type of the result, must be voice
- id
-
Unique identifier for this result, 1-64 bytes
- voice_file_id
-
A valid file identifier for the voice message
- title
-
Voice message title
- caption
-
Optional. Caption, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the voice message
Official reference: Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact.
pub type InlineQueryResultContact {
InlineQueryResultContact(
type_: String,
id: String,
phone_number: String,
first_name: String,
last_name: option.Option(String),
vcard: option.Option(String),
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
thumbnail_url: option.Option(String),
thumbnail_width: option.Option(Int),
thumbnail_height: option.Option(Int),
)
}
Constructors
-
InlineQueryResultContact( type_: String, id: String, phone_number: String, first_name: String, last_name: option.Option(String), vcard: option.Option(String), reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), thumbnail_url: option.Option(String), thumbnail_width: option.Option(Int), thumbnail_height: option.Option(Int), )Arguments
- type_
-
Type of the result, must be contact
- id
-
Unique identifier for this result, 1-64 Bytes
- phone_number
-
Contact’s phone number
- first_name
-
Contact’s first name
- last_name
-
Optional. Contact’s last name
- vcard
-
Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the contact
- thumbnail_url
-
Optional. Url of the thumbnail for the result
- thumbnail_width
-
Optional. Thumbnail width
- thumbnail_height
-
Optional. Thumbnail height
Official reference: Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method.
pub type InlineQueryResultDocument {
InlineQueryResultDocument(
type_: String,
id: String,
title: String,
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
document_url: String,
mime_type: String,
description: option.Option(String),
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
thumbnail_url: option.Option(String),
thumbnail_width: option.Option(Int),
thumbnail_height: option.Option(Int),
)
}
Constructors
-
InlineQueryResultDocument( type_: String, id: String, title: String, caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), document_url: String, mime_type: String, description: option.Option(String), reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), thumbnail_url: option.Option(String), thumbnail_width: option.Option(Int), thumbnail_height: option.Option(Int), )Arguments
- type_
-
Type of the result, must be document
- id
-
Unique identifier for this result, 1-64 bytes
- title
-
Title for the result
- caption
-
Optional. Caption of the document to be sent, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the document caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- document_url
-
A valid URL for the file
- mime_type
-
MIME type of the content of the file, either “application/pdf” or “application/zip”
- description
-
Optional. Short description of the result
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the file
- thumbnail_url
-
Optional. URL of the thumbnail (JPEG only) for the file
- thumbnail_width
-
Optional. Thumbnail width
- thumbnail_height
-
Optional. Thumbnail height
Official reference: Represents a Game.
pub type InlineQueryResultGame {
InlineQueryResultGame(
type_: String,
id: String,
game_short_name: String,
reply_markup: option.Option(InlineKeyboardMarkup),
)
}
Constructors
-
InlineQueryResultGame( type_: String, id: String, game_short_name: String, reply_markup: option.Option(InlineKeyboardMarkup), )Arguments
- type_
-
Type of the result, must be game
- id
-
Unique identifier for this result, 1-64 bytes
- game_short_name
-
Short name of the game
- reply_markup
-
Optional. Inline keyboard attached to the message
Official reference: 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 input_message_content to send a message with the specified content instead of the animation.
pub type InlineQueryResultGif {
InlineQueryResultGif(
type_: String,
id: String,
gif_url: String,
gif_width: option.Option(Int),
gif_height: option.Option(Int),
gif_duration: option.Option(Int),
thumbnail_url: String,
thumbnail_mime_type: option.Option(String),
title: option.Option(String),
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
show_caption_above_media: option.Option(Bool),
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
)
}
Constructors
-
InlineQueryResultGif( type_: String, id: String, gif_url: String, gif_width: option.Option(Int), gif_height: option.Option(Int), gif_duration: option.Option(Int), thumbnail_url: String, thumbnail_mime_type: option.Option(String), title: option.Option(String), caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), show_caption_above_media: option.Option(Bool), reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), )Arguments
- type_
-
Type of the result, must be gif
- id
-
Unique identifier for this result, 1-64 bytes
- gif_url
-
A valid URL for the GIF file
- gif_width
-
Optional. Width of the GIF
- gif_height
-
Optional. Height of the GIF
- gif_duration
-
Optional. Duration of the GIF in seconds
- thumbnail_url
-
URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
- thumbnail_mime_type
-
Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”.
- title
-
Optional. Title for the result
- caption
-
Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- show_caption_above_media
-
Optional. Pass True if the caption must be shown above the message media
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the GIF animation
Official reference: Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location.
pub type InlineQueryResultLocation {
InlineQueryResultLocation(
type_: String,
id: String,
latitude: Float,
longitude: Float,
title: String,
horizontal_accuracy: option.Option(Float),
live_period: option.Option(Int),
heading: option.Option(Int),
proximity_alert_radius: option.Option(Int),
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
thumbnail_url: option.Option(String),
thumbnail_width: option.Option(Int),
thumbnail_height: option.Option(Int),
)
}
Constructors
-
InlineQueryResultLocation( type_: String, id: String, latitude: Float, longitude: Float, title: String, horizontal_accuracy: option.Option(Float), live_period: option.Option(Int), heading: option.Option(Int), proximity_alert_radius: option.Option(Int), reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), thumbnail_url: option.Option(String), thumbnail_width: option.Option(Int), thumbnail_height: option.Option(Int), )Arguments
- type_
-
Type of the result, must be location
- id
-
Unique identifier for this result, 1-64 Bytes
- latitude
-
Location latitude in degrees
- longitude
-
Location longitude in degrees
- title
-
Location title
- horizontal_accuracy
-
Optional. The radius of uncertainty for the location, measured in meters; 0-1500
- live_period
-
Optional. Period in seconds during which the location can be updated, must be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely
- heading
-
Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
- proximity_alert_radius
-
Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the location
- thumbnail_url
-
Optional. Url of the thumbnail for the result
- thumbnail_width
-
Optional. Thumbnail width
- thumbnail_height
-
Optional. Thumbnail height
Official reference: 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 input_message_content to send a message with the specified content instead of the animation.
pub type InlineQueryResultMpeg4Gif {
InlineQueryResultMpeg4Gif(
type_: String,
id: String,
mpeg4_url: String,
mpeg4_width: option.Option(Int),
mpeg4_height: option.Option(Int),
mpeg4_duration: option.Option(Int),
thumbnail_url: String,
thumbnail_mime_type: option.Option(String),
title: option.Option(String),
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
show_caption_above_media: option.Option(Bool),
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
)
}
Constructors
-
InlineQueryResultMpeg4Gif( type_: String, id: String, mpeg4_url: String, mpeg4_width: option.Option(Int), mpeg4_height: option.Option(Int), mpeg4_duration: option.Option(Int), thumbnail_url: String, thumbnail_mime_type: option.Option(String), title: option.Option(String), caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), show_caption_above_media: option.Option(Bool), reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), )Arguments
- type_
-
Type of the result, must be mpeg4_gif
- id
-
Unique identifier for this result, 1-64 bytes
- mpeg4_url
-
A valid URL for the MPEG4 file
- mpeg4_width
-
Optional. Video width
- mpeg4_height
-
Optional. Video height
- mpeg4_duration
-
Optional. Video duration in seconds
- thumbnail_url
-
URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
- thumbnail_mime_type
-
Optional. MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to “image/jpeg”.
- title
-
Optional. Title for the result
- caption
-
Optional. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- show_caption_above_media
-
Optional. Pass True if the caption must be shown above the message media
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the video animation
Official reference: Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.
pub type InlineQueryResultPhoto {
InlineQueryResultPhoto(
type_: String,
id: String,
photo_url: String,
thumbnail_url: String,
photo_width: option.Option(Int),
photo_height: option.Option(Int),
title: option.Option(String),
description: option.Option(String),
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
show_caption_above_media: option.Option(Bool),
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
)
}
Constructors
-
InlineQueryResultPhoto( type_: String, id: String, photo_url: String, thumbnail_url: String, photo_width: option.Option(Int), photo_height: option.Option(Int), title: option.Option(String), description: option.Option(String), caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), show_caption_above_media: option.Option(Bool), reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), )Arguments
- type_
-
Type of the result, must be photo
- id
-
Unique identifier for this result, 1-64 bytes
- photo_url
-
A valid URL of the photo. Photo must be in JPEG format. Photo size must not exceed 5MB.
- thumbnail_url
-
URL of the thumbnail for the photo
- photo_width
-
Optional. Width of the photo
- photo_height
-
Optional. Height of the photo
- title
-
Optional. Title for the result
- description
-
Optional. Short description of the result
- caption
-
Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- show_caption_above_media
-
Optional. Pass True if the caption must be shown above the message media
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the photo
Official reference: Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the venue.
pub type InlineQueryResultVenue {
InlineQueryResultVenue(
type_: String,
id: String,
latitude: Float,
longitude: Float,
title: String,
address: String,
foursquare_id: option.Option(String),
foursquare_type: option.Option(String),
google_place_id: option.Option(String),
google_place_type: option.Option(String),
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
thumbnail_url: option.Option(String),
thumbnail_width: option.Option(Int),
thumbnail_height: option.Option(Int),
)
}
Constructors
-
InlineQueryResultVenue( type_: String, id: String, latitude: Float, longitude: Float, title: String, address: String, foursquare_id: option.Option(String), foursquare_type: option.Option(String), google_place_id: option.Option(String), google_place_type: option.Option(String), reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), thumbnail_url: option.Option(String), thumbnail_width: option.Option(Int), thumbnail_height: option.Option(Int), )Arguments
- type_
-
Type of the result, must be venue
- id
-
Unique identifier for this result, 1-64 Bytes
- latitude
-
Latitude of the venue location in degrees
- longitude
-
Longitude of the venue location in degrees
- title
-
Title of the venue
- address
-
Address of the venue
- foursquare_id
-
Optional. Foursquare identifier of the venue if known
- foursquare_type
-
Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
- google_place_id
-
Optional. Google Places identifier of the venue
- google_place_type
-
Optional. Google Places type of the venue. (See supported types.)
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the venue
- thumbnail_url
-
Optional. Url of the thumbnail for the result
- thumbnail_width
-
Optional. Thumbnail width
- thumbnail_height
-
Optional. Thumbnail height
Official reference: 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 input_message_content to send a message with the specified content instead of the video.
pub type InlineQueryResultVideo {
InlineQueryResultVideo(
type_: String,
id: String,
video_url: String,
mime_type: String,
thumbnail_url: String,
title: String,
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
show_caption_above_media: option.Option(Bool),
video_width: option.Option(Int),
video_height: option.Option(Int),
video_duration: option.Option(Int),
description: option.Option(String),
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
)
}
Constructors
-
InlineQueryResultVideo( type_: String, id: String, video_url: String, mime_type: String, thumbnail_url: String, title: String, caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), show_caption_above_media: option.Option(Bool), video_width: option.Option(Int), video_height: option.Option(Int), video_duration: option.Option(Int), description: option.Option(String), reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), )Arguments
- type_
-
Type of the result, must be video
- id
-
Unique identifier for this result, 1-64 bytes
- video_url
-
A valid URL for the embedded video player or video file
- mime_type
-
MIME type of the content of the video URL, “text/html” or “video/mp4”
- thumbnail_url
-
URL of the thumbnail (JPEG only) for the video
- title
-
Title for the result
- caption
-
Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the video caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- show_caption_above_media
-
Optional. Pass True if the caption must be shown above the message media
- video_width
-
Optional. Video width
- video_height
-
Optional. Video height
- video_duration
-
Optional. Video duration in seconds
- description
-
Optional. Short description of the result
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).
Official reference: 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 input_message_content to send a message with the specified content instead of the the voice message.
pub type InlineQueryResultVoice {
InlineQueryResultVoice(
type_: String,
id: String,
voice_url: String,
title: String,
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
voice_duration: option.Option(Int),
reply_markup: option.Option(InlineKeyboardMarkup),
input_message_content: option.Option(InputMessageContent),
)
}
Constructors
-
InlineQueryResultVoice( type_: String, id: String, voice_url: String, title: String, caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), voice_duration: option.Option(Int), reply_markup: option.Option(InlineKeyboardMarkup), input_message_content: option.Option(InputMessageContent), )Arguments
- type_
-
Type of the result, must be voice
- id
-
Unique identifier for this result, 1-64 bytes
- voice_url
-
A valid URL for the voice recording
- title
-
Recording title
- caption
-
Optional. Caption, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- voice_duration
-
Optional. Recording duration in seconds
- reply_markup
-
Optional. Inline keyboard attached to the message
- input_message_content
-
Optional. Content of the message to be sent instead of the voice recording
Official reference: This object represents a button to be shown above inline query results. You must use exactly one of the optional fields.
pub type InlineQueryResultsButton {
InlineQueryResultsButton(
text: String,
web_app: option.Option(WebAppInfo),
start_parameter: option.Option(String),
)
}
Constructors
-
InlineQueryResultsButton( text: String, web_app: option.Option(WebAppInfo), start_parameter: option.Option(String), )Arguments
- text
-
Label text on the button
- web_app
-
Optional. Description of the Web App that will be launched when the user presses the button. The Web App will be able to switch back to the inline mode using the method switchInlineQuery inside the Web App.
- start_parameter
-
Optional. Deep-linking parameter for the /start message sent to the bot when a user presses the button. 1-64 characters, only A-Z, a-z, 0-9, _ and - are allowed. Example: An inline bot that sends YouTube videos can ask the user to connect the bot to their YouTube account to adapt search results accordingly. To do this, it displays a ‘Connect your YouTube account’ button above the results, or even before showing any. The user presses the button, switches to a private chat with the bot and, in doing so, passes a start parameter that instructs the bot to return an OAuth link. Once done, the bot can offer a switch_inline button so that the user can easily return to the chat where they wanted to use the bot’s inline capabilities.
Official reference: Describes a checklist to create.
pub type InputChecklist {
InputChecklist(
title: String,
parse_mode: option.Option(String),
title_entities: option.Option(List(MessageEntity)),
tasks: List(InputChecklistTask),
others_can_add_tasks: option.Option(Bool),
others_can_mark_tasks_as_done: option.Option(Bool),
)
}
Constructors
-
InputChecklist( title: String, parse_mode: option.Option(String), title_entities: option.Option(List(MessageEntity)), tasks: List(InputChecklistTask), others_can_add_tasks: option.Option(Bool), others_can_mark_tasks_as_done: option.Option(Bool), )Arguments
- title
-
Title of the checklist; 1-255 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the title. See formatting options for more details.
- title_entities
-
Optional. List of special entities that appear in the title, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are allowed.
- tasks
-
List of 1-30 tasks in the checklist
- others_can_add_tasks
-
Optional. Pass True if other users can add tasks to the checklist
- others_can_mark_tasks_as_done
-
Optional. Pass True if other users can mark tasks as done or not done in the checklist
Official reference: Describes a task to add to a checklist.
pub type InputChecklistTask {
InputChecklistTask(
id: Int,
text: String,
parse_mode: option.Option(String),
text_entities: option.Option(List(MessageEntity)),
)
}
Constructors
-
InputChecklistTask( id: Int, text: String, parse_mode: option.Option(String), text_entities: option.Option(List(MessageEntity)), )Arguments
- id
-
Unique identifier of the task; must be positive and unique among all task identifiers currently present in the checklist
- text
-
Text of the task; 1-100 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the text. See formatting options for more details.
- text_entities
-
Optional. List of special entities that appear in the text, which can be specified instead of parse_mode. Currently, only bold, italic, underline, strikethrough, spoiler, custom_emoji, and date_time entities are allowed.
Official reference: Represents the content of a contact message to be sent as the result of an inline query.
pub type InputContactMessageContent {
InputContactMessageContent(
phone_number: String,
first_name: String,
last_name: option.Option(String),
vcard: option.Option(String),
)
}
Constructors
-
InputContactMessageContent( phone_number: String, first_name: String, last_name: option.Option(String), vcard: option.Option(String), )Arguments
- phone_number
-
Contact’s phone number
- first_name
-
Contact’s first name
- last_name
-
Optional. Contact’s last name
- vcard
-
Optional. Additional data about the contact in the form of a vCard, 0-2048 bytes
Official reference: Represents the content of an invoice message to be sent as the result of an inline query.
pub type InputInvoiceMessageContent {
InputInvoiceMessageContent(
title: String,
description: String,
payload: String,
provider_token: option.Option(String),
currency: String,
prices: List(LabeledPrice),
max_tip_amount: option.Option(Int),
suggested_tip_amounts: option.Option(List(Int)),
provider_data: option.Option(String),
photo_url: option.Option(String),
photo_size: option.Option(Int),
photo_width: option.Option(Int),
photo_height: option.Option(Int),
need_name: option.Option(Bool),
need_phone_number: option.Option(Bool),
need_email: option.Option(Bool),
need_shipping_address: option.Option(Bool),
send_phone_number_to_provider: option.Option(Bool),
send_email_to_provider: option.Option(Bool),
is_flexible: option.Option(Bool),
)
}
Constructors
-
InputInvoiceMessageContent( title: String, description: String, payload: String, provider_token: option.Option(String), currency: String, prices: List(LabeledPrice), max_tip_amount: option.Option(Int), suggested_tip_amounts: option.Option(List(Int)), provider_data: option.Option(String), photo_url: option.Option(String), photo_size: option.Option(Int), photo_width: option.Option(Int), photo_height: option.Option(Int), need_name: option.Option(Bool), need_phone_number: option.Option(Bool), need_email: option.Option(Bool), need_shipping_address: option.Option(Bool), send_phone_number_to_provider: option.Option(Bool), send_email_to_provider: option.Option(Bool), is_flexible: option.Option(Bool), )Arguments
- title
-
Product name, 1-32 characters
- description
-
Product description, 1-255 characters
- payload
-
Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.
- provider_token
-
Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars.
- currency
-
Three-letter ISO 4217 currency code, see more on currencies. Pass “XTR” for payments in Telegram Stars.
- prices
-
Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars.
- max_tip_amount
-
Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars.
- suggested_tip_amounts
-
Optional. A JSON-serialized Array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
- provider_data
-
Optional. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.
- photo_url
-
Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.
- photo_size
-
Optional. Photo size in bytes
- photo_width
-
Optional. Photo width
- photo_height
-
Optional. Photo height
- need_name
-
Optional. Pass True if you require the user’s full name to complete the order. Ignored for payments in Telegram Stars.
- need_phone_number
-
Optional. Pass True if you require the user’s phone number to complete the order. Ignored for payments in Telegram Stars.
- need_email
-
Optional. Pass True if you require the user’s email address to complete the order. Ignored for payments in Telegram Stars.
- need_shipping_address
-
Optional. Pass True if you require the user’s shipping address to complete the order. Ignored for payments in Telegram Stars.
- send_phone_number_to_provider
-
Optional. Pass True if the user’s phone number should be sent to the provider. Ignored for payments in Telegram Stars.
- send_email_to_provider
-
Optional. Pass True if the user’s email address should be sent to the provider. Ignored for payments in Telegram Stars.
- is_flexible
-
Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.
Official reference: Represents the content of a location message to be sent as the result of an inline query.
pub type InputLocationMessageContent {
InputLocationMessageContent(
latitude: Float,
longitude: Float,
horizontal_accuracy: option.Option(Float),
live_period: option.Option(Int),
heading: option.Option(Int),
proximity_alert_radius: option.Option(Int),
)
}
Constructors
-
InputLocationMessageContent( latitude: Float, longitude: Float, horizontal_accuracy: option.Option(Float), live_period: option.Option(Int), heading: option.Option(Int), proximity_alert_radius: option.Option(Int), )Arguments
- latitude
-
Latitude of the location in degrees
- longitude
-
Longitude of the location in degrees
- horizontal_accuracy
-
Optional. The radius of uncertainty for the location, measured in meters; 0-1500
- live_period
-
Optional. Period in seconds during which the location can be updated, must be between 60 and 86400, or 0x7FFFFFFF for live locations that can be edited indefinitely
- heading
-
Optional. For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.
- proximity_alert_radius
-
Optional. For live locations, a maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.
pub type InputMedia {
InputMediaAnimationInputMedia(InputMediaAnimation)
InputMediaDocumentInputMedia(InputMediaDocument)
InputMediaAudioInputMedia(InputMediaAudio)
InputMediaPhotoInputMedia(InputMediaPhoto)
InputMediaVideoInputMedia(InputMediaVideo)
InputMediaLivePhotoInputMedia(InputMediaLivePhoto)
InputMediaLocationInputMedia(InputMediaLocation)
InputMediaStickerInputMedia(InputMediaSticker)
InputMediaVenueInputMedia(InputMediaVenue)
}
Constructors
-
InputMediaAnimationInputMedia(InputMediaAnimation) -
InputMediaDocumentInputMedia(InputMediaDocument) -
InputMediaAudioInputMedia(InputMediaAudio) -
InputMediaPhotoInputMedia(InputMediaPhoto) -
InputMediaVideoInputMedia(InputMediaVideo) -
InputMediaLivePhotoInputMedia(InputMediaLivePhoto) -
InputMediaLocationInputMedia(InputMediaLocation) -
InputMediaStickerInputMedia(InputMediaSticker) -
InputMediaVenueInputMedia(InputMediaVenue)
Official reference: Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
pub type InputMediaAnimation {
InputMediaAnimation(
type_: String,
media: String,
thumbnail: option.Option(String),
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
show_caption_above_media: option.Option(Bool),
width: option.Option(Int),
height: option.Option(Int),
duration: option.Option(Int),
has_spoiler: option.Option(Bool),
)
}
Constructors
-
InputMediaAnimation( type_: String, media: String, thumbnail: option.Option(String), caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), show_caption_above_media: option.Option(Bool), width: option.Option(Int), height: option.Option(Int), duration: option.Option(Int), has_spoiler: option.Option(Bool), )Arguments
- type_
-
Type of the media, must be animation
- media
-
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
- thumbnail
-
Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail’s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
- caption
-
Optional. Caption of the animation to be sent, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the animation caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- show_caption_above_media
-
Optional. Pass True if the caption must be shown above the message media
- width
-
Optional. Animation width
- height
-
Optional. Animation height
- duration
-
Optional. Animation duration in seconds
- has_spoiler
-
Optional. Pass True if the animation needs to be covered with a spoiler animation
Official reference: Represents an audio file to be treated as music to be sent.
pub type InputMediaAudio {
InputMediaAudio(
type_: String,
media: String,
thumbnail: option.Option(String),
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
duration: option.Option(Int),
performer: option.Option(String),
title: option.Option(String),
)
}
Constructors
-
InputMediaAudio( type_: String, media: String, thumbnail: option.Option(String), caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), duration: option.Option(Int), performer: option.Option(String), title: option.Option(String), )Arguments
- type_
-
Type of the media, must be audio
- media
-
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
- thumbnail
-
Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail’s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
- caption
-
Optional. Caption of the audio to be sent, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the audio caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- duration
-
Optional. Duration of the audio in seconds
- performer
-
Optional. Performer of the audio
- title
-
Optional. Title of the audio
Official reference: Represents a general file to be sent.
pub type InputMediaDocument {
InputMediaDocument(
type_: String,
media: String,
thumbnail: option.Option(String),
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
disable_content_type_detection: option.Option(Bool),
)
}
Constructors
-
InputMediaDocument( type_: String, media: String, thumbnail: option.Option(String), caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), disable_content_type_detection: option.Option(Bool), )Arguments
- type_
-
Type of the media, must be document
- media
-
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
- thumbnail
-
Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail’s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
- caption
-
Optional. Caption of the document to be sent, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the document caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- disable_content_type_detection
-
Optional. Disables automatic server-side content type detection for files uploaded using multipart/form-data. Always True, if the document is sent as part of an album.
Official reference: Represents an HTTP link to be sent.
pub type InputMediaLink {
InputMediaLink(type_: String, url: String)
}
Constructors
-
InputMediaLink(type_: String, url: String)Arguments
- type_
-
Type of the media, must be link
- url
-
HTTP URL of the link
Official reference: Represents a live photo to be sent.
pub type InputMediaLivePhoto {
InputMediaLivePhoto(
type_: String,
media: String,
photo: String,
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
show_caption_above_media: option.Option(Bool),
has_spoiler: option.Option(Bool),
)
}
Constructors
-
InputMediaLivePhoto( type_: String, media: String, photo: String, caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), show_caption_above_media: option.Option(Bool), has_spoiler: option.Option(Bool), )Arguments
- type_
-
Type of the media, must be live_photo
- media
-
Video of the live photo to send. Pass a file_id to send a file that exists on the Telegram servers (recommended) or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files. Sending live photos by a URL is currently unsupported.
- photo
-
The static photo to send. Pass a file_id to send a file that exists on the Telegram servers (recommended) or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files. Sending live photos by a URL is currently unsupported.
- caption
-
Optional. Caption of the live photo to be sent, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the live photo caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- show_caption_above_media
-
Optional. Pass True if the caption must be shown above the message media
- has_spoiler
-
Optional. Pass True if the live photo needs to be covered with a spoiler animation
Official reference: Represents a location to be sent.
pub type InputMediaLocation {
InputMediaLocation(
type_: String,
latitude: Float,
longitude: Float,
horizontal_accuracy: option.Option(Float),
)
}
Constructors
-
InputMediaLocation( type_: String, latitude: Float, longitude: Float, horizontal_accuracy: option.Option(Float), )Arguments
- type_
-
Type of the media, must be location
- latitude
-
Latitude of the location
- longitude
-
Longitude of the location
- horizontal_accuracy
-
Optional. The radius of uncertainty for the location, measured in meters; 0-1500
Official reference: Represents a photo to be sent.
pub type InputMediaPhoto {
InputMediaPhoto(
type_: String,
media: String,
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
show_caption_above_media: option.Option(Bool),
has_spoiler: option.Option(Bool),
)
}
Constructors
-
InputMediaPhoto( type_: String, media: String, caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), show_caption_above_media: option.Option(Bool), has_spoiler: option.Option(Bool), )Arguments
- type_
-
Type of the media, must be photo
- media
-
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
- caption
-
Optional. Caption of the photo to be sent, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the photo caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- show_caption_above_media
-
Optional. Pass True if the caption must be shown above the message media
- has_spoiler
-
Optional. Pass True if the photo needs to be covered with a spoiler animation
Official reference: Represents a sticker file to be sent.
pub type InputMediaSticker {
InputMediaSticker(
type_: String,
media: String,
emoji: option.Option(String),
)
}
Constructors
-
InputMediaSticker( type_: String, media: String, emoji: option.Option(String), )Arguments
- type_
-
Type of the media, must be sticker
- media
-
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a .WEBP sticker from the Internet, or pass “attach://<file_attach_name>” to upload a new .WEBP, .TGS, or .WEBM sticker using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
- emoji
-
Optional. Emoji associated with the sticker; only for just uploaded stickers
Official reference: Represents a venue to be sent.
pub type InputMediaVenue {
InputMediaVenue(
type_: String,
latitude: Float,
longitude: Float,
title: String,
address: String,
foursquare_id: option.Option(String),
foursquare_type: option.Option(String),
google_place_id: option.Option(String),
google_place_type: option.Option(String),
)
}
Constructors
-
InputMediaVenue( type_: String, latitude: Float, longitude: Float, title: String, address: String, foursquare_id: option.Option(String), foursquare_type: option.Option(String), google_place_id: option.Option(String), google_place_type: option.Option(String), )Arguments
- type_
-
Type of the media, must be venue
- latitude
-
Latitude of the location
- longitude
-
Longitude of the location
- title
-
Name of the venue
- address
-
Address of the venue
- foursquare_id
-
Optional. Foursquare identifier of the venue
- foursquare_type
-
Optional. Foursquare type of the venue, if known. (For example, “arts_entertainment/default”, “arts_entertainment/aquarium” or “food/icecream”.)
- google_place_id
-
Optional. Google Places identifier of the venue
- google_place_type
-
Optional. Google Places type of the venue. (See supported types.)
Official reference: Represents a video to be sent.
pub type InputMediaVideo {
InputMediaVideo(
type_: String,
media: String,
thumbnail: option.Option(String),
cover: option.Option(String),
start_timestamp: option.Option(Int),
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
show_caption_above_media: option.Option(Bool),
width: option.Option(Int),
height: option.Option(Int),
duration: option.Option(Int),
supports_streaming: option.Option(Bool),
has_spoiler: option.Option(Bool),
)
}
Constructors
-
InputMediaVideo( type_: String, media: String, thumbnail: option.Option(String), cover: option.Option(String), start_timestamp: option.Option(Int), caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), show_caption_above_media: option.Option(Bool), width: option.Option(Int), height: option.Option(Int), duration: option.Option(Int), supports_streaming: option.Option(Bool), has_spoiler: option.Option(Bool), )Arguments
- type_
-
Type of the media, must be video
- media
-
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
- thumbnail
-
Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail’s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
- cover
-
Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
- start_timestamp
-
Optional. Start timestamp for the video in the message
- caption
-
Optional. Caption of the video to be sent, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the video caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- show_caption_above_media
-
Optional. Pass True if the caption must be shown above the message media
- width
-
Optional. Video width
- height
-
Optional. Video height
- duration
-
Optional. Video duration in seconds
- supports_streaming
-
Optional. Pass True if the uploaded video is suitable for streaming
- has_spoiler
-
Optional. Pass True if the video needs to be covered with a spoiler animation
Official reference: Represents a voice message file to be sent.
pub type InputMediaVoiceNote {
InputMediaVoiceNote(
type_: String,
media: String,
caption: option.Option(String),
parse_mode: option.Option(String),
caption_entities: option.Option(List(MessageEntity)),
duration: option.Option(Int),
)
}
Constructors
-
InputMediaVoiceNote( type_: String, media: String, caption: option.Option(String), parse_mode: option.Option(String), caption_entities: option.Option(List(MessageEntity)), duration: option.Option(Int), )Arguments
- type_
-
Type of the media, must be voice_note
- media
-
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
- caption
-
Optional. Caption of the voice message to be sent, 0-1024 characters after entities parsing
- parse_mode
-
Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.
- caption_entities
-
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
- duration
-
Optional. Duration of the voice message in seconds
pub type InputMessageContent {
InputTextMessageContentInputMessageContent(
InputTextMessageContent,
)
InputRichMessageContentInputMessageContent(
InputRichMessageContent,
)
InputLocationMessageContentInputMessageContent(
InputLocationMessageContent,
)
InputVenueMessageContentInputMessageContent(
InputVenueMessageContent,
)
InputContactMessageContentInputMessageContent(
InputContactMessageContent,
)
InputInvoiceMessageContentInputMessageContent(
InputInvoiceMessageContent,
)
}
Constructors
-
InputTextMessageContentInputMessageContent( InputTextMessageContent, ) -
InputRichMessageContentInputMessageContent( InputRichMessageContent, ) -
InputLocationMessageContentInputMessageContent( InputLocationMessageContent, ) -
InputVenueMessageContentInputMessageContent( InputVenueMessageContent, ) -
InputContactMessageContentInputMessageContent( InputContactMessageContent, ) -
InputInvoiceMessageContentInputMessageContent( InputInvoiceMessageContent, )
pub type InputPaidMedia {
InputPaidMediaLivePhotoInputPaidMedia(InputPaidMediaLivePhoto)
InputPaidMediaPhotoInputPaidMedia(InputPaidMediaPhoto)
InputPaidMediaVideoInputPaidMedia(InputPaidMediaVideo)
}
Constructors
-
InputPaidMediaLivePhotoInputPaidMedia(InputPaidMediaLivePhoto) -
InputPaidMediaPhotoInputPaidMedia(InputPaidMediaPhoto) -
InputPaidMediaVideoInputPaidMedia(InputPaidMediaVideo)
Official reference: The paid media to send is a live photo.
pub type InputPaidMediaLivePhoto {
InputPaidMediaLivePhoto(
type_: String,
media: String,
photo: String,
)
}
Constructors
-
InputPaidMediaLivePhoto( type_: String, media: String, photo: String, )Arguments
- type_
-
Type of the media, must be live_photo
- media
-
Video of the live photo to send. Pass a file_id to send a file that exists on the Telegram servers (recommended) or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files. Sending live photos by a URL is currently unsupported.
- photo
-
The static photo to send. Pass a file_id to send a file that exists on the Telegram servers (recommended) or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files. Sending live photos by a URL is currently unsupported.
Official reference: The paid media to send is a photo.
pub type InputPaidMediaPhoto {
InputPaidMediaPhoto(type_: String, media: String)
}
Constructors
-
InputPaidMediaPhoto(type_: String, media: String)Arguments
- type_
-
Type of the media, must be photo
- media
-
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
Official reference: The paid media to send is a video.
pub type InputPaidMediaVideo {
InputPaidMediaVideo(
type_: String,
media: String,
thumbnail: option.Option(String),
cover: option.Option(String),
start_timestamp: option.Option(Int),
width: option.Option(Int),
height: option.Option(Int),
duration: option.Option(Int),
supports_streaming: option.Option(Bool),
)
}
Constructors
-
InputPaidMediaVideo( type_: String, media: String, thumbnail: option.Option(String), cover: option.Option(String), start_timestamp: option.Option(Int), width: option.Option(Int), height: option.Option(Int), duration: option.Option(Int), supports_streaming: option.Option(Bool), )Arguments
- type_
-
Type of the media, must be video
- media
-
File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
- thumbnail
-
Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail’s width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
- cover
-
Optional. Cover for the video in the message. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
- start_timestamp
-
Optional. Start timestamp for the video in the message
- width
-
Optional. Video width
- height
-
Optional. Video height
- duration
-
Optional. Video duration in seconds
- supports_streaming
-
Optional. Pass True if the uploaded video is suitable for streaming
pub type InputPollMedia {
InputMediaAnimationInputPollMedia(InputMediaAnimation)
InputMediaAudioInputPollMedia(InputMediaAudio)
InputMediaDocumentInputPollMedia(InputMediaDocument)
InputMediaLivePhotoInputPollMedia(InputMediaLivePhoto)
InputMediaLocationInputPollMedia(InputMediaLocation)
InputMediaPhotoInputPollMedia(InputMediaPhoto)
InputMediaVenueInputPollMedia(InputMediaVenue)
InputMediaVideoInputPollMedia(InputMediaVideo)
}
Constructors
-
InputMediaAnimationInputPollMedia(InputMediaAnimation) -
InputMediaAudioInputPollMedia(InputMediaAudio) -
InputMediaDocumentInputPollMedia(InputMediaDocument) -
InputMediaLivePhotoInputPollMedia(InputMediaLivePhoto) -
InputMediaLocationInputPollMedia(InputMediaLocation) -
InputMediaPhotoInputPollMedia(InputMediaPhoto) -
InputMediaVenueInputPollMedia(InputMediaVenue) -
InputMediaVideoInputPollMedia(InputMediaVideo)
Official reference: This object contains information about one answer option in a poll to be sent.
pub type InputPollOption {
InputPollOption(
text: String,
text_parse_mode: option.Option(String),
text_entities: option.Option(List(MessageEntity)),
media: option.Option(InputPollOptionMedia),
)
}
Constructors
-
InputPollOption( text: String, text_parse_mode: option.Option(String), text_entities: option.Option(List(MessageEntity)), media: option.Option(InputPollOptionMedia), )Arguments
- text
-
Option text, 1-100 characters
- text_parse_mode
-
Optional. Mode for parsing entities in the text. See formatting options for more details. Currently, only custom emoji entities are allowed.
- text_entities
-
Optional. A JSON-serialized list of special entities that appear in the poll option text. It can be specified instead of text_parse_mode.
- media
-
Optional. Media added to the poll option
pub type InputPollOptionMedia {
InputMediaAnimationInputPollOptionMedia(InputMediaAnimation)
InputMediaLinkInputPollOptionMedia(InputMediaLink)
InputMediaLivePhotoInputPollOptionMedia(InputMediaLivePhoto)
InputMediaLocationInputPollOptionMedia(InputMediaLocation)
InputMediaPhotoInputPollOptionMedia(InputMediaPhoto)
InputMediaStickerInputPollOptionMedia(InputMediaSticker)
InputMediaVenueInputPollOptionMedia(InputMediaVenue)
InputMediaVideoInputPollOptionMedia(InputMediaVideo)
}
Constructors
-
InputMediaAnimationInputPollOptionMedia(InputMediaAnimation) -
InputMediaLinkInputPollOptionMedia(InputMediaLink) -
InputMediaLivePhotoInputPollOptionMedia(InputMediaLivePhoto) -
InputMediaLocationInputPollOptionMedia(InputMediaLocation) -
InputMediaPhotoInputPollOptionMedia(InputMediaPhoto) -
InputMediaStickerInputPollOptionMedia(InputMediaSticker) -
InputMediaVenueInputPollOptionMedia(InputMediaVenue) -
InputMediaVideoInputPollOptionMedia(InputMediaVideo)
pub type InputProfilePhoto {
InputProfilePhotoStaticInputProfilePhoto(
InputProfilePhotoStatic,
)
InputProfilePhotoAnimatedInputProfilePhoto(
InputProfilePhotoAnimated,
)
}
Constructors
-
InputProfilePhotoStaticInputProfilePhoto(InputProfilePhotoStatic) -
InputProfilePhotoAnimatedInputProfilePhoto( InputProfilePhotoAnimated, )
Official reference: An animated profile photo in the MPEG4 format.
pub type InputProfilePhotoAnimated {
InputProfilePhotoAnimated(
type_: String,
animation: String,
main_frame_timestamp: option.Option(Float),
)
}
Constructors
-
InputProfilePhotoAnimated( type_: String, animation: String, main_frame_timestamp: option.Option(Float), )Arguments
- type_
-
Type of the profile photo, must be animated
- animation
-
The animated profile photo. Profile photos can’t be reused and can only be uploaded as a new file, so you can pass “attach://<file_attach_name>” if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
- main_frame_timestamp
-
Optional. Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0.
Official reference: A static profile photo in the .JPG format.
pub type InputProfilePhotoStatic {
InputProfilePhotoStatic(type_: String, photo: String)
}
Constructors
-
InputProfilePhotoStatic(type_: String, photo: String)Arguments
- type_
-
Type of the profile photo, must be static
- photo
-
The static profile photo. Profile photos can’t be reused and can only be uploaded as a new file, so you can pass “attach://<file_attach_name>” if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files: https://core.telegram.org/bots/api#sending-files
pub type InputRichBlock {
InputRichBlockParagraphInputRichBlock(InputRichBlockParagraph)
InputRichBlockSectionHeadingInputRichBlock(
InputRichBlockSectionHeading,
)
InputRichBlockPreformattedInputRichBlock(
InputRichBlockPreformatted,
)
InputRichBlockFooterInputRichBlock(InputRichBlockFooter)
InputRichBlockDividerInputRichBlock(InputRichBlockDivider)
InputRichBlockMathematicalExpressionInputRichBlock(
InputRichBlockMathematicalExpression,
)
InputRichBlockAnchorInputRichBlock(InputRichBlockAnchor)
InputRichBlockListInputRichBlock(InputRichBlockList)
InputRichBlockBlockQuotationInputRichBlock(
InputRichBlockBlockQuotation,
)
InputRichBlockPullQuotationInputRichBlock(
InputRichBlockPullQuotation,
)
InputRichBlockCollageInputRichBlock(InputRichBlockCollage)
InputRichBlockSlideshowInputRichBlock(InputRichBlockSlideshow)
InputRichBlockTableInputRichBlock(InputRichBlockTable)
InputRichBlockDetailsInputRichBlock(InputRichBlockDetails)
InputRichBlockMapInputRichBlock(InputRichBlockMap)
InputRichBlockAnimationInputRichBlock(InputRichBlockAnimation)
InputRichBlockAudioInputRichBlock(InputRichBlockAudio)
InputRichBlockPhotoInputRichBlock(InputRichBlockPhoto)
InputRichBlockVideoInputRichBlock(InputRichBlockVideo)
InputRichBlockVoiceNoteInputRichBlock(InputRichBlockVoiceNote)
InputRichBlockThinkingInputRichBlock(InputRichBlockThinking)
}
Constructors
-
InputRichBlockParagraphInputRichBlock(InputRichBlockParagraph) -
InputRichBlockSectionHeadingInputRichBlock( InputRichBlockSectionHeading, ) -
InputRichBlockPreformattedInputRichBlock( InputRichBlockPreformatted, ) -
InputRichBlockFooterInputRichBlock(InputRichBlockFooter) -
InputRichBlockDividerInputRichBlock(InputRichBlockDivider) -
InputRichBlockMathematicalExpressionInputRichBlock( InputRichBlockMathematicalExpression, ) -
InputRichBlockAnchorInputRichBlock(InputRichBlockAnchor) -
InputRichBlockListInputRichBlock(InputRichBlockList) -
InputRichBlockBlockQuotationInputRichBlock( InputRichBlockBlockQuotation, ) -
InputRichBlockPullQuotationInputRichBlock( InputRichBlockPullQuotation, ) -
InputRichBlockCollageInputRichBlock(InputRichBlockCollage) -
InputRichBlockSlideshowInputRichBlock(InputRichBlockSlideshow) -
InputRichBlockTableInputRichBlock(InputRichBlockTable) -
InputRichBlockDetailsInputRichBlock(InputRichBlockDetails) -
InputRichBlockMapInputRichBlock(InputRichBlockMap) -
InputRichBlockAnimationInputRichBlock(InputRichBlockAnimation) -
InputRichBlockAudioInputRichBlock(InputRichBlockAudio) -
InputRichBlockPhotoInputRichBlock(InputRichBlockPhoto) -
InputRichBlockVideoInputRichBlock(InputRichBlockVideo) -
InputRichBlockVoiceNoteInputRichBlock(InputRichBlockVoiceNote) -
InputRichBlockThinkingInputRichBlock(InputRichBlockThinking)
Official reference: A block with an anchor, corresponding to the HTML tag with the attribute name.
pub type InputRichBlockAnchor {
InputRichBlockAnchor(type_: String, name: String)
}
Constructors
-
InputRichBlockAnchor(type_: String, name: String)Arguments
- type_
-
Type of the block, always “anchor”
- name
-
The name of the anchor
Official reference: A block with an animation, corresponding to the HTML tag
pub type InputRichBlockAnimation {
InputRichBlockAnimation(
type_: String,
animation: InputMediaAnimation,
caption: option.Option(RichBlockCaption),
)
}
Constructors
-
InputRichBlockAnimation( type_: String, animation: InputMediaAnimation, caption: option.Option(RichBlockCaption), )Arguments
- type_
-
Type of the block, always “animation”
- animation
-
The animation. Caption is ignored.
- caption
-
Optional. Caption of the block
Official reference: A block with a music file, corresponding to the HTML tag
pub type InputRichBlockAudio {
InputRichBlockAudio(
type_: String,
audio: InputMediaAudio,
caption: option.Option(RichBlockCaption),
)
}
Constructors
-
InputRichBlockAudio( type_: String, audio: InputMediaAudio, caption: option.Option(RichBlockCaption), )Arguments
- type_
-
Type of the block, always “audio”
- audio
-
The audio. Caption is ignored.
- caption
-
Optional. Caption of the block
Official reference: A block quotation, corresponding to the HTML tag
.
pub type InputRichBlockBlockQuotation {
InputRichBlockBlockQuotation(
type_: String,
blocks: List(InputRichBlock),
credit: option.Option(RichText),
)
}
Constructors
-
InputRichBlockBlockQuotation( type_: String, blocks: List(InputRichBlock), credit: option.Option(RichText), )Arguments
- type_
-
Type of the block, always “blockquote”
- blocks
-
Content of the block
- credit
-
Optional. Credit of the block
Official reference: A collage, corresponding to the custom HTML tag
pub type InputRichBlockCollage {
InputRichBlockCollage(
type_: String,
blocks: List(InputRichBlock),
caption: option.Option(RichBlockCaption),
)
}
Constructors
-
InputRichBlockCollage( type_: String, blocks: List(InputRichBlock), caption: option.Option(RichBlockCaption), )Arguments
- type_
-
Type of the block, always “collage”
- blocks
-
Elements of the collage
- caption
-
Optional. Caption of the block
Official reference: An expandable block for details disclosure, corresponding to the HTML tag
pub type InputRichBlockDetails {
InputRichBlockDetails(
type_: String,
summary: RichText,
blocks: List(InputRichBlock),
is_open: option.Option(Bool),
)
}
Constructors
-
InputRichBlockDetails( type_: String, summary: RichText, blocks: List(InputRichBlock), is_open: option.Option(Bool), )Arguments
- type_
-
Type of the block, always “details”
- summary
-
Always shown summary of the block
- blocks
-
Content of the block
- is_open
-
Optional. Pass True if the content of the block is visible by default
Official reference: A divider, corresponding to the HTML tag
.
pub type InputRichBlockDivider {
InputRichBlockDivider(type_: String)
}
Constructors
-
InputRichBlockDivider(type_: String)Arguments
- type_
-
Type of the block, always “divider”
Official reference: A list of blocks, corresponding to the HTML tag
- or
- .
- with multiple nested tags
pub type InputRichBlockList {
InputRichBlockList(
type_: String,
items: List(InputRichBlockListItem),
)
}
Constructors
-
InputRichBlockList( type_: String, items: List(InputRichBlockListItem), )Arguments
- type_
-
Type of the block, always “list”
- items
-
Items of the list
Official reference: An item of a list to be sent.
pub type InputRichBlockListItem {
InputRichBlockListItem(
blocks: List(InputRichBlock),
has_checkbox: option.Option(Bool),
is_checked: option.Option(Bool),
value: option.Option(Int),
type_: option.Option(String),
)
}
Constructors
-
InputRichBlockListItem( blocks: List(InputRichBlock), has_checkbox: option.Option(Bool), is_checked: option.Option(Bool), value: option.Option(Int), type_: option.Option(String), )Arguments
- blocks
-
The content of the item
- has_checkbox
-
Optional. Pass True if the item has a checkbox
- is_checked
-
Optional. Pass True if the item has a checked checkbox
- value
-
Optional. For ordered lists, the numeric value of the item label
- type_
-
Optional. For ordered lists, the type of the item label; must be one of “a” for lowercase letters, “A” for uppercase letters, “i” for lowercase Roman numerals, “I” for uppercase Roman numerals, or “1” for decimal numbers
Official reference: A block with a map, corresponding to the custom HTML tag
pub type InputRichBlockMap {
InputRichBlockMap(
type_: String,
location: Location,
zoom: Int,
width: Int,
height: Int,
caption: option.Option(RichBlockCaption),
)
}
Constructors
-
InputRichBlockMap( type_: String, location: Location, zoom: Int, width: Int, height: Int, caption: option.Option(RichBlockCaption), )Arguments
- type_
-
Type of the block, always “map”
- location
-
Location of the center of the map
- zoom
-
Map zoom level; 0-24
- width
-
Map width; 0-10000
- height
-
Map height; 0-10000
- caption
-
Optional. Caption of the block
Official reference: A block with a mathematical expression in LaTeX format, corresponding to the custom HTML tag
pub type InputRichBlockMathematicalExpression {
InputRichBlockMathematicalExpression(
type_: String,
expression: String,
)
}
Constructors
-
InputRichBlockMathematicalExpression( type_: String, expression: String, )Arguments
- type_
-
Type of the block, always “mathematical_expression”
- expression
-
The mathematical expression in LaTeX format
Official reference: A text paragraph, corresponding to the HTML tag
.
pub type InputRichBlockParagraph {
InputRichBlockParagraph(type_: String, text: RichText)
}
Constructors
-
InputRichBlockParagraph(type_: String, text: RichText)Arguments
- type_
-
Type of the block, always “paragraph”
- text
-
Text of the block
Official reference: A block with a photo, corresponding to the HTML tag .
pub type InputRichBlockPhoto {
InputRichBlockPhoto(
type_: String,
photo: InputMediaPhoto,
caption: option.Option(RichBlockCaption),
)
}
Constructors
-
InputRichBlockPhoto( type_: String, photo: InputMediaPhoto, caption: option.Option(RichBlockCaption), )Arguments
- type_
-
Type of the block, always “photo”
- photo
-
The photo. Caption is ignored.
- caption
-
Optional. Caption of the block
Official reference: A preformatted text block, corresponding to the nested HTML tags
and .
pub type InputRichBlockPreformatted {
InputRichBlockPreformatted(
type_: String,
text: RichText,
language: option.Option(String),
)
}
Constructors
-
InputRichBlockPreformatted( type_: String, text: RichText, language: option.Option(String), )Arguments
- type_
-
Type of the block, always “pre”
- text
-
Text of the block
- language
-
Optional. The programming language of the text
Official reference: A quotation with centered text, loosely corresponding to the HTML tag
pub type InputRichBlockPullQuotation {
InputRichBlockPullQuotation(
type_: String,
text: RichText,
credit: option.Option(RichText),
)
}
Constructors
-
InputRichBlockPullQuotation( type_: String, text: RichText, credit: option.Option(RichText), )Arguments
- type_
-
Type of the block, always “pullquote”
- text
-
Text of the block
- credit
-
Optional. Credit of the block
Official reference: A section heading, corresponding to the HTML tags
, , , , , or .
, , , or .
, or .
pub type InputRichBlockSectionHeading {
InputRichBlockSectionHeading(
type_: String,
text: RichText,
size: Int,
)
}
Constructors
-
InputRichBlockSectionHeading( type_: String, text: RichText, size: Int, )Arguments
- type_
-
Type of the block, always “heading”
- text
-
Text of the block
- size
-
Relative size of the text font; 1-6, 1 is the largest, 6 is the smallest
Official reference: A slideshow, corresponding to the custom HTML tag
pub type InputRichBlockSlideshow {
InputRichBlockSlideshow(
type_: String,
blocks: List(InputRichBlock),
caption: option.Option(RichBlockCaption),
)
}
Constructors
-
InputRichBlockSlideshow( type_: String, blocks: List(InputRichBlock), caption: option.Option(RichBlockCaption), )Arguments
- type_
-
Type of the block, always “slideshow”
- blocks
-
Elements of the slideshow
- caption
-
Optional. Caption of the block
Official reference: A table, corresponding to the HTML tag