MoonBit Telegram Bot API library with async support
Dependencies
moon add tonyfettes/telegram-botasync fn main {
guard @sys.get_env_var("TELEGRAM_BOT_TOKEN") is Some(token) else {
fail("Error: TELEGRAM_BOT_TOKEN environment variable is not set")
}
let bot = @bot.Bot::new(token~)
let mut offset = 0
while true {
let updates = bot.get_updates(offset~, timeout=30) catch {
error => {
println("Error getting updates: \{error}")
continue
}
}
for update in updates {
offset = update.update_id + 1
if update.message is Some(msg) && msg.text is Some(text) {
try bot.send_message(chat_id=msg.chat.id, text~) |> ignore() catch {
error => println("Error sending message: \{error}")
}
}
}
}
}// Send a text message
bot.send_message(chat_id=123456L, text="Hello!") |> ignore()
// Send a photo
bot.send_photo(chat_id=123456L, photo="https://example.com/photo.jpg") |> ignore()
// Get bot info
let me = bot.get_me()
// Edit a message
bot.edit_message_text(chat_id=123456L, message_id=42, text="Updated!") |> ignore()pub(all) suberror TelegramError {
HttpError(Int, String)
ApiError(Int, String)
InvalidUtf8(Malformed)
InvalidJson(ParseError)
InvalidResponse(Json)
InvalidResult(Json, JsonDecodeError)
ParseError(String)
}impl Show for TelegramErrorpub struct AcceptedGiftTypes {
unlimited_gifts : Bool
limited_gifts : Bool
unique_gifts : Bool
premium_subscription : Bool
}impl Eq for AcceptedGiftTypesimpl Show for AcceptedGiftTypesimpl ToJson for AcceptedGiftTypesimpl FromJson for AcceptedGiftTypesfn AcceptedGiftTypes::new(unlimited_gifts~ : Bool, limited_gifts~ : Bool, unique_gifts~ : Bool, premium_subscription~ : Bool) -> AcceptedGiftTypespub struct Animation {
file_id : String
file_unique_id : String
width : Int
height : Int
duration : Int
thumbnail : PhotoSize?
file_name : String?
mime_type : String?
file_size : Int64?
}pub struct Audio {
file_id : String
file_unique_id : String
duration : Int
performer : String?
title : String?
file_name : String?
mime_type : String?
file_size : Int64?
thumbnail : PhotoSize?
}pub(all) enum BackgroundFill {
Solid(BackgroundFillSolid)
Gradient(BackgroundFillGradient)
FreeformGradient(BackgroundFillFreeformGradient)
}impl Eq for BackgroundFillimpl Show for BackgroundFillimpl ToJson for BackgroundFillimpl FromJson for BackgroundFillimpl Eq for BackgroundFillFreeformGradientimpl Show for BackgroundFillFreeformGradientpub struct BackgroundFillGradient {
top_color : Int
bottom_color : Int
rotation_angle : Int
}impl Eq for BackgroundFillGradientimpl Show for BackgroundFillGradientfn BackgroundFillGradient::new(top_color~ : Int, bottom_color~ : Int, rotation_angle~ : Int) -> BackgroundFillGradientpub struct BackgroundFillSolid {
color : Int
}impl Eq for BackgroundFillSolidimpl Show for BackgroundFillSolidpub(all) enum BackgroundType {
Fill(BackgroundTypeFill)
Wallpaper(BackgroundTypeWallpaper)
Pattern(BackgroundTypePattern)
ChatTheme(BackgroundTypeChatTheme)
}impl Eq for BackgroundTypeimpl Show for BackgroundTypeimpl ToJson for BackgroundTypeimpl FromJson for BackgroundTypepub struct BackgroundTypeChatTheme {
theme_name : String
}impl Eq for BackgroundTypeChatThemeimpl Show for BackgroundTypeChatThemeimpl Eq for BackgroundTypeFillimpl Show for BackgroundTypeFillpub struct BackgroundTypePattern {
document : DocumentPlaceholder
fill : BackgroundFill
intensity : Int
is_inverted : Bool?
is_moving : Bool?
}impl Eq for BackgroundTypePatternimpl Show for BackgroundTypePatternfn BackgroundTypePattern::new(document~ : DocumentPlaceholder, fill~ : BackgroundFill, intensity~ : Int, is_inverted? : Bool, is_moving? : Bool) -> BackgroundTypePatternpub struct BackgroundTypeWallpaper {
document : DocumentPlaceholder
dark_theme_dimming : Int
is_blurred : Bool?
is_moving : Bool?
}impl Eq for BackgroundTypeWallpaperimpl Show for BackgroundTypeWallpaperfn BackgroundTypeWallpaper::new(document~ : DocumentPlaceholder, dark_theme_dimming~ : Int, is_blurred? : Bool, is_moving? : Bool) -> BackgroundTypeWallpaperpub struct Birthdate {
day : Int
month : Int
year : Int?
}pub struct Bot {
token : String
base_url : String
}async fn Bot::answer_callback_query(self : Bot, callback_query_id~ : String, text? : String, show_alert? : Bool) -> Bool raise TelegramErrorasync fn Bot::answer_inline_query(self : Bot, inline_query_id~ : String, results~ : Array[Json], cache_time? : Int, is_personal? : Bool, next_offset? : String, button? : InlineQueryResultsButton) -> Bool raise TelegramErrorasync fn Bot::answer_pre_checkout_query(self : Bot, pre_checkout_query_id~ : String, ok~ : Bool, error_message? : String) -> Bool raise TelegramErrorasync fn Bot::answer_shipping_query(self : Bot, shipping_query_id~ : String, ok~ : Bool, shipping_options? : Array[ShippingOption], error_message? : String) -> Bool raise TelegramErrorasync fn Bot::answer_web_app_query(self : Bot, web_app_query_id~ : String, result~ : Json) -> Json raise TelegramErrorasync fn Bot::approve_chat_join_request(self : Bot, chat_id~ : Int64, user_id~ : Int64) -> Bool raise TelegramErrorasync fn Bot::approve_suggested_post(self : Bot, chat_id~ : Int64, user_id~ : Int64, inline_message_id? : String, message_id? : Int) -> Bool raise TelegramErrorasync fn Bot::ban_chat_member(self : Bot, chat_id~ : Int64, user_id~ : Int64, until_date? : Int, revoke_messages? : Bool) -> Bool raise TelegramErrorasync fn Bot::close_forum_topic(self : Bot, chat_id~ : Int64, message_thread_id~ : Int) -> Bool raise TelegramErrorasync fn Bot::copy_message(self : Bot, chat_id~ : Int64, from_chat_id~ : Int64, message_id~ : Int, disable_notification? : Bool, reply_markup? : InlineKeyboardMarkup) -> MessageId raise TelegramErrorasync fn Bot::create_chat_invite_link(self : Bot, chat_id~ : Int64, name? : String, expire_date? : Int, member_limit? : Int, creates_join_request? : Bool) -> Json raise TelegramErrorasync fn Bot::create_forum_topic(self : Bot, chat_id~ : Int64, name~ : String, icon_color? : Int, icon_custom_emoji_id? : String) -> Json raise TelegramErrorasync fn Bot::create_invoice_link(self : Bot, title~ : String, description~ : String, payload~ : String, currency~ : String, prices~ : Array[LabeledPrice], provider_token? : String, max_tip_amount? : Int, suggested_tip_amounts? : Array[Int], provider_data? : String, photo_url? : String, photo_size? : Int, photo_width? : Int, photo_height? : Int, need_name? : Bool, need_phone_number? : Bool, need_email? : Bool, need_shipping_address? : Bool, send_phone_number_to_provider? : Bool, send_email_to_provider? : Bool, is_flexible? : Bool, subscription_period? : Int, business_connection_id? : String) -> String raise TelegramErrorasync fn Bot::decline_chat_join_request(self : Bot, chat_id~ : Int64, user_id~ : Int64) -> Bool raise TelegramErrorasync fn Bot::decline_suggested_post(self : Bot, chat_id~ : Int64, user_id~ : Int64, inline_message_id? : String, message_id? : Int) -> Bool raise TelegramErrorasync fn Bot::delete_forum_topic(self : Bot, chat_id~ : Int64, message_thread_id~ : Int) -> Bool raise TelegramErrorasync fn Bot::delete_message(self : Bot, chat_id~ : Int64, message_id~ : Int) -> Bool raise TelegramErrorasync fn Bot::delete_messages(self : Bot, chat_id~ : Int64, message_ids~ : Array[Int]) -> Bool raise TelegramErrorasync fn Bot::delete_my_commands(self : Bot, scope? : Json, language_code? : String) -> Bool raise TelegramErrorasync fn Bot::edit_chat_invite_link(self : Bot, chat_id~ : Int64, invite_link~ : String, name? : String, expire_date? : Int, member_limit? : Int, creates_join_request? : Bool) -> Json raise TelegramErrorasync fn Bot::edit_forum_topic(self : Bot, chat_id~ : Int64, message_thread_id~ : Int, name? : String, icon_custom_emoji_id? : String) -> Bool raise TelegramErrorasync fn Bot::edit_general_forum_topic(self : Bot, chat_id~ : Int64, name~ : String) -> Bool raise TelegramErrorasync fn Bot::edit_message_caption(self : Bot, business_connection_id? : String, chat_id? : Int64, message_id? : Int, inline_message_id? : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], show_caption_above_media? : Bool, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::edit_message_checklist(self : Bot, business_connection_id? : String, chat_id? : Int64, message_id? : Int, inline_message_id? : String, reply_to_message_id? : Int, checklist~ : InputChecklist) -> Message raise TelegramErrorasync fn Bot::edit_message_live_location(self : Bot, latitude~ : Double, longitude~ : Double, business_connection_id? : String, chat_id? : Int64, message_id? : Int, inline_message_id? : String, live_period? : Int, horizontal_accuracy? : Double, heading? : Int, proximity_alert_radius? : Int, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::edit_message_media(self : Bot, media~ : Json, business_connection_id? : String, chat_id? : Int64, message_id? : Int, inline_message_id? : String, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::edit_message_reply_markup(self : Bot, chat_id~ : Int64, message_id~ : Int, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::edit_message_text(self : Bot, chat_id~ : Int64, message_id~ : Int, text~ : String, parse_mode? : String, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::forward_message(self : Bot, chat_id~ : Int64, from_chat_id~ : Int64, message_id~ : Int, message_thread_id? : Int, disable_notification? : Bool, protect_content? : Bool) -> Message raise TelegramErrorasync fn Bot::get_chat_gifts(self : Bot, chat_id~ : ChatId, offset? : Int, limit? : Int) -> Gifts raise TelegramErrorasync fn Bot::get_chat_member(self : Bot, chat_id~ : ChatId, user_id~ : Int64) -> Json raise TelegramErrorasync fn Bot::get_game_high_scores(self : Bot, user_id~ : Int64, chat_id? : Int64, message_id? : Int, inline_message_id? : String) -> Array[Json] raise TelegramErrorasync fn Bot::get_my_commands(self : Bot, scope? : Json, language_code? : String) -> Array[BotCommand] raise TelegramErrorasync fn Bot::get_my_short_description(self : Bot, language_code? : String) -> Json raise TelegramErrorasync fn Bot::get_user_profile_photos(self : Bot, user_id~ : Int64, offset? : Int, limit? : Int) -> Json raise TelegramErrorasync fn Bot::pin_chat_message(self : Bot, chat_id~ : Int64, message_id~ : Int, business_connection_id? : String, disable_notification? : Bool) -> Bool raise TelegramErrorasync fn Bot::promote_chat_member(self : Bot, chat_id~ : Int64, user_id~ : Int64, 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? : Bool, can_edit_messages? : Bool, can_pin_messages? : Bool, can_manage_topics? : Bool) -> Bool raise TelegramErrorasync fn Bot::reopen_forum_topic(self : Bot, chat_id~ : Int64, message_thread_id~ : Int) -> Bool raise TelegramErrorasync fn Bot::repost_story(self : Bot, chat_id~ : ChatId, from_chat_id~ : ChatId, story_id~ : Int, message_thread_id? : Int, direct_messages_topic_id? : Int, business_connection_id? : String, text? : String, parse_mode? : String, entities? : Array[MessageEntity]) -> MessageId raise TelegramErrorasync fn Bot::restrict_chat_member(self : Bot, chat_id~ : Int64, user_id~ : Int64, permissions~ : ChatPermissions, use_independent_chat_permissions? : Bool, until_date? : Int) -> Bool raise TelegramErrorasync fn Bot::revoke_chat_invite_link(self : Bot, chat_id~ : Int64, invite_link~ : String) -> Json raise TelegramErrorasync fn Bot::send_animation(self : Bot, chat_id~ : Int64, animation~ : String, business_connection_id? : String, message_thread_id? : Int, duration? : Int, width? : Int, height? : Int, thumbnail? : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], show_caption_above_media? : Bool, has_spoiler? : Bool, disable_notification? : Bool, protect_content? : Bool, allow_paid_broadcast? : Bool, message_effect_id? : String, reply_parameters? : ReplyParameters, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::send_audio(self : Bot, chat_id~ : Int64, audio~ : String, business_connection_id? : String, message_thread_id? : Int, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], duration? : Int, performer? : String, title? : String, thumbnail? : String, disable_notification? : Bool, protect_content? : Bool, allow_paid_broadcast? : Bool, message_effect_id? : String, reply_parameters? : ReplyParameters, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::send_chat_action(self : Bot, chat_id~ : Int64, action~ : String, business_connection_id? : String, message_thread_id? : Int) -> Bool raise TelegramErrorasync fn Bot::send_checklist(self : Bot, business_connection_id? : String, chat_id~ : Int64, message_thread_id? : Int, checklist~ : InputChecklist) -> Message raise TelegramErrorasync fn Bot::send_contact(self : Bot, chat_id~ : Int64, phone_number~ : String, first_name~ : String, business_connection_id? : String, message_thread_id? : Int, last_name? : String, vcard? : String, disable_notification? : Bool, protect_content? : Bool, allow_paid_broadcast? : Bool, message_effect_id? : String, reply_parameters? : ReplyParameters, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::send_dice(self : Bot, chat_id~ : Int64, business_connection_id? : String, message_thread_id? : Int, emoji? : String, disable_notification? : Bool, protect_content? : Bool, allow_paid_broadcast? : Bool, message_effect_id? : String, reply_parameters? : ReplyParameters, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::send_document(self : Bot, chat_id~ : Int64, document~ : String, business_connection_id? : String, message_thread_id? : Int, thumbnail? : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], disable_content_type_detection? : Bool, disable_notification? : Bool, protect_content? : Bool, allow_paid_broadcast? : Bool, message_effect_id? : String, reply_parameters? : ReplyParameters, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::send_game(self : Bot, chat_id~ : Int64, game_short_name~ : String, business_connection_id? : String, message_thread_id? : Int, disable_notification? : Bool, protect_content? : Bool, allow_paid_broadcast? : Bool, message_effect_id? : String, reply_parameters? : ReplyParameters, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::send_invoice(self : Bot, chat_id~ : Int64, title~ : String, description~ : String, payload~ : String, currency~ : String, prices~ : Array[LabeledPrice], provider_token? : String, message_thread_id? : Int, max_tip_amount? : Int, suggested_tip_amounts? : Array[Int], start_parameter? : String, provider_data? : String, photo_url? : String, photo_size? : Int, photo_width? : Int, photo_height? : Int, need_name? : Bool, need_phone_number? : Bool, need_email? : Bool, need_shipping_address? : Bool, send_phone_number_to_provider? : Bool, send_email_to_provider? : Bool, is_flexible? : Bool, disable_notification? : Bool, protect_content? : Bool, allow_paid_broadcast? : Bool, message_effect_id? : String, reply_parameters? : ReplyParameters, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::send_location(self : Bot, chat_id~ : Int64, latitude~ : Double, longitude~ : Double, business_connection_id? : String, message_thread_id? : Int, horizontal_accuracy? : Double, live_period? : Int, heading? : Int, proximity_alert_radius? : Int, disable_notification? : Bool, protect_content? : Bool, allow_paid_broadcast? : Bool, message_effect_id? : String, reply_parameters? : ReplyParameters, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::send_message(self : Bot, chat_id~ : Int64, text~ : String, parse_mode? : String, disable_notification? : Bool, reply_to_message_id? : Int, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::send_message_draft(self : Bot, chat_id~ : ChatId, text~ : String, message_thread_id? : Int, direct_messages_topic_id? : Int, business_connection_id? : String, parse_mode? : String, entities? : Array[MessageEntity], link_preview_options? : LinkPreviewOptions, disable_web_page_preview? : Bool) -> MessageId raise TelegramErrorasync fn Bot::send_photo(self : Bot, chat_id~ : Int64, photo~ : String, business_connection_id? : String, message_thread_id? : Int, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], show_caption_above_media? : Bool, has_spoiler? : Bool, disable_notification? : Bool, protect_content? : Bool, allow_paid_broadcast? : Bool, message_effect_id? : String, reply_parameters? : ReplyParameters, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::send_poll(self : Bot, chat_id~ : Int64, question~ : String, options~ : Array[InputPollOption], business_connection_id? : String, message_thread_id? : Int, question_parse_mode? : String, question_entities? : Array[MessageEntity], is_anonymous? : Bool, type_? : String, allows_multiple_answers? : Bool, correct_option_id? : Int, explanation? : String, explanation_parse_mode? : String, explanation_entities? : Array[MessageEntity], open_period? : Int, close_date? : Int, is_closed? : Bool, disable_notification? : Bool, protect_content? : Bool, allow_paid_broadcast? : Bool, message_effect_id? : String, reply_parameters? : ReplyParameters, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::send_sticker(self : Bot, chat_id~ : Int64, sticker~ : String, business_connection_id? : String, message_thread_id? : Int, emoji? : String, disable_notification? : Bool, protect_content? : Bool, allow_paid_broadcast? : Bool, message_effect_id? : String, reply_parameters? : ReplyParameters, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::send_venue(self : Bot, chat_id~ : Int64, latitude~ : Double, longitude~ : Double, title~ : String, address~ : String, business_connection_id? : String, message_thread_id? : Int, foursquare_id? : String, foursquare_type? : String, google_place_id? : String, google_place_type? : String, disable_notification? : Bool, protect_content? : Bool, allow_paid_broadcast? : Bool, message_effect_id? : String, reply_parameters? : ReplyParameters, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::send_video(self : Bot, chat_id~ : Int64, video~ : String, business_connection_id? : String, message_thread_id? : Int, duration? : Int, width? : Int, height? : Int, thumbnail? : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], show_caption_above_media? : Bool, has_spoiler? : Bool, supports_streaming? : Bool, disable_notification? : Bool, protect_content? : Bool, allow_paid_broadcast? : Bool, message_effect_id? : String, reply_parameters? : ReplyParameters, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::send_video_note(self : Bot, chat_id~ : Int64, video_note~ : String, business_connection_id? : String, message_thread_id? : Int, duration? : Int, length? : Int, thumbnail? : String, disable_notification? : Bool, protect_content? : Bool, allow_paid_broadcast? : Bool, message_effect_id? : String, reply_parameters? : ReplyParameters, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::send_voice(self : Bot, chat_id~ : Int64, voice~ : String, business_connection_id? : String, message_thread_id? : Int, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], duration? : Int, disable_notification? : Bool, protect_content? : Bool, allow_paid_broadcast? : Bool, message_effect_id? : String, reply_parameters? : ReplyParameters, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::set_chat_administrator_custom_title(self : Bot, chat_id~ : Int64, user_id~ : Int64, custom_title~ : String) -> Bool raise TelegramErrorasync fn Bot::set_chat_description(self : Bot, chat_id~ : Int64, description? : String) -> Bool raise TelegramErrorasync fn Bot::set_chat_menu_button(self : Bot, chat_id? : Int64, menu_button? : Json) -> Bool raise TelegramErrorasync fn Bot::set_chat_permissions(self : Bot, chat_id~ : Int64, permissions~ : ChatPermissions, use_independent_chat_permissions? : Bool) -> Bool raise TelegramErrorasync fn Bot::set_chat_photo(self : Bot, chat_id~ : Int64, photo~ : String) -> Bool raise TelegramErrorasync fn Bot::set_chat_title(self : Bot, chat_id~ : Int64, title~ : String) -> Bool raise TelegramErrorasync fn Bot::set_game_score(self : Bot, user_id~ : Int64, score~ : Int, force? : Bool, disable_edit_message? : Bool, chat_id? : Int64, message_id? : Int, inline_message_id? : String) -> Json raise TelegramErrorasync fn Bot::set_my_commands(self : Bot, commands~ : Array[BotCommand]) -> Bool raise TelegramErrorasync fn Bot::set_my_description(self : Bot, description? : String, language_code? : String) -> Bool raise TelegramErrorasync fn Bot::set_my_name(self : Bot, name? : String, language_code? : String) -> Bool raise TelegramErrorasync fn Bot::set_my_short_description(self : Bot, short_description? : String, language_code? : String) -> Bool raise TelegramErrorasync fn Bot::set_sticker_emoji_list(self : Bot, sticker~ : String, emoji_list~ : Array[String]) -> Bool raise TelegramErrorasync fn Bot::set_sticker_position_in_set(self : Bot, sticker~ : String, position~ : Int) -> Bool raise TelegramErrorasync fn Bot::set_webhook(self : Bot, url~ : String, certificate? : String, ip_address? : String, max_connections? : Int, allowed_updates? : Array[String], drop_pending_updates? : Bool, secret_token? : String) -> Bool raise TelegramErrorasync fn Bot::stop_message_live_location(self : Bot, business_connection_id? : String, chat_id? : Int64, message_id? : Int, inline_message_id? : String, reply_markup? : InlineKeyboardMarkup) -> Message raise TelegramErrorasync fn Bot::unban_chat_member(self : Bot, chat_id~ : Int64, user_id~ : Int64, only_if_banned? : Bool) -> Bool raise TelegramErrorasync fn Bot::unpin_all_forum_topic_messages(self : Bot, chat_id~ : Int64, message_thread_id~ : Int) -> Bool raise TelegramErrorasync fn Bot::unpin_chat_message(self : Bot, chat_id~ : Int64, business_connection_id? : String, message_id? : Int) -> Bool raise TelegramErrorasync fn Bot::upload_sticker_file(self : Bot, user_id~ : Int64, sticker~ : String, sticker_format~ : String) -> File raise TelegramErrorpub struct BotCommand {
command : String
description : String
}impl Eq for BotCommandimpl Show for BotCommandimpl ToJson for BotCommandimpl FromJson for BotCommandpub(all) enum BotCommandScope {
Default
AllPrivateChats
AllGroupChats
AllChatAdministrators
Chat(BotCommandScopeChat)
ChatAdministrators(BotCommandScopeChatAdministrators)
ChatMember(BotCommandScopeChatMember)
}impl Eq for BotCommandScopeimpl Show for BotCommandScopeimpl ToJson for BotCommandScopeimpl FromJson for BotCommandScopepub struct BotCommandScopeChat {
chat_id : Int64
}impl Eq for BotCommandScopeChatimpl Show for BotCommandScopeChatpub struct BotCommandScopeChatAdministrators {
chat_id : Int64
}impl Eq for BotCommandScopeChatAdministratorsimpl Show for BotCommandScopeChatAdministratorspub struct BotCommandScopeChatMember {
chat_id : Int64
user_id : Int64
}impl Eq for BotCommandScopeChatMemberimpl Show for BotCommandScopeChatMemberpub struct BusinessConnection {
id : String
user : User
user_chat_id : Int64
date : Int
can_reply : Bool
is_enabled : Bool
}impl Eq for BusinessConnectionimpl Show for BusinessConnectionimpl ToJson for BusinessConnectionimpl FromJson for BusinessConnectionfn BusinessConnection::new(id~ : String, user~ : User, user_chat_id~ : Int64, date~ : Int, can_reply~ : Bool, is_enabled~ : Bool) -> BusinessConnectionimpl Eq for BusinessIntroimpl Show for BusinessIntroimpl ToJson for BusinessIntroimpl FromJson for BusinessIntroimpl Eq for BusinessLocationimpl Show for BusinessLocationimpl ToJson for BusinessLocationimpl FromJson for BusinessLocationimpl Eq for BusinessMessagesDeletedimpl Show for BusinessMessagesDeletedimpl ToJson for BusinessMessagesDeletedimpl FromJson for BusinessMessagesDeletedfn BusinessMessagesDeleted::new(business_connection_id~ : String, chat~ : Chat, message_ids~ : Array[Int]) -> BusinessMessagesDeletedpub struct BusinessOpeningHours {
time_zone_name : String
opening_hours : Array[BusinessOpeningHoursInterval]
}impl Eq for BusinessOpeningHoursimpl Show for BusinessOpeningHoursimpl ToJson for BusinessOpeningHoursimpl FromJson for BusinessOpeningHoursfn BusinessOpeningHours::new(time_zone_name~ : String, opening_hours~ : Array[BusinessOpeningHoursInterval]) -> BusinessOpeningHourspub struct BusinessOpeningHoursInterval {
opening_minute : Int
closing_minute : Int
}impl Eq for BusinessOpeningHoursIntervalimpl Show for BusinessOpeningHoursIntervalimpl ToJson for BusinessOpeningHoursIntervalimpl FromJson for BusinessOpeningHoursIntervalfn BusinessOpeningHoursInterval::new(opening_minute~ : Int, closing_minute~ : Int) -> BusinessOpeningHoursIntervalpub struct CachedInputMessageContent {
message_text : String
}impl Eq for CachedInputMessageContentimpl Show for CachedInputMessageContentimpl ToJson for CachedInputMessageContentimpl FromJson for CachedInputMessageContentpub struct CallbackGame {
}impl Eq for CallbackGameimpl Show for CallbackGameimpl ToJson for CallbackGameimpl FromJson for CallbackGameimpl Eq for CallbackQueryimpl Show for CallbackQueryimpl ToJson for CallbackQueryimpl FromJson for CallbackQueryfn CallbackQuery::new(id~ : String, from~ : User, message? : Message, inline_message_id? : String, chat_instance~ : String, data? : String) -> CallbackQuerypub struct Chat {
id : Int64
type_ : ChatType
title : String?
username : String?
first_name : String?
last_name : String?
}pub struct 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 : Bool?
can_edit_messages : Bool?
can_pin_messages : Bool?
can_manage_topics : Bool?
}impl Eq for ChatAdministratorRightsimpl Show for ChatAdministratorRightsimpl ToJson for ChatAdministratorRightsimpl FromJson for ChatAdministratorRightsfn ChatAdministratorRights::new(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? : Bool, can_edit_messages? : Bool, can_pin_messages? : Bool, can_manage_topics? : Bool) -> ChatAdministratorRightsimpl Eq for ChatBackgroundimpl Show for ChatBackgroundimpl ToJson for ChatBackgroundimpl FromJson for ChatBackgroundpub struct ChatBoostAdded {
boost_count : Int
}impl Eq for ChatBoostAddedimpl Show for ChatBoostAddedimpl ToJson for ChatBoostAddedimpl FromJson for ChatBoostAddedpub struct ChatFullInfo {
id : Int64
type_ : String
accent_color_id : Int
max_reaction_count : Int
title : String?
username : String?
first_name : String?
last_name : String?
is_forum : Bool?
photo : ChatPhoto?
active_usernames : Array[String]?
birthdate : Birthdate?
business_intro : BusinessIntro?
business_location : BusinessLocation?
business_opening_hours : BusinessOpeningHours?
personal_chat : Chat?
available_reactions : Array[ReactionType]?
background_custom_emoji_id : String?
profile_accent_color_id : Int?
profile_background_custom_emoji_id : String?
emoji_status_custom_emoji_id : String?
emoji_status_expiration_date : Int?
bio : String?
has_private_forwards : Bool?
has_restricted_voice_and_video_messages : Bool?
join_to_send_messages : Bool?
join_by_request : Bool?
description : String?
invite_link : String?
pinned_message : Message?
permissions : ChatPermissions?
can_send_paid_media : Bool?
slow_mode_delay : Int?
unrestrict_boost_count : Int?
message_auto_delete_time : Int?
has_aggressive_anti_spam_enabled : Bool?
has_hidden_members : Bool?
has_protected_content : Bool?
has_visible_history : Bool?
sticker_set_name : String?
can_set_sticker_set : Bool?
custom_emoji_sticker_set_name : String?
linked_chat_id : Int64?
location : ChatLocation?
}impl Eq for ChatFullInfoimpl Show for ChatFullInfoimpl ToJson for ChatFullInfoimpl FromJson for ChatFullInfofn ChatFullInfo::new(id~ : Int64, type_~ : String, accent_color_id~ : Int, max_reaction_count~ : Int, title? : String, username? : String, first_name? : String, last_name? : String, is_forum? : Bool, photo? : ChatPhoto, active_usernames? : Array[String], birthdate? : Birthdate, business_intro? : BusinessIntro, business_location? : BusinessLocation, business_opening_hours? : BusinessOpeningHours, personal_chat? : Chat, available_reactions? : Array[ReactionType], background_custom_emoji_id? : String, profile_accent_color_id? : Int, profile_background_custom_emoji_id? : String, emoji_status_custom_emoji_id? : String, emoji_status_expiration_date? : Int, bio? : String, has_private_forwards? : Bool, has_restricted_voice_and_video_messages? : Bool, join_to_send_messages? : Bool, join_by_request? : Bool, description? : String, invite_link? : String, pinned_message? : Message, permissions? : ChatPermissions, can_send_paid_media? : Bool, slow_mode_delay? : Int, unrestrict_boost_count? : Int, message_auto_delete_time? : Int, has_aggressive_anti_spam_enabled? : Bool, has_hidden_members? : Bool, has_protected_content? : Bool, has_visible_history? : Bool, sticker_set_name? : String, can_set_sticker_set? : Bool, custom_emoji_sticker_set_name? : String, linked_chat_id? : Int64, location? : ChatLocation) -> ChatFullInfopub(all) enum ChatId {
Id(Int64)
Username(String)
}impl Eq for ChatLocationimpl Show for ChatLocationimpl ToJson for ChatLocationimpl FromJson for ChatLocationpub(all) enum ChatMember {
Owner(ChatMemberOwner)
Administrator(ChatMemberAdministrator)
Member(ChatMemberMember)
Restricted(ChatMemberRestricted)
Left(ChatMemberLeft)
Banned(ChatMemberBanned)
}impl Eq for ChatMemberimpl Show for ChatMemberimpl ToJson for ChatMemberimpl FromJson for ChatMemberpub struct ChatMemberAdministrator {
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 : Bool?
can_edit_messages : Bool?
can_pin_messages : Bool?
can_manage_topics : Bool?
custom_title : String?
}impl Eq for ChatMemberAdministratorimpl Show for ChatMemberAdministratorfn ChatMemberAdministrator::new(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? : Bool, can_edit_messages? : Bool, can_pin_messages? : Bool, can_manage_topics? : Bool, custom_title? : String) -> ChatMemberAdministratorimpl Eq for ChatMemberBannedimpl Show for ChatMemberBannedimpl Eq for ChatMemberLeftimpl Show for ChatMemberLeftimpl Eq for ChatMemberMemberimpl Show for ChatMemberMemberimpl Eq for ChatMemberOwnerimpl Show for ChatMemberOwnerfn ChatMemberOwner::new(user~ : User, is_anonymous~ : Bool, custom_title? : String) -> ChatMemberOwnerpub struct ChatMemberRestricted {
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_change_info : Bool
can_invite_users : Bool
can_pin_messages : Bool
can_manage_topics : Bool
until_date : Int
}impl Eq for ChatMemberRestrictedimpl Show for ChatMemberRestrictedfn ChatMemberRestricted::new(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_change_info~ : Bool, can_invite_users~ : Bool, can_pin_messages~ : Bool, can_manage_topics~ : Bool, until_date~ : Int) -> ChatMemberRestrictedpub struct ChatPermissions {
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_change_info : Bool?
can_invite_users : Bool?
can_pin_messages : Bool?
can_manage_topics : Bool?
}impl Eq for ChatPermissionsimpl Show for ChatPermissionsimpl ToJson for ChatPermissionsimpl FromJson for ChatPermissionsfn ChatPermissions::new(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_change_info? : Bool, can_invite_users? : Bool, can_pin_messages? : Bool, can_manage_topics? : Bool) -> ChatPermissionspub struct ChatPhoto {
small_file_id : String
small_file_unique_id : String
big_file_id : String
big_file_unique_id : String
}fn ChatShared::new(request_id~ : Int, chat_id~ : Int64, title? : String, username? : String, photo? : Array[PhotoSize]) -> ChatSharedpub(all) enum ChatType {
Private
Group
Supergroup
Channel
}pub struct ChecklistTask {
id : Int
text : String
is_done : Bool
}impl Eq for ChecklistTaskimpl Show for ChecklistTaskimpl ToJson for ChecklistTaskimpl FromJson for ChecklistTaskpub struct ChecklistTasksAdded {
}impl Eq for ChecklistTasksAddedimpl Show for ChecklistTasksAddedimpl ToJson for ChecklistTasksAddedimpl FromJson for ChecklistTasksAddedpub struct ChecklistTasksDone {
}impl Eq for ChecklistTasksDoneimpl Show for ChecklistTasksDoneimpl ToJson for ChecklistTasksDoneimpl FromJson for ChecklistTasksDoneimpl Eq for ChosenInlineResultimpl Show for ChosenInlineResultimpl ToJson for ChosenInlineResultimpl FromJson for ChosenInlineResultfn ChosenInlineResult::new(result_id~ : String, from~ : User, query~ : String, location? : Location, inline_message_id? : String) -> ChosenInlineResultpub struct Contact {
phone_number : String
first_name : String
last_name : String?
user_id : Int64?
vcard : String?
}pub struct Dice {
emoji : String
value : Int
}pub struct DirectMessagesTopic {
id : Int
name : String
icon_color : Int
}impl Eq for DirectMessagesTopicimpl Show for DirectMessagesTopicimpl ToJson for DirectMessagesTopicimpl FromJson for DirectMessagesTopicpub struct Document {
file_id : String
file_unique_id : String
thumbnail : PhotoSize?
file_name : String?
mime_type : String?
file_size : Int64?
}pub struct DocumentPlaceholder {
file_id : String
file_unique_id : String
}impl Eq for DocumentPlaceholderimpl Show for DocumentPlaceholderimpl ToJson for DocumentPlaceholderimpl FromJson for DocumentPlaceholderpub struct EncryptedCredentials {
data : String
hash : String
secret : String
}impl Eq for EncryptedCredentialsimpl Show for EncryptedCredentialsimpl ToJson for EncryptedCredentialsimpl FromJson for EncryptedCredentialsfn EncryptedCredentials::new(data~ : String, hash~ : String, secret~ : String) -> EncryptedCredentialspub struct EncryptedPassportElement {
type_ : String
data : String?
phone_number : String?
email : String?
files : Array[PassportFile]?
front_side : PassportFile?
reverse_side : PassportFile?
selfie : PassportFile?
translation : Array[PassportFile]?
hash : String
}impl Eq for EncryptedPassportElementimpl Show for EncryptedPassportElementimpl ToJson for EncryptedPassportElementimpl FromJson for EncryptedPassportElementfn EncryptedPassportElement::new(type_~ : String, hash~ : String, data? : String, phone_number? : String, email? : String, files? : Array[PassportFile], front_side? : PassportFile, reverse_side? : PassportFile, selfie? : PassportFile, translation? : Array[PassportFile]) -> EncryptedPassportElementpub struct ExternalReplyInfo {
origin : MessageOriginPlaceholder
chat : Chat?
message_id : Int?
link_preview_options : LinkPreviewPlaceholder?
animation : Animation?
audio : Audio?
document : Document?
paid_media : PaidMediaInfo?
photo : Array[PhotoSize]?
sticker : Sticker?
story : Story?
video : Video?
video_note : VideoNote?
voice : Voice?
has_media_spoiler : Bool?
contact : Contact?
dice : Dice?
game : GamePlaceholder?
giveaway : Giveaway?
giveaway_winners : GiveawayWinners?
invoice : Invoice?
location : Location?
poll : Poll?
venue : Venue?
}impl Eq for ExternalReplyInfoimpl Show for ExternalReplyInfoimpl ToJson for ExternalReplyInfoimpl FromJson for ExternalReplyInfofn ExternalReplyInfo::new(origin~ : MessageOriginPlaceholder, chat? : Chat, message_id? : Int, link_preview_options? : LinkPreviewPlaceholder, animation? : Animation, audio? : Audio, document? : Document, paid_media? : PaidMediaInfo, photo? : Array[PhotoSize], sticker? : Sticker, story? : Story, video? : Video, video_note? : VideoNote, voice? : Voice, has_media_spoiler? : Bool, contact? : Contact, dice? : Dice, game? : GamePlaceholder, giveaway? : Giveaway, giveaway_winners? : GiveawayWinners, invoice? : Invoice, location? : Location, poll? : Poll, venue? : Venue) -> ExternalReplyInfopub struct File {
file_id : String
file_unique_id : String
file_size : Int64?
file_path : String?
}pub struct FilePlaceholder {
file_id : String
file_unique_id : String
}impl Eq for FilePlaceholderimpl Show for FilePlaceholderimpl ToJson for FilePlaceholderimpl FromJson for FilePlaceholderpub struct ForceReply {
force_reply : Bool
input_field_placeholder : String?
selective : Bool?
}impl Eq for ForceReplyimpl Show for ForceReplyimpl ToJson for ForceReplyimpl FromJson for ForceReplyfn ForceReply::new(force_reply~ : Bool, input_field_placeholder? : String, selective? : Bool) -> ForceReplypub struct ForumTopic {
message_thread_id : Int
name : String
icon_color : Int
icon_custom_emoji_id : String?
}impl Eq for ForumTopicimpl Show for ForumTopicimpl ToJson for ForumTopicimpl FromJson for ForumTopicfn ForumTopic::new(message_thread_id~ : Int, name~ : String, icon_color~ : Int, icon_custom_emoji_id? : String) -> ForumTopicpub struct ForumTopicClosed {
}impl Eq for ForumTopicClosedimpl Show for ForumTopicClosedimpl ToJson for ForumTopicClosedimpl FromJson for ForumTopicClosedpub struct ForumTopicCreated {
name : String
icon_color : Int
icon_custom_emoji_id : String?
}impl Eq for ForumTopicCreatedimpl Show for ForumTopicCreatedimpl ToJson for ForumTopicCreatedimpl FromJson for ForumTopicCreatedfn ForumTopicCreated::new(name~ : String, icon_color~ : Int, icon_custom_emoji_id? : String) -> ForumTopicCreatedpub struct ForumTopicEdited {
name : String?
icon_custom_emoji_id : String?
}impl Eq for ForumTopicEditedimpl Show for ForumTopicEditedimpl ToJson for ForumTopicEditedimpl FromJson for ForumTopicEditedpub struct ForumTopicReopened {
}impl Eq for ForumTopicReopenedimpl Show for ForumTopicReopenedimpl ToJson for ForumTopicReopenedimpl FromJson for ForumTopicReopenedpub struct GamePlaceholder {
title : String
description : String
}impl Eq for GamePlaceholderimpl Show for GamePlaceholderimpl ToJson for GamePlaceholderimpl FromJson for GamePlaceholderpub struct GeneralForumTopicHidden {
}impl Eq for GeneralForumTopicHiddenimpl Show for GeneralForumTopicHiddenimpl ToJson for GeneralForumTopicHiddenimpl FromJson for GeneralForumTopicHiddenpub struct GeneralForumTopicUnhidden {
}pub struct Gift {
id : String
sticker : StickerPlaceholder
star_count : Int
total_count : Int?
remaining_count : Int?
publisher_chat : Chat?
colors : UniqueGiftColors?
background : GiftBackground?
unique_gift_variant_count : Int?
unique_gift_number : Int?
gifts_from_channels : Bool?
is_premium : Bool?
has_colors : Bool?
}fn Gift::new(id~ : String, sticker~ : StickerPlaceholder, star_count~ : Int, total_count? : Int, remaining_count? : Int, publisher_chat? : Chat, colors? : UniqueGiftColors, background? : GiftBackground, unique_gift_variant_count? : Int, unique_gift_number? : Int, gifts_from_channels? : Bool, is_premium? : Bool, has_colors? : Bool) -> Giftpub struct GiftBackground {
type_ : String
fill_color : Int?
gradient_top_color : Int?
gradient_bottom_color : Int?
}impl Eq for GiftBackgroundimpl Show for GiftBackgroundimpl ToJson for GiftBackgroundimpl FromJson for GiftBackgroundfn GiftBackground::new(type_~ : String, fill_color? : Int, gradient_top_color? : Int, gradient_bottom_color? : Int) -> GiftBackgroundpub struct GiveawayCompleted {
winner_count : Int
unclaimed_prize_count : Int?
giveaway_message : Message?
is_star_giveaway : Bool?
}impl Eq for GiveawayCompletedimpl Show for GiveawayCompletedimpl ToJson for GiveawayCompletedimpl FromJson for GiveawayCompletedfn GiveawayCompleted::new(winner_count~ : Int, unclaimed_prize_count? : Int, giveaway_message? : Message, is_star_giveaway? : Bool) -> GiveawayCompletedpub struct GiveawayCreated {
prize_star_count : Int?
}impl Eq for GiveawayCreatedimpl Show for GiveawayCreatedimpl ToJson for GiveawayCreatedimpl FromJson for GiveawayCreatedpub struct GiveawayWinners {
chat : Chat
giveaway_message_id : Int
winners_selection_date : Int
winner_count : Int
winners : Array[User]
additional_chat_count : Int?
prize_star_count : Int?
premium_subscription_month_count : Int?
unclaimed_prize_count : Int?
only_new_members : Bool?
was_refunded : Bool?
prize_description : String?
}impl Eq for GiveawayWinnersimpl Show for GiveawayWinnersimpl ToJson for GiveawayWinnersimpl FromJson for GiveawayWinnersfn GiveawayWinners::new(chat~ : Chat, giveaway_message_id~ : Int, winners_selection_date~ : Int, winner_count~ : Int, winners~ : Array[User], additional_chat_count? : Int, prize_star_count? : Int, premium_subscription_month_count? : Int, unclaimed_prize_count? : Int, only_new_members? : Bool, was_refunded? : Bool, prize_description? : String) -> GiveawayWinnerspub struct InlineKeyboardButton {
text : String
url : String?
callback_data : String?
}impl Eq for InlineKeyboardButtonimpl Show for InlineKeyboardButtonimpl ToJson for InlineKeyboardButtonimpl FromJson for InlineKeyboardButtonfn InlineKeyboardButton::new(text~ : String, url? : String, callback_data? : String) -> InlineKeyboardButtonimpl Eq for InlineKeyboardMarkupimpl Show for InlineKeyboardMarkupimpl ToJson for InlineKeyboardMarkupimpl FromJson for InlineKeyboardMarkupfn InlineKeyboardMarkup::new(inline_keyboard~ : Array[Array[InlineKeyboardButton]]) -> InlineKeyboardMarkupimpl Eq for InlineQueryimpl Show for InlineQueryimpl ToJson for InlineQueryimpl FromJson for InlineQueryfn InlineQuery::new(id~ : String, from~ : User, query~ : String, offset~ : String, chat_type? : String, location? : Location) -> InlineQuerypub struct InlineQueryResultArticle {
type_ : String
id : String
title : String
input_message_content : InputTextMessageContent
reply_markup : InlineKeyboardMarkup?
url : String?
hide_url : Bool?
description : String?
thumbnail_url : String?
thumbnail_width : Int?
thumbnail_height : Int?
}impl Eq for InlineQueryResultArticleimpl Show for InlineQueryResultArticleimpl ToJson for InlineQueryResultArticleimpl FromJson for InlineQueryResultArticlefn InlineQueryResultArticle::new(id~ : String, title~ : String, input_message_content~ : InputTextMessageContent, type_? : String, reply_markup? : InlineKeyboardMarkup, url? : String, hide_url? : Bool, description? : String, thumbnail_url? : String, thumbnail_width? : Int, thumbnail_height? : Int) -> InlineQueryResultArticlepub struct InlineQueryResultAudio {
type_ : String
id : String
audio_url : String
title : String
caption : String?
parse_mode : String?
caption_entities : Array[MessageEntity]?
performer : String?
audio_duration : Int?
reply_markup : InlineKeyboardMarkup?
input_message_content : InputMessageContentPlaceholder?
}impl Eq for InlineQueryResultAudioimpl Show for InlineQueryResultAudioimpl ToJson for InlineQueryResultAudioimpl FromJson for InlineQueryResultAudiofn InlineQueryResultAudio::new(id~ : String, audio_url~ : String, title~ : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], performer? : String, audio_duration? : Int, reply_markup? : InlineKeyboardMarkup, input_message_content? : InputMessageContentPlaceholder) -> InlineQueryResultAudiopub struct InlineQueryResultCachedAudio {
type_ : String
id : String
audio_file_id : String
caption : String?
parse_mode : String?
caption_entities : Array[MessageEntity]?
reply_markup : InlineKeyboardMarkup?
input_message_content : CachedInputMessageContent?
}impl Eq for InlineQueryResultCachedAudioimpl Show for InlineQueryResultCachedAudioimpl ToJson for InlineQueryResultCachedAudioimpl FromJson for InlineQueryResultCachedAudiofn InlineQueryResultCachedAudio::new(id~ : String, audio_file_id~ : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], reply_markup? : InlineKeyboardMarkup, input_message_content? : CachedInputMessageContent) -> InlineQueryResultCachedAudiopub struct InlineQueryResultCachedDocument {
type_ : String
id : String
title : String
document_file_id : String
description : String?
caption : String?
parse_mode : String?
caption_entities : Array[MessageEntity]?
reply_markup : InlineKeyboardMarkup?
input_message_content : CachedInputMessageContent?
}impl Eq for InlineQueryResultCachedDocumentimpl Show for InlineQueryResultCachedDocumentimpl ToJson for InlineQueryResultCachedDocumentimpl FromJson for InlineQueryResultCachedDocumentfn InlineQueryResultCachedDocument::new(id~ : String, title~ : String, document_file_id~ : String, description? : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], reply_markup? : InlineKeyboardMarkup, input_message_content? : CachedInputMessageContent) -> InlineQueryResultCachedDocumentpub struct InlineQueryResultCachedGif {
type_ : String
id : String
gif_file_id : String
title : String?
caption : String?
parse_mode : String?
caption_entities : Array[MessageEntity]?
show_caption_above_media : Bool?
reply_markup : InlineKeyboardMarkup?
input_message_content : CachedInputMessageContent?
}impl Eq for InlineQueryResultCachedGifimpl Show for InlineQueryResultCachedGifimpl ToJson for InlineQueryResultCachedGifimpl FromJson for InlineQueryResultCachedGiffn InlineQueryResultCachedGif::new(id~ : String, gif_file_id~ : String, title? : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], show_caption_above_media? : Bool, reply_markup? : InlineKeyboardMarkup, input_message_content? : CachedInputMessageContent) -> InlineQueryResultCachedGifpub struct InlineQueryResultCachedMpeg4Gif {
type_ : String
id : String
mpeg4_file_id : String
title : String?
caption : String?
parse_mode : String?
caption_entities : Array[MessageEntity]?
show_caption_above_media : Bool?
reply_markup : InlineKeyboardMarkup?
input_message_content : CachedInputMessageContent?
}impl Eq for InlineQueryResultCachedMpeg4Gifimpl Show for InlineQueryResultCachedMpeg4Gifimpl ToJson for InlineQueryResultCachedMpeg4Gifimpl FromJson for InlineQueryResultCachedMpeg4Giffn InlineQueryResultCachedMpeg4Gif::new(id~ : String, mpeg4_file_id~ : String, title? : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], show_caption_above_media? : Bool, reply_markup? : InlineKeyboardMarkup, input_message_content? : CachedInputMessageContent) -> InlineQueryResultCachedMpeg4Gifpub struct InlineQueryResultCachedPhoto {
type_ : String
id : String
photo_file_id : String
title : String?
description : String?
caption : String?
parse_mode : String?
caption_entities : Array[MessageEntity]?
show_caption_above_media : Bool?
reply_markup : InlineKeyboardMarkup?
input_message_content : CachedInputMessageContent?
}impl Eq for InlineQueryResultCachedPhotoimpl Show for InlineQueryResultCachedPhotoimpl ToJson for InlineQueryResultCachedPhotoimpl FromJson for InlineQueryResultCachedPhotofn InlineQueryResultCachedPhoto::new(id~ : String, photo_file_id~ : String, title? : String, description? : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], show_caption_above_media? : Bool, reply_markup? : InlineKeyboardMarkup, input_message_content? : CachedInputMessageContent) -> InlineQueryResultCachedPhotopub struct InlineQueryResultCachedSticker {
type_ : String
id : String
sticker_file_id : String
reply_markup : InlineKeyboardMarkup?
input_message_content : CachedInputMessageContent?
}impl Eq for InlineQueryResultCachedStickerimpl Show for InlineQueryResultCachedStickerimpl ToJson for InlineQueryResultCachedStickerimpl FromJson for InlineQueryResultCachedStickerfn InlineQueryResultCachedSticker::new(id~ : String, sticker_file_id~ : String, reply_markup? : InlineKeyboardMarkup, input_message_content? : CachedInputMessageContent) -> InlineQueryResultCachedStickerpub struct InlineQueryResultCachedVideo {
type_ : String
id : String
video_file_id : String
title : String
description : String?
caption : String?
parse_mode : String?
caption_entities : Array[MessageEntity]?
show_caption_above_media : Bool?
reply_markup : InlineKeyboardMarkup?
input_message_content : CachedInputMessageContent?
}impl Eq for InlineQueryResultCachedVideoimpl Show for InlineQueryResultCachedVideoimpl ToJson for InlineQueryResultCachedVideoimpl FromJson for InlineQueryResultCachedVideofn InlineQueryResultCachedVideo::new(id~ : String, video_file_id~ : String, title~ : String, description? : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], show_caption_above_media? : Bool, reply_markup? : InlineKeyboardMarkup, input_message_content? : CachedInputMessageContent) -> InlineQueryResultCachedVideopub struct InlineQueryResultCachedVoice {
type_ : String
id : String
voice_file_id : String
title : String
caption : String?
parse_mode : String?
caption_entities : Array[MessageEntity]?
reply_markup : InlineKeyboardMarkup?
input_message_content : CachedInputMessageContent?
}impl Eq for InlineQueryResultCachedVoiceimpl Show for InlineQueryResultCachedVoiceimpl ToJson for InlineQueryResultCachedVoiceimpl FromJson for InlineQueryResultCachedVoicefn InlineQueryResultCachedVoice::new(id~ : String, voice_file_id~ : String, title~ : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], reply_markup? : InlineKeyboardMarkup, input_message_content? : CachedInputMessageContent) -> InlineQueryResultCachedVoicepub struct InlineQueryResultContact {
type_ : String
id : String
phone_number : String
first_name : String
last_name : String?
vcard : String?
reply_markup : InlineKeyboardMarkup?
input_message_content : InputTextMessageContent?
thumbnail_url : String?
thumbnail_width : Int?
thumbnail_height : Int?
}impl Eq for InlineQueryResultContactimpl Show for InlineQueryResultContactimpl ToJson for InlineQueryResultContactimpl FromJson for InlineQueryResultContactfn InlineQueryResultContact::new(id~ : String, phone_number~ : String, first_name~ : String, type_? : String, last_name? : String, vcard? : String, reply_markup? : InlineKeyboardMarkup, input_message_content? : InputTextMessageContent, thumbnail_url? : String, thumbnail_width? : Int, thumbnail_height? : Int) -> InlineQueryResultContactpub struct InlineQueryResultDocument {
type_ : String
id : String
title : String
document_url : String
mime_type : String
caption : String?
parse_mode : String?
caption_entities : Array[MessageEntity]?
description : String?
reply_markup : InlineKeyboardMarkup?
input_message_content : InputMessageContentPlaceholder?
thumbnail_url : String?
thumbnail_width : Int?
thumbnail_height : Int?
}impl Eq for InlineQueryResultDocumentimpl Show for InlineQueryResultDocumentimpl ToJson for InlineQueryResultDocumentimpl FromJson for InlineQueryResultDocumentfn InlineQueryResultDocument::new(id~ : String, title~ : String, document_url~ : String, mime_type~ : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], description? : String, reply_markup? : InlineKeyboardMarkup, input_message_content? : InputMessageContentPlaceholder, thumbnail_url? : String, thumbnail_width? : Int, thumbnail_height? : Int) -> InlineQueryResultDocumentpub struct InlineQueryResultGif {
type_ : String
id : String
gif_url : String
gif_width : Int?
gif_height : Int?
gif_duration : Int?
thumbnail_url : String
thumbnail_mime_type : String?
title : String?
caption : String?
parse_mode : String?
caption_entities : Array[MessageEntity]?
show_caption_above_media : Bool?
reply_markup : InlineKeyboardMarkup?
input_message_content : InputTextMessageContent?
}impl Eq for InlineQueryResultGifimpl Show for InlineQueryResultGifimpl ToJson for InlineQueryResultGifimpl FromJson for InlineQueryResultGiffn InlineQueryResultGif::new(id~ : String, gif_url~ : String, thumbnail_url~ : String, gif_width? : Int, gif_height? : Int, gif_duration? : Int, thumbnail_mime_type? : String, title? : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], show_caption_above_media? : Bool, reply_markup? : InlineKeyboardMarkup, input_message_content? : InputTextMessageContent) -> InlineQueryResultGifpub struct InlineQueryResultLocation {
type_ : String
id : String
latitude : Double
longitude : Double
title : String
horizontal_accuracy : Double?
live_period : Int?
heading : Int?
proximity_alert_radius : Int?
reply_markup : InlineKeyboardMarkup?
input_message_content : InputTextMessageContent?
thumbnail_url : String?
thumbnail_width : Int?
thumbnail_height : Int?
}impl Eq for InlineQueryResultLocationimpl Show for InlineQueryResultLocationimpl ToJson for InlineQueryResultLocationimpl FromJson for InlineQueryResultLocationfn InlineQueryResultLocation::new(id~ : String, latitude~ : Double, longitude~ : Double, title~ : String, type_? : String, horizontal_accuracy? : Double, live_period? : Int, heading? : Int, proximity_alert_radius? : Int, reply_markup? : InlineKeyboardMarkup, input_message_content? : InputTextMessageContent, thumbnail_url? : String, thumbnail_width? : Int, thumbnail_height? : Int) -> InlineQueryResultLocationpub struct InlineQueryResultMpeg4Gif {
type_ : String
id : String
mpeg4_url : String
mpeg4_width : Int?
mpeg4_height : Int?
mpeg4_duration : Int?
thumbnail_url : String
thumbnail_mime_type : String?
title : String?
caption : String?
parse_mode : String?
caption_entities : Array[MessageEntity]?
show_caption_above_media : Bool?
reply_markup : InlineKeyboardMarkup?
input_message_content : InputTextMessageContent?
}impl Eq for InlineQueryResultMpeg4Gifimpl Show for InlineQueryResultMpeg4Gifimpl ToJson for InlineQueryResultMpeg4Gifimpl FromJson for InlineQueryResultMpeg4Giffn InlineQueryResultMpeg4Gif::new(id~ : String, mpeg4_url~ : String, thumbnail_url~ : String, mpeg4_width? : Int, mpeg4_height? : Int, mpeg4_duration? : Int, thumbnail_mime_type? : String, title? : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], show_caption_above_media? : Bool, reply_markup? : InlineKeyboardMarkup, input_message_content? : InputTextMessageContent) -> InlineQueryResultMpeg4Gifpub struct InlineQueryResultPhoto {
type_ : String
id : String
photo_url : String
thumbnail_url : String
photo_width : Int?
photo_height : Int?
title : String?
description : String?
caption : String?
parse_mode : String?
caption_entities : Array[MessageEntity]?
show_caption_above_media : Bool?
reply_markup : InlineKeyboardMarkup?
input_message_content : InputTextMessageContent?
}impl Eq for InlineQueryResultPhotoimpl Show for InlineQueryResultPhotoimpl ToJson for InlineQueryResultPhotoimpl FromJson for InlineQueryResultPhotofn InlineQueryResultPhoto::new(id~ : String, photo_url~ : String, thumbnail_url~ : String, photo_width? : Int, photo_height? : Int, title? : String, description? : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], show_caption_above_media? : Bool, reply_markup? : InlineKeyboardMarkup, input_message_content? : InputTextMessageContent) -> InlineQueryResultPhotopub struct InlineQueryResultVenue {
type_ : String
id : String
latitude : Double
longitude : Double
title : String
address : String
foursquare_id : String?
foursquare_type : String?
google_place_id : String?
google_place_type : String?
reply_markup : InlineKeyboardMarkup?
input_message_content : InputTextMessageContent?
thumbnail_url : String?
thumbnail_width : Int?
thumbnail_height : Int?
}impl Eq for InlineQueryResultVenueimpl Show for InlineQueryResultVenueimpl ToJson for InlineQueryResultVenueimpl FromJson for InlineQueryResultVenuefn InlineQueryResultVenue::new(id~ : String, latitude~ : Double, longitude~ : Double, title~ : String, address~ : String, type_? : String, foursquare_id? : String, foursquare_type? : String, google_place_id? : String, google_place_type? : String, reply_markup? : InlineKeyboardMarkup, input_message_content? : InputTextMessageContent, thumbnail_url? : String, thumbnail_width? : Int, thumbnail_height? : Int) -> InlineQueryResultVenuepub struct InlineQueryResultVideo {
type_ : String
id : String
video_url : String
mime_type : String
thumbnail_url : String
title : String
caption : String?
parse_mode : String?
caption_entities : Array[MessageEntity]?
show_caption_above_media : Bool?
video_width : Int?
video_height : Int?
video_duration : Int?
description : String?
reply_markup : InlineKeyboardMarkup?
input_message_content : InputTextMessageContent?
}impl Eq for InlineQueryResultVideoimpl Show for InlineQueryResultVideoimpl ToJson for InlineQueryResultVideoimpl FromJson for InlineQueryResultVideofn InlineQueryResultVideo::new(id~ : String, video_url~ : String, mime_type~ : String, thumbnail_url~ : String, title~ : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], show_caption_above_media? : Bool, video_width? : Int, video_height? : Int, video_duration? : Int, description? : String, reply_markup? : InlineKeyboardMarkup, input_message_content? : InputTextMessageContent) -> InlineQueryResultVideopub struct InlineQueryResultVoice {
type_ : String
id : String
voice_url : String
title : String
caption : String?
parse_mode : String?
caption_entities : Array[MessageEntity]?
voice_duration : Int?
reply_markup : InlineKeyboardMarkup?
input_message_content : InputMessageContentPlaceholder?
}impl Eq for InlineQueryResultVoiceimpl Show for InlineQueryResultVoiceimpl ToJson for InlineQueryResultVoiceimpl FromJson for InlineQueryResultVoicefn InlineQueryResultVoice::new(id~ : String, voice_url~ : String, title~ : String, caption? : String, parse_mode? : String, caption_entities? : Array[MessageEntity], voice_duration? : Int, reply_markup? : InlineKeyboardMarkup, input_message_content? : InputMessageContentPlaceholder) -> InlineQueryResultVoicepub struct InlineQueryResultsButton {
text : String
web_app : WebAppInfo?
start_parameter : String?
}impl Eq for InlineQueryResultsButtonimpl Show for InlineQueryResultsButtonimpl ToJson for InlineQueryResultsButtonimpl FromJson for InlineQueryResultsButtonfn InlineQueryResultsButton::new(text~ : String, web_app? : WebAppInfo, start_parameter? : String) -> InlineQueryResultsButtonimpl Eq for InputChecklistimpl Show for InputChecklistimpl ToJson for InputChecklistimpl FromJson for InputChecklistpub struct InputChecklistTask {
text : String
}impl Eq for InputChecklistTaskimpl Show for InputChecklistTaskimpl ToJson for InputChecklistTaskimpl FromJson for InputChecklistTaskpub struct InputContactMessageContent {
phone_number : String
first_name : String
last_name : String?
vcard : String?
}impl Eq for InputContactMessageContentimpl Show for InputContactMessageContentimpl ToJson for InputContactMessageContentimpl FromJson for InputContactMessageContentfn InputContactMessageContent::new(phone_number~ : String, first_name~ : String, last_name? : String, vcard? : String) -> InputContactMessageContentpub struct InputInvoiceMessageContent {
title : String
description : String
payload : String
provider_token : String?
currency : String
prices : Array[LabeledPrice]
max_tip_amount : Int?
suggested_tip_amounts : Array[Int]?
provider_data : String?
photo_url : String?
photo_size : Int?
photo_width : Int?
photo_height : Int?
need_name : Bool?
need_phone_number : Bool?
need_email : Bool?
need_shipping_address : Bool?
send_phone_number_to_provider : Bool?
send_email_to_provider : Bool?
is_flexible : Bool?
}impl Eq for InputInvoiceMessageContentimpl Show for InputInvoiceMessageContentimpl ToJson for InputInvoiceMessageContentimpl FromJson for InputInvoiceMessageContentfn InputInvoiceMessageContent::new(title~ : String, description~ : String, payload~ : String, provider_token? : String, currency~ : String, prices~ : Array[LabeledPrice], max_tip_amount? : Int, suggested_tip_amounts? : Array[Int], provider_data? : String, photo_url? : String, photo_size? : Int, photo_width? : Int, photo_height? : Int, need_name? : Bool, need_phone_number? : Bool, need_email? : Bool, need_shipping_address? : Bool, send_phone_number_to_provider? : Bool, send_email_to_provider? : Bool, is_flexible? : Bool) -> InputInvoiceMessageContentpub struct InputLocationMessageContent {
latitude : Double
longitude : Double
horizontal_accuracy : Double?
live_period : Int?
heading : Int?
proximity_alert_radius : Int?
}impl Eq for InputLocationMessageContentimpl Show for InputLocationMessageContentimpl ToJson for InputLocationMessageContentimpl FromJson for InputLocationMessageContentfn InputLocationMessageContent::new(latitude~ : Double, longitude~ : Double, horizontal_accuracy? : Double, live_period? : Int, heading? : Int, proximity_alert_radius? : Int) -> InputLocationMessageContentpub(all) enum InputMessageContent {
Text(InputTextMessageContent)
Location(InputLocationMessageContent)
Venue(InputVenueMessageContent)
Contact(InputContactMessageContent)
Invoice(InputInvoiceMessageContent)
}impl Eq for InputMessageContentimpl Show for InputMessageContentimpl ToJson for InputMessageContentimpl FromJson for InputMessageContentpub struct InputMessageContentPlaceholder {
message_text : String
}impl Eq for InputMessageContentPlaceholderimpl Show for InputMessageContentPlaceholderimpl ToJson for InputMessageContentPlaceholderimpl FromJson for InputMessageContentPlaceholderpub struct InputPollOption {
text : String
text_parse_mode : String?
text_entities : Array[MessageEntity]?
}impl Eq for InputPollOptionimpl Show for InputPollOptionimpl ToJson for InputPollOptionimpl FromJson for InputPollOptionfn InputPollOption::new(text~ : String, text_parse_mode? : String, text_entities? : Array[MessageEntity]) -> InputPollOptionpub struct InputSticker {
sticker : String
format : String
emoji_list : Array[String]
mask_position : MaskPosition?
keywords : Array[String]?
}impl Eq for InputStickerimpl Show for InputStickerimpl ToJson for InputStickerimpl FromJson for InputStickerfn InputSticker::new(sticker~ : String, format~ : String, emoji_list~ : Array[String], mask_position? : MaskPosition, keywords? : Array[String]) -> InputStickerpub struct InputTextMessageContent {
message_text : String
parse_mode : String?
entities : Array[MessageEntity]?
link_preview_options : LinkPreviewOptions?
}impl Eq for InputTextMessageContentimpl Show for InputTextMessageContentimpl ToJson for InputTextMessageContentimpl FromJson for InputTextMessageContentfn InputTextMessageContent::new(message_text~ : String, parse_mode? : String, entities? : Array[MessageEntity], link_preview_options? : LinkPreviewOptions) -> InputTextMessageContentpub struct InputVenueMessageContent {
latitude : Double
longitude : Double
title : String
address : String
foursquare_id : String?
foursquare_type : String?
google_place_id : String?
google_place_type : String?
}impl Eq for InputVenueMessageContentimpl Show for InputVenueMessageContentimpl ToJson for InputVenueMessageContentimpl FromJson for InputVenueMessageContentfn InputVenueMessageContent::new(latitude~ : Double, longitude~ : Double, title~ : String, address~ : String, foursquare_id? : String, foursquare_type? : String, google_place_id? : String, google_place_type? : String) -> InputVenueMessageContentpub struct Invoice {
title : String
description : String
start_parameter : String
currency : String
total_amount : Int
}pub struct KeyboardButton {
text : String
request_users : KeyboardButtonRequestUsers?
request_chat : KeyboardButtonRequestChat?
request_contact : Bool?
request_location : Bool?
request_poll : KeyboardButtonPollType?
web_app : WebAppInfo?
}impl Eq for KeyboardButtonimpl Show for KeyboardButtonimpl ToJson for KeyboardButtonimpl FromJson for KeyboardButtonfn KeyboardButton::new(text~ : String, request_users? : KeyboardButtonRequestUsers, request_chat? : KeyboardButtonRequestChat, request_contact? : Bool, request_location? : Bool, request_poll? : KeyboardButtonPollType, web_app? : WebAppInfo) -> KeyboardButtonpub struct KeyboardButtonPollType {
type_ : String?
}impl Eq for KeyboardButtonPollTypeimpl Show for KeyboardButtonPollTypeimpl ToJson for KeyboardButtonPollTypeimpl FromJson for KeyboardButtonPollTypepub struct KeyboardButtonRequestChat {
request_id : Int
chat_is_channel : Bool
chat_is_forum : Bool?
chat_has_username : Bool?
chat_is_created : Bool?
bot_is_member : Bool?
request_title : Bool?
request_username : Bool?
request_photo : Bool?
}impl Eq for KeyboardButtonRequestChatimpl Show for KeyboardButtonRequestChatimpl ToJson for KeyboardButtonRequestChatimpl FromJson for KeyboardButtonRequestChatfn KeyboardButtonRequestChat::new(request_id~ : Int, chat_is_channel~ : Bool, chat_is_forum? : Bool, chat_has_username? : Bool, chat_is_created? : Bool, bot_is_member? : Bool, request_title? : Bool, request_username? : Bool, request_photo? : Bool) -> KeyboardButtonRequestChatpub struct KeyboardButtonRequestUsers {
request_id : Int
user_is_bot : Bool?
user_is_premium : Bool?
max_quantity : Int?
request_name : Bool?
request_username : Bool?
request_photo : Bool?
}impl Eq for KeyboardButtonRequestUsersimpl Show for KeyboardButtonRequestUsersimpl ToJson for KeyboardButtonRequestUsersimpl FromJson for KeyboardButtonRequestUsersfn KeyboardButtonRequestUsers::new(request_id~ : Int, user_is_bot? : Bool, user_is_premium? : Bool, max_quantity? : Int, request_name? : Bool, request_username? : Bool, request_photo? : Bool) -> KeyboardButtonRequestUserspub struct LabeledPrice {
label : String
amount : Int
}impl Eq for LabeledPriceimpl Show for LabeledPriceimpl ToJson for LabeledPriceimpl FromJson for LabeledPricepub struct LinkPreviewOptions {
is_disabled : Bool?
url : String?
prefer_small_media : Bool?
prefer_large_media : Bool?
show_above_text : Bool?
}impl Eq for LinkPreviewOptionsimpl Show for LinkPreviewOptionsimpl ToJson for LinkPreviewOptionsimpl FromJson for LinkPreviewOptionsfn LinkPreviewOptions::new(is_disabled? : Bool, url? : String, prefer_small_media? : Bool, prefer_large_media? : Bool, show_above_text? : Bool) -> LinkPreviewOptionspub struct LinkPreviewPlaceholder {
is_disabled : Bool?
}impl Eq for LinkPreviewPlaceholderimpl Show for LinkPreviewPlaceholderimpl ToJson for LinkPreviewPlaceholderimpl FromJson for LinkPreviewPlaceholderpub struct Location {
latitude : Double
longitude : Double
horizontal_accuracy : Double?
live_period : Int?
heading : Int?
proximity_alert_radius : Int?
}pub struct LoginUrl {
url : String
forward_text : String?
bot_username : String?
request_write_access : Bool?
}pub struct MaskPosition {
point : String
x_shift : Double
y_shift : Double
scale : Double
}impl Eq for MaskPositionimpl Show for MaskPositionimpl ToJson for MaskPositionimpl FromJson for MaskPositionfn MaskPosition::new(point~ : String, x_shift~ : Double, y_shift~ : Double, scale~ : Double) -> MaskPositionpub struct Message {
message_id : Int
from : User?
date : Int
chat : Chat
text : String?
entities : Array[MessageEntity]?
reply_to_message : Message?
message_thread_id : Int?
is_topic_message : Bool?
direct_messages_topic : DirectMessagesTopic?
gift_upgrade_sent : GiftInfo?
gift_id : String?
is_from_blockchain : Bool?
}fn Message::new(message_id~ : Int, from? : User, date~ : Int, chat~ : Chat, text? : String, entities? : Array[MessageEntity], reply_to_message? : Message, message_thread_id? : Int, is_topic_message? : Bool, direct_messages_topic? : DirectMessagesTopic, gift_upgrade_sent? : GiftInfo, gift_id? : String, is_from_blockchain? : Bool) -> Messagepub struct MessageAutoDeleteTimerChanged {
message_auto_delete_time : Int
}impl Eq for MessageAutoDeleteTimerChangedimpl Show for MessageAutoDeleteTimerChangedimpl ToJson for MessageAutoDeleteTimerChangedimpl FromJson for MessageAutoDeleteTimerChangedfn MessageAutoDeleteTimerChanged::new(message_auto_delete_time~ : Int) -> MessageAutoDeleteTimerChangedpub struct MessageEntity {
type_ : String
offset : Int
length : Int
url : String?
user : User?
language : String?
}impl Eq for MessageEntityimpl Show for MessageEntityimpl ToJson for MessageEntityimpl FromJson for MessageEntityfn MessageEntity::new(type_~ : String, offset~ : Int, length~ : Int, url? : String, user? : User, language? : String) -> MessageEntitypub struct MessageId {
message_id : Int
}pub(all) enum MessageOrigin {
User(MessageOriginUser)
HiddenUser(MessageOriginHiddenUser)
Chat(MessageOriginChat)
Channel(MessageOriginChannel)
}impl Eq for MessageOriginimpl Show for MessageOriginimpl ToJson for MessageOriginimpl FromJson for MessageOriginpub struct MessageOriginChannel {
date : Int
chat : Chat
message_id : Int
author_signature : String?
}impl Eq for MessageOriginChannelimpl Show for MessageOriginChannelfn MessageOriginChannel::new(date~ : Int, chat~ : Chat, message_id~ : Int, author_signature? : String) -> MessageOriginChannelimpl Eq for MessageOriginChatimpl Show for MessageOriginChatfn MessageOriginChat::new(date~ : Int, sender_chat~ : Chat, author_signature? : String) -> MessageOriginChatpub struct MessageOriginHiddenUser {
date : Int
sender_user_name : String
}impl Eq for MessageOriginHiddenUserimpl Show for MessageOriginHiddenUserpub struct MessageOriginPlaceholder {
type_ : String
date : Int
}impl Eq for MessageOriginPlaceholderimpl Show for MessageOriginPlaceholderimpl ToJson for MessageOriginPlaceholderimpl FromJson for MessageOriginPlaceholderimpl Eq for MessageOriginUserimpl Show for MessageOriginUserpub struct OrderInfo {
name : String?
phone_number : String?
email : String?
shipping_address : ShippingAddress?
}fn OrderInfo::new(name? : String, phone_number? : String, email? : String, shipping_address? : ShippingAddress) -> OrderInfoimpl Eq for PaidMediaInfoimpl Show for PaidMediaInfoimpl ToJson for PaidMediaInfoimpl FromJson for PaidMediaInfoimpl Eq for PaidMediaPhotoimpl Show for PaidMediaPhotopub struct PaidMediaPreview {
width : Int?
height : Int?
duration : Int?
}impl Eq for PaidMediaPreviewimpl Show for PaidMediaPreviewimpl Eq for PaidMediaVideoimpl Show for PaidMediaVideopub struct PassportData {
data : Array[EncryptedPassportElement]
credentials : EncryptedCredentials
}impl Eq for PassportDataimpl Show for PassportDataimpl ToJson for PassportDataimpl FromJson for PassportDatafn PassportData::new(data~ : Array[EncryptedPassportElement], credentials~ : EncryptedCredentials) -> PassportDatapub(all) enum PassportElementError {
DataField(PassportElementErrorDataField)
FrontSide(PassportElementErrorFrontSide)
ReverseSide(PassportElementErrorReverseSide)
Selfie(PassportElementErrorSelfie)
File(PassportElementErrorFile)
Files(PassportElementErrorFiles)
TranslationFile(PassportElementErrorTranslationFile)
TranslationFiles(PassportElementErrorTranslationFiles)
Unspecified(PassportElementErrorUnspecified)
}impl Eq for PassportElementErrorimpl Show for PassportElementErrorimpl ToJson for PassportElementErrorimpl FromJson for PassportElementErrorpub struct PassportElementErrorDataField {
type_ : String
field_name : String
data_hash : String
message : String
}impl Eq for PassportElementErrorDataFieldimpl Show for PassportElementErrorDataFieldfn PassportElementErrorDataField::new(type_~ : String, field_name~ : String, data_hash~ : String, message~ : String) -> PassportElementErrorDataFieldpub struct PassportElementErrorFile {
type_ : String
file_hash : String
message : String
}impl Eq for PassportElementErrorFileimpl Show for PassportElementErrorFilefn PassportElementErrorFile::new(type_~ : String, file_hash~ : String, message~ : String) -> PassportElementErrorFileimpl Eq for PassportElementErrorFilesimpl Show for PassportElementErrorFilesfn PassportElementErrorFiles::new(type_~ : String, file_hashes~ : Array[String], message~ : String) -> PassportElementErrorFilespub struct PassportElementErrorFrontSide {
type_ : String
file_hash : String
message : String
}impl Eq for PassportElementErrorFrontSideimpl Show for PassportElementErrorFrontSidefn PassportElementErrorFrontSide::new(type_~ : String, file_hash~ : String, message~ : String) -> PassportElementErrorFrontSidepub struct PassportElementErrorReverseSide {
type_ : String
file_hash : String
message : String
}impl Eq for PassportElementErrorReverseSideimpl Show for PassportElementErrorReverseSidefn PassportElementErrorReverseSide::new(type_~ : String, file_hash~ : String, message~ : String) -> PassportElementErrorReverseSidepub struct PassportElementErrorSelfie {
type_ : String
file_hash : String
message : String
}impl Eq for PassportElementErrorSelfieimpl Show for PassportElementErrorSelfiefn PassportElementErrorSelfie::new(type_~ : String, file_hash~ : String, message~ : String) -> PassportElementErrorSelfiepub struct PassportElementErrorTranslationFile {
type_ : String
file_hash : String
message : String
}impl Eq for PassportElementErrorTranslationFileimpl Show for PassportElementErrorTranslationFilefn PassportElementErrorTranslationFile::new(type_~ : String, file_hash~ : String, message~ : String) -> PassportElementErrorTranslationFilepub struct PassportElementErrorTranslationFiles {
type_ : String
file_hashes : Array[String]
message : String
}impl Eq for PassportElementErrorTranslationFilesimpl Show for PassportElementErrorTranslationFilesfn PassportElementErrorTranslationFiles::new(type_~ : String, file_hashes~ : Array[String], message~ : String) -> PassportElementErrorTranslationFilespub struct PassportElementErrorUnspecified {
type_ : String
element_hash : String
message : String
}impl Eq for PassportElementErrorUnspecifiedimpl Show for PassportElementErrorUnspecifiedfn PassportElementErrorUnspecified::new(type_~ : String, element_hash~ : String, message~ : String) -> PassportElementErrorUnspecifiedpub struct PassportFile {
file_id : String
file_unique_id : String
file_size : Int64
file_date : Int
}impl Eq for PassportFileimpl Show for PassportFileimpl ToJson for PassportFileimpl FromJson for PassportFilefn PassportFile::new(file_id~ : String, file_unique_id~ : String, file_size~ : Int64, file_date~ : Int) -> PassportFilepub struct PhotoSize {
file_id : String
file_unique_id : String
width : Int
height : Int
file_size : Int64?
}pub struct Poll {
id : String
question : String
question_entities : Array[MessageEntity]?
options : Array[PollOption]
total_voter_count : Int
is_closed : Bool
is_anonymous : Bool
type_ : String
allows_multiple_answers : Bool
correct_option_id : Int?
explanation : String?
explanation_entities : Array[MessageEntity]?
open_period : Int?
close_date : Int?
}fn Poll::new(id~ : String, question~ : String, question_entities? : Array[MessageEntity], options~ : Array[PollOption], total_voter_count~ : Int, is_closed~ : Bool, is_anonymous~ : Bool, type_~ : String, allows_multiple_answers~ : Bool, correct_option_id? : Int, explanation? : String, explanation_entities? : Array[MessageEntity], open_period? : Int, close_date? : Int) -> Pollimpl Eq for PollAnswerimpl Show for PollAnswerimpl ToJson for PollAnswerimpl FromJson for PollAnswerfn PollAnswer::new(poll_id~ : String, voter_chat? : Chat, user? : User, option_ids~ : Array[Int]) -> PollAnswerimpl Eq for PollOptionimpl Show for PollOptionimpl ToJson for PollOptionimpl FromJson for PollOptionfn PollOption::new(text~ : String, text_entities? : Array[MessageEntity], voter_count~ : Int) -> PollOptionimpl Eq for ProximityAlertTriggeredimpl Show for ProximityAlertTriggeredimpl ToJson for ProximityAlertTriggeredimpl FromJson for ProximityAlertTriggeredfn ProximityAlertTriggered::new(traveler~ : User, watcher~ : User, distance~ : Int) -> ProximityAlertTriggeredimpl Eq for ReactionTypeimpl Show for ReactionTypeimpl ToJson for ReactionTypeimpl FromJson for ReactionTypepub struct ReactionTypeCustomEmoji {
custom_emoji_id : String
}impl Eq for ReactionTypeCustomEmojiimpl Show for ReactionTypeCustomEmojiimpl ToJson for ReactionTypeCustomEmojiimpl FromJson for ReactionTypeCustomEmojipub struct ReactionTypeEmoji {
emoji : String
}impl Eq for ReactionTypeEmojiimpl Show for ReactionTypeEmojiimpl ToJson for ReactionTypeEmojiimpl FromJson for ReactionTypeEmojipub struct RefundedPayment {
currency : String
total_amount : Int
invoice_payload : String
telegram_payment_charge_id : String
provider_payment_charge_id : String?
}impl Eq for RefundedPaymentimpl Show for RefundedPaymentimpl ToJson for RefundedPaymentimpl FromJson for RefundedPaymentfn RefundedPayment::new(currency~ : String, total_amount~ : Int, invoice_payload~ : String, telegram_payment_charge_id~ : String, provider_payment_charge_id? : String) -> RefundedPaymentpub struct ReplyKeyboardMarkup {
keyboard : Array[Array[KeyboardButton]]
is_persistent : Bool?
resize_keyboard : Bool?
one_time_keyboard : Bool?
input_field_placeholder : String?
selective : Bool?
}impl Eq for ReplyKeyboardMarkupimpl Show for ReplyKeyboardMarkupimpl ToJson for ReplyKeyboardMarkupimpl FromJson for ReplyKeyboardMarkupfn ReplyKeyboardMarkup::new(keyboard~ : Array[Array[KeyboardButton]], is_persistent? : Bool, resize_keyboard? : Bool, one_time_keyboard? : Bool, input_field_placeholder? : String, selective? : Bool) -> ReplyKeyboardMarkuppub struct ReplyKeyboardRemove {
remove_keyboard : Bool
selective : Bool?
}impl Eq for ReplyKeyboardRemoveimpl Show for ReplyKeyboardRemoveimpl ToJson for ReplyKeyboardRemoveimpl FromJson for ReplyKeyboardRemovepub struct ReplyParameters {
message_id : Int
chat_id : ChatId?
allow_sending_without_reply : Bool?
quote : String?
quote_parse_mode : String?
quote_entities : Array[MessageEntity]?
quote_position : Int?
}impl Eq for ReplyParametersimpl Show for ReplyParametersimpl ToJson for ReplyParametersimpl FromJson for ReplyParametersfn ReplyParameters::new(message_id~ : Int, chat_id? : ChatId, allow_sending_without_reply? : Bool, quote? : String, quote_parse_mode? : String, quote_entities? : Array[MessageEntity], quote_position? : Int) -> ReplyParameterspub struct SentWebAppMessage {
inline_message_id : String?
}impl Eq for SentWebAppMessageimpl Show for SentWebAppMessageimpl ToJson for SentWebAppMessageimpl FromJson for SentWebAppMessagefn SharedUser::new(user_id~ : Int64, first_name? : String, last_name? : String, username? : String, photo? : Array[PhotoSize]) -> SharedUserpub struct ShippingAddress {
country_code : String
state : String
city : String
street_line1 : String
street_line2 : String
post_code : String
}impl Eq for ShippingAddressimpl Show for ShippingAddressimpl ToJson for ShippingAddressimpl FromJson for ShippingAddressfn ShippingAddress::new(country_code~ : String, state~ : String, city~ : String, street_line1~ : String, street_line2~ : String, post_code~ : String) -> ShippingAddressimpl Eq for ShippingOptionimpl Show for ShippingOptionimpl ToJson for ShippingOptionimpl FromJson for ShippingOptionfn ShippingOption::new(id~ : String, title~ : String, prices~ : Array[LabeledPrice]) -> ShippingOptionpub struct StarBalance {
balance : Int
}impl Eq for StarBalanceimpl Show for StarBalanceimpl ToJson for StarBalanceimpl FromJson for StarBalancepub struct Sticker {
file_id : String
file_unique_id : String
type_ : String
width : Int
height : Int
is_animated : Bool
is_video : Bool
thumbnail : PhotoSize?
emoji : String?
set_name : String?
premium_animation : FilePlaceholder?
mask_position : MaskPosition?
custom_emoji_id : String?
needs_repainting : Bool?
file_size : Int64?
}fn Sticker::new(file_id~ : String, file_unique_id~ : String, type_~ : String, width~ : Int, height~ : Int, is_animated~ : Bool, is_video~ : Bool, thumbnail? : PhotoSize, emoji? : String, set_name? : String, premium_animation? : FilePlaceholder, mask_position? : MaskPosition, custom_emoji_id? : String, needs_repainting? : Bool, file_size? : Int64) -> Stickerpub struct StickerPlaceholder {
file_id : String
file_unique_id : String
width : Int
height : Int
}impl Eq for StickerPlaceholderimpl Show for StickerPlaceholderimpl ToJson for StickerPlaceholderimpl FromJson for StickerPlaceholderfn StickerPlaceholder::new(file_id~ : String, file_unique_id~ : String, width~ : Int, height~ : Int) -> StickerPlaceholderimpl Eq for StickerSetimpl Show for StickerSetimpl ToJson for StickerSetimpl FromJson for StickerSetfn StickerSet::new(name~ : String, title~ : String, sticker_type~ : String, stickers~ : Array[Sticker], thumbnail? : PhotoSize) -> StickerSetpub struct SuccessfulPayment {
currency : String
total_amount : Int
invoice_payload : String
shipping_option_id : String?
order_info : OrderInfo?
telegram_payment_charge_id : String
provider_payment_charge_id : String
}impl Eq for SuccessfulPaymentimpl Show for SuccessfulPaymentimpl ToJson for SuccessfulPaymentimpl FromJson for SuccessfulPaymentfn SuccessfulPayment::new(currency~ : String, total_amount~ : Int, invoice_payload~ : String, shipping_option_id? : String, order_info? : OrderInfo, telegram_payment_charge_id~ : String, provider_payment_charge_id~ : String) -> SuccessfulPaymentimpl Eq for SuggestedPostApprovalFailedimpl Show for SuggestedPostApprovalFailedimpl ToJson for SuggestedPostApprovalFailedimpl FromJson for SuggestedPostApprovalFailedfn SuggestedPostApprovalFailed::new(user~ : User, suggested_post_info~ : SuggestedPostInfo) -> SuggestedPostApprovalFailedimpl Eq for SuggestedPostApprovedimpl Show for SuggestedPostApprovedimpl ToJson for SuggestedPostApprovedimpl FromJson for SuggestedPostApprovedfn SuggestedPostApproved::new(user~ : User, suggested_post_info~ : SuggestedPostInfo) -> SuggestedPostApprovedimpl Eq for SuggestedPostDeclinedimpl Show for SuggestedPostDeclinedimpl ToJson for SuggestedPostDeclinedimpl FromJson for SuggestedPostDeclinedfn SuggestedPostDeclined::new(user~ : User, suggested_post_info~ : SuggestedPostInfo) -> SuggestedPostDeclinedpub struct SuggestedPostInfo {
suggested_post_parameters : SuggestedPostParameters?
is_approved : Bool
is_declined : Bool
is_paid : Bool
}impl Eq for SuggestedPostInfoimpl Show for SuggestedPostInfoimpl ToJson for SuggestedPostInfoimpl FromJson for SuggestedPostInfofn SuggestedPostInfo::new(suggested_post_parameters? : SuggestedPostParameters, is_approved~ : Bool, is_declined~ : Bool, is_paid~ : Bool) -> SuggestedPostInfoimpl Eq for SuggestedPostPaidimpl Show for SuggestedPostPaidimpl ToJson for SuggestedPostPaidimpl FromJson for SuggestedPostPaidfn SuggestedPostPaid::new(user~ : User, suggested_post_info~ : SuggestedPostInfo) -> SuggestedPostPaidpub struct SuggestedPostParameters {
text : String?
link_preview_options : LinkPreviewOptions?
is_disabled : Bool?
}impl Eq for SuggestedPostParametersimpl Show for SuggestedPostParametersimpl ToJson for SuggestedPostParametersimpl FromJson for SuggestedPostParametersfn SuggestedPostParameters::new(text? : String, link_preview_options? : LinkPreviewOptions, is_disabled? : Bool) -> SuggestedPostParameterspub struct SuggestedPostPrice {
star_count : Int
}impl Eq for SuggestedPostPriceimpl Show for SuggestedPostPriceimpl ToJson for SuggestedPostPriceimpl FromJson for SuggestedPostPricepub struct SwitchInlineQueryChosenChat {
query : String?
allow_user_chats : Bool?
allow_bot_chats : Bool?
allow_group_chats : Bool?
allow_channel_chats : Bool?
}impl Eq for SwitchInlineQueryChosenChatimpl Show for SwitchInlineQueryChosenChatimpl ToJson for SwitchInlineQueryChosenChatimpl FromJson for SwitchInlineQueryChosenChatfn SwitchInlineQueryChosenChat::new(query? : String, allow_user_chats? : Bool, allow_bot_chats? : Bool, allow_group_chats? : Bool, allow_channel_chats? : Bool) -> SwitchInlineQueryChosenChatpub struct TextQuote {
text : String
entities : Array[MessageEntity]?
position : Int
is_manual : Bool?
}fn TextQuote::new(text~ : String, entities? : Array[MessageEntity], position~ : Int, is_manual? : Bool) -> TextQuotepub struct UniqueGiftColors {
background_icon_color : Int
text_color : Int
hint_color : Int
link_color : Int
button_color : Int
button_text_color : Int
}impl Eq for UniqueGiftColorsimpl Show for UniqueGiftColorsimpl ToJson for UniqueGiftColorsimpl FromJson for UniqueGiftColorsfn UniqueGiftColors::new(background_icon_color~ : Int, text_color~ : Int, hint_color~ : Int, link_color~ : Int, button_color~ : Int, button_text_color~ : Int) -> UniqueGiftColorspub struct UniqueGiftInfo {
next_transfer_date : Int?
last_resale_amount : Int?
origin : String?
gift_id : String
is_from_blockchain : Bool?
}impl Eq for UniqueGiftInfoimpl Show for UniqueGiftInfoimpl ToJson for UniqueGiftInfoimpl FromJson for UniqueGiftInfofn UniqueGiftInfo::new(gift_id~ : String, next_transfer_date? : Int, last_resale_amount? : Int, origin? : String, is_from_blockchain? : Bool) -> UniqueGiftInfopub struct Update {
update_id : Int
message : Message?
edited_message : Message?
callback_query : CallbackQuery?
}pub struct User {
id : Int64
is_bot : Bool
first_name : String
last_name : String?
username : String?
language_code : String?
}pub struct Venue {
location : Location
title : String
address : String
foursquare_id : String?
foursquare_type : String?
google_place_id : String?
google_place_type : String?
}pub struct VideoChatEnded {
duration : Int
}impl Eq for VideoChatEndedimpl Show for VideoChatEndedimpl ToJson for VideoChatEndedimpl FromJson for VideoChatEndedimpl Eq for VideoChatParticipantsInvitedimpl Show for VideoChatParticipantsInvitedimpl ToJson for VideoChatParticipantsInvitedimpl FromJson for VideoChatParticipantsInvitedpub struct VideoChatScheduled {
start_date : Int
}impl Eq for VideoChatScheduledimpl Show for VideoChatScheduledimpl ToJson for VideoChatScheduledimpl FromJson for VideoChatScheduledpub struct VideoChatStarted {
}impl Eq for VideoChatStartedimpl Show for VideoChatStartedimpl ToJson for VideoChatStartedimpl FromJson for VideoChatStartedpub struct VideoNote {
file_id : String
file_unique_id : String
length : Int
duration : Int
thumbnail : PhotoSize?
file_size : Int64?
}pub struct Voice {
file_id : String
file_unique_id : String
duration : Int
mime_type : String?
file_size : Int64?
}pub struct WebAppData {
data : String
button_text : String
}impl Eq for WebAppDataimpl Show for WebAppDataimpl ToJson for WebAppDataimpl FromJson for WebAppDatapub struct WebAppInfo {
url : String
}impl Eq for WebAppInfoimpl Show for WebAppInfoimpl ToJson for WebAppInfoimpl FromJson for WebAppInfopub struct WebhookInfo {
url : String
has_custom_certificate : Bool
pending_update_count : Int
ip_address : String?
last_error_date : Int?
last_error_message : String?
last_synchronization_error_date : Int?
max_connections : Int?
allowed_updates : Array[String]?
}impl Eq for WebhookInfoimpl Show for WebhookInfoimpl ToJson for WebhookInfoimpl FromJson for WebhookInfofn WebhookInfo::new(url~ : String, has_custom_certificate~ : Bool, pending_update_count~ : Int, ip_address? : String, last_error_date? : Int, last_error_message? : String, last_synchronization_error_date? : Int, max_connections? : Int, allowed_updates? : Array[String]) -> WebhookInfopub struct WriteAccessAllowed {
from_request : Bool?
web_app_name : String?
from_attachment_menu : Bool?
}impl Eq for WriteAccessAllowedimpl Show for WriteAccessAllowedimpl ToJson for WriteAccessAllowedimpl FromJson for WriteAccessAllowedfn WriteAccessAllowed::new(from_request? : Bool, web_app_name? : String, from_attachment_menu? : Bool) -> WriteAccessAllowedMoonBit Telegram Bot API library with async support
Dependencies