class
TelegramBot::Bot
- TelegramBot::Bot
- Reference
- Object
Defined in:
telegram_bot/bot.crtelegram_bot/bot/methods/chat.cr
telegram_bot/bot/methods/files.cr
telegram_bot/bot/methods/games.cr
telegram_bot/bot/methods/gifts_business.cr
telegram_bot/bot/methods/inline.cr
telegram_bot/bot/methods/payments.cr
telegram_bot/bot/methods/profile.cr
telegram_bot/bot/methods/sending.cr
telegram_bot/bot/methods/stickers.cr
telegram_bot/bot/methods/webhooks.cr
telegram_bot/bot/requests.cr
telegram_bot/bot/updates.cr
Constant Summary
-
Log =
::Log.for(self)
Constructors
Instance Method Summary
-
#add_sticker_to_set(user_id : Int, name : String, sticker : InputSticker)
Adds a sticker to an existing sticker set.
-
#answer_callback_query(callback_query_id : String, text : String | Nil = nil, show_alert : Bool | Nil = nil, url : String | Nil = nil, cache_time : Int32 | Nil = nil)
Sends an answer to a callback query.
-
#answer_guest_query(guest_query_id : String, result : InlineQueryResult) : SentGuestMessage
Sends an answer to a guest query.
-
#answer_inline_query(inline_query_id : String, results : Array(InlineQueryResult), cache_time : Int32 | Nil = nil, is_personal : Bool | Nil = nil, next_offset : String | Nil = nil, button : InlineQueryResultsButton | Nil = nil) : Bool | Nil
Sends answers to an inline query.
-
#answer_pre_checkout_query(pre_checkout_query_id : String, ok : Bool, error_message : String | Nil = nil) : Bool | Nil
Sends an answer to a pre-checkout query.
-
#answer_shipping_query(shipping_query_id : String, ok : Bool, shipping_options : Array(ShippingOption) | Nil = nil, error_message : String | Nil = nil) : Bool | Nil
Sends an answer to a shipping query.
-
#answer_web_app_query(web_app_query_id : String, result : InlineQueryResult) : SentWebAppMessage
Sends an answer to a Web App query.
-
#approve_chat_join_request(chat_id : Int | String, user_id : Int)
Approves a chat join request.
-
#approve_suggested_post(chat_id : Int, message_id : Int32, send_date : Int32 | Time | Nil = nil) : Bool | Nil
Approves a suggested post in a direct messages chat.
-
#attach(name : String, file : ::File) : AttachedFile
Creates a named multipart attachment reference for nested JSON request objects.
-
#ban_chat_member(chat_id : Int | String, user_id : Int, until_date : Int | Time | Nil = nil, revoke_messages : Bool | Nil = nil)
Bans a user from a chat.
-
#ban_chat_sender_chat(chat_id : Int | String, sender_chat_id : Int)
Bans a channel chat in a supergroup or channel.
-
#close : Bool | Nil
Closes the bot instance before moving it from one local server to another.
-
#close_forum_topic(chat_id : Int | String, message_thread_id : Int)
Closes a forum topic.
-
#close_general_forum_topic(chat_id : Int | String)
Closes the general forum topic.
-
#convert_gift_to_stars(business_connection_id : String, owned_gift_id : String)
Converts a regular gift owned by a business account to Stars.
-
#copy_message(chat_id : Int | String, from_chat_id : Int | String, message_id : Int32, caption : String | Nil = nil, parse_mode : String | Nil = nil, caption_entities : Array(MessageEntity) | Nil = nil, disable_notification : Bool | Nil = nil, reply_markup : ReplyMarkup = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, video_start_timestamp : Int32 | Nil = nil, show_caption_above_media : Bool | Nil = nil, protect_content : Bool | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, message_effect_id : String | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil, reply_parameters : ReplyParameters | Nil = nil) : MessageId | Nil
Copies a message without a link to the original message.
-
#copy_messages(chat_id : Int | String, from_chat_id : Int | String, message_ids : Array(Int32), disable_notification : Bool | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, remove_caption : Bool | Nil = nil, protect_content : Bool | Nil = nil) : Array(MessageId)
Copies multiple messages without links to the original messages.
-
#create_chat_invite_link(chat_id : Int | String, name : String | Nil = nil, expire_date : Int | Time | Nil = nil, member_limit : Int32 | Nil = nil, creates_join_request : Bool | Nil = nil) : ChatInviteLink | Nil
Creates an additional invite link for a chat.
-
#create_chat_subscription_invite_link(chat_id : Int | String, subscription_period : Int, subscription_price : Int, name : String | Nil = nil) : ChatInviteLink | Nil
Creates a subscription invite link for a channel chat.
-
#create_forum_topic(chat_id : Int | String, name : String, icon_color : Int32 | Nil = nil, icon_custom_emoji_id : String | Nil = nil) : ForumTopic | Nil
Creates a forum topic.
-
#create_invoice_link(title : String, description : String, payload : String, currency : String, prices : Array(LabeledPrice), business_connection_id : String | Nil = nil, provider_token : String | Nil = nil, subscription_period : Int32 | Nil = nil, max_tip_amount : Int32 | Nil = nil, suggested_tip_amounts : Array(Int32) | Nil = nil, provider_data : String | Nil = nil, photo_url : String | Nil = nil, photo_size : Int32 | Nil = nil, photo_width : Int32 | Nil = nil, photo_height : Int32 | Nil = nil, need_name : Bool | Nil = nil, need_phone_number : Bool | Nil = nil, need_email : Bool | Nil = nil, need_shipping_address : Bool | Nil = nil, send_phone_number_to_provider : Bool | Nil = nil, send_email_to_provider : Bool | Nil = nil, is_flexible : Bool | Nil = nil) : String
Creates a link for an invoice.
-
#create_new_sticker_set(user_id : Int, name : String, title : String, stickers : Array(InputSticker), sticker_type : String | Nil = nil, needs_repainting : Bool | Nil = nil)
Creates a new sticker set for a user.
-
#decline_chat_join_request(chat_id : Int | String, user_id : Int)
Declines a chat join request.
-
#decline_suggested_post(chat_id : Int, message_id : Int32, comment : String | Nil = nil) : Bool | Nil
Declines a suggested post in a direct messages chat.
-
#delete_all_message_reactions(chat_id : Int | String, user_id : Int | Nil = nil, actor_chat_id : Int | Nil = nil)
Deletes all reactions from a message.
-
#delete_business_messages(business_connection_id : String, message_ids : Array(Int32))
Deletes messages on behalf of a business account.
-
#delete_chat_photo(chat_id : Int | String)
Deletes a chat photo.
-
#delete_chat_sticker_set(chat_id : Int | String)
Deletes the group sticker set from a supergroup.
-
#delete_forum_topic(chat_id : Int | String, message_thread_id : Int)
Deletes a forum topic.
-
#delete_message(chat_id : Int | String, message_id : Int32) : Bool | Nil
Deletes a message.
-
#delete_message_reaction(chat_id : Int | String, message_id : Int, user_id : Int | Nil = nil, actor_chat_id : Int | Nil = nil)
Deletes one reaction from a message.
-
#delete_messages(chat_id : Int | String, message_ids : Array(Int32)) : Bool | Nil
Deletes multiple messages.
-
#delete_my_commands(scope : BotCommandScope | Nil = nil, language_code : String | Nil = nil)
Deletes the bot's command list.
-
#delete_sticker_from_set(sticker : String)
Deletes a sticker from a sticker set.
-
#delete_sticker_set(name : String)
Deletes a sticker set created by the bot.
-
#delete_story(business_connection_id : String, story_id : Int)
Deletes a story posted on behalf of a managed business account.
-
#delete_webhook(drop_pending_updates : Bool | Nil = nil) : Bool | Nil
Removes webhook integration.
-
#download(file : File)
Downloads a file returned by Telegram.
-
#download(file_path : String)
Downloads a file returned by Telegram.
-
#download(media)
Downloads a file returned by Telegram.
-
#edit_chat_invite_link(chat_id : Int | String, invite_link : String, name : String | Nil = nil, expire_date : Int | Time | Nil = nil, member_limit : Int32 | Nil = nil, creates_join_request : Bool | Nil = nil) : ChatInviteLink | Nil
Edits a non-primary invite link for a chat.
-
#edit_chat_subscription_invite_link(chat_id : Int | String, invite_link : String, name : String | Nil = nil) : ChatInviteLink | Nil
Edits a subscription invite link for a channel chat.
-
#edit_forum_topic(chat_id : Int | String, message_thread_id : Int, name : String | Nil = nil, icon_custom_emoji_id : String | Nil = nil)
Edits a forum topic.
-
#edit_general_forum_topic(chat_id : Int | String, name : String)
Edits the general forum topic.
-
#edit_message_caption(business_connection_id : String | Nil = nil, chat_id : Int | String | Nil = nil, message_id : Int32 | Nil = nil, inline_message_id : String | Nil = nil, caption : String | Nil = nil, parse_mode : String | Nil = nil, caption_entities : Array(MessageEntity) | Nil = nil, show_caption_above_media : Bool | Nil = nil, reply_markup : InlineKeyboardMarkup | Nil = nil) : Message | Bool | Nil
Edits captions of messages.
-
#edit_message_checklist(business_connection_id : String, chat_id : Int | String, message_id : Int32, checklist : InputChecklist, reply_markup : InlineKeyboardMarkup | Nil = nil) : Message | Nil
Edits checklists on behalf of a connected business account.
-
#edit_message_live_location(latitude : Float, longitude : Float, business_connection_id : String | Nil = nil, chat_id : Int | String | Nil = nil, message_id : Int32 | Nil = nil, inline_message_id : String | Nil = nil, live_period : Int32 | Time::Span | Nil = nil, horizontal_accuracy : Float | Nil = nil, heading : Int32 | Nil = nil, proximity_alert_radius : Int32 | Nil = nil, reply_markup : ReplyMarkup | Nil = nil)
Edits live location messages.
-
#edit_message_media(media : InputMedia, chat_id : Int | String | Nil = nil, message_id : Int32 | Nil = nil, inline_message_id : String | Nil = nil, business_connection_id : String | Nil = nil, reply_markup : InlineKeyboardMarkup | Nil = nil) : Message | Bool | Nil
Edits animation, audio, document, live photo, photo, or video messages.
-
#edit_message_reply_markup(business_connection_id : String | Nil = nil, chat_id : Int | String | Nil = nil, message_id : Int32 | Nil = nil, inline_message_id : String | Nil = nil, reply_markup : InlineKeyboardMarkup | Nil = nil) : Message | Bool | Nil
Edits only the reply markup of messages.
-
#edit_message_text(business_connection_id : String | Nil = nil, chat_id : Int | String | Nil = nil, message_id : Int32 | Nil = nil, inline_message_id : String | Nil = nil, text : String | Nil = nil, parse_mode : String | Nil = nil, entities : Array(MessageEntity) | Nil = nil, link_preview_options : LinkPreviewOptions | Nil = nil, reply_markup : InlineKeyboardMarkup | Nil = nil) : Message | Bool | Nil
Edits text and game messages.
-
#edit_story(business_connection_id : String, story_id : Int, content : InputStoryContent, caption : String | Nil = nil, parse_mode : String | Nil = nil, caption_entities : Array(MessageEntity) | Nil = nil, areas : Array(StoryArea) | Nil = nil) : Story
Edits a story posted on behalf of a managed business account.
-
#edit_user_star_subscription(user_id : Int, telegram_payment_charge_id : String, is_canceled : Bool)
Edits a user's Telegram Star subscription.
-
#export_chat_invite_link(chat_id : Int | String)
Exports the primary invite link for a chat.
-
#forward_message(chat_id : Int | String, from_chat_id : Int | String, message_id : Int32, disable_notification : Bool | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, video_start_timestamp : Int32 | Nil = nil, protect_content : Bool | Nil = nil, message_effect_id : String | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil) : Message | Nil
Forwards a message.
-
#forward_messages(chat_id : Int | String, from_chat_id : Int | String, message_ids : Array(Int32), disable_notification : Bool | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, protect_content : Bool | Nil = nil) : Array(MessageId)
Forwards multiple messages.
-
#get_available_gifts : Gifts
Returns gifts that can be sent by the bot.
-
#get_business_account_gifts(business_connection_id : String, exclude_unsaved : Bool | Nil = nil, exclude_saved : Bool | Nil = nil, exclude_unlimited : Bool | Nil = nil, exclude_limited_upgradable : Bool | Nil = nil, exclude_limited_non_upgradable : Bool | Nil = nil, exclude_from_blockchain : Bool | Nil = nil, exclude_unique : Bool | Nil = nil, sort_by_price : Bool | Nil = nil, offset : String | Nil = nil, limit : Int32 | Nil = nil) : OwnedGifts
Returns gifts owned by a managed business account.
-
#get_business_account_star_balance(business_connection_id : String) : StarAmount
Returns the Star balance of a managed business account.
-
#get_business_connection(business_connection_id : String) : BusinessConnection
Returns information about a business connection.
-
#get_chat(chat_id : Int | String)
Returns information about a chat.
-
#get_chat_administrators(chat_id : Int | String, return_bots : Bool | Nil = nil) : Array(ChatMember)
Returns the list of chat administrators.
-
#get_chat_gifts(chat_id : Int | String, exclude_unsaved : Bool | Nil = nil, exclude_saved : Bool | Nil = nil, exclude_unlimited : Bool | Nil = nil, exclude_limited_upgradable : Bool | Nil = nil, exclude_limited_non_upgradable : Bool | Nil = nil, exclude_from_blockchain : Bool | Nil = nil, exclude_unique : Bool | Nil = nil, sort_by_price : Bool | Nil = nil, offset : String | Nil = nil, limit : Int32 | Nil = nil) : OwnedGifts
Returns gifts owned by a chat.
-
#get_chat_member(chat_id : Int | String, user_id : Int)
Returns information about a chat member.
-
#get_chat_member_count(chat_id : Int | String)
Returns the number of members in a chat.
-
#get_chat_menu_button(chat_id : Int | Nil = nil) : MenuButton
Returns the bot's menu button in a private chat or globally.
-
#get_custom_emoji_stickers(custom_emoji_ids : Array(String)) : Array(Sticker)
Returns custom emoji stickers by identifier.
-
#get_file(file_id : String) : File
Returns file metadata and a download path.
-
#get_forum_topic_icon_stickers : Array(Sticker)
Returns custom emoji stickers available as forum topic icons.
-
#get_game_high_scores(user_id : Int, chat_id : Int | Nil = nil, message_id : Int32 | Nil = nil, inline_message_id : String | Nil = nil) : Array(GameHighScore)
Returns high scores for a game.
-
#get_managed_bot_access_settings(user_id : Int) : BotAccessSettings
Returns access settings for a managed bot.
-
#get_managed_bot_token(user_id : Int) : String
Returns a token for a managed bot.
-
#get_me
Returns basic information about the bot.
-
#get_my_commands(scope : BotCommandScope | Nil = nil, language_code : String | Nil = nil) : Array(BotCommand)
Returns the bot's command list.
-
#get_my_default_administrator_rights(for_channels : Bool | Nil = nil) : ChatAdministratorRights
Returns the bot's default administrator rights.
-
#get_my_description(language_code : String | Nil = nil) : BotDescription
Returns the bot's description.
-
#get_my_name(language_code : String | Nil = nil) : BotName
Returns the bot's name.
-
#get_my_short_description(language_code : String | Nil = nil) : BotShortDescription
Returns the bot's short description.
-
#get_my_star_balance : StarAmount
Returns the bot's Telegram Star balance.
-
#get_star_transactions(offset : Int32 | Nil = nil, limit : Int32 | Nil = nil) : StarTransactions
Returns the bot's Telegram Star transactions.
-
#get_sticker_set(name : String)
Returns a sticker set.
-
#get_user_chat_boosts(chat_id : Int | String, user_id : Int) : UserChatBoosts
Returns boosts added to a chat by a user.
-
#get_user_gifts(user_id : Int, exclude_unlimited : Bool | Nil = nil, exclude_limited_upgradable : Bool | Nil = nil, exclude_limited_non_upgradable : Bool | Nil = nil, exclude_from_blockchain : Bool | Nil = nil, exclude_unique : Bool | Nil = nil, sort_by_price : Bool | Nil = nil, offset : String | Nil = nil, limit : Int32 | Nil = nil) : OwnedGifts
Returns gifts owned and hosted by a user.
-
#get_user_personal_chat_messages(user_id : Int, limit : Int32) : Array(Message)
Returns recent messages from a user's personal chat.
-
#get_user_profile_audios(user_id : Int, offset : Int32 | Nil = nil, limit : Int32 | Nil = nil)
Returns profile audios for a user.
-
#get_user_profile_photos(user_id : Int, offset : Int32 | Nil = nil, limit : Int32 | Nil = nil)
Returns profile photos for a user.
-
#get_webhook_info : WebhookInfo
Returns current webhook status.
-
#gift_premium_subscription(user_id : Int, month_count : Int, star_count : Int, text : String | Nil = nil, text_parse_mode : String | Nil = nil, text_entities : Array(MessageEntity) | Nil = nil)
Gifts a Telegram Premium subscription to a user.
-
#handle(message : Message)
handle messages
-
#handle(inline_query : InlineQuery)
handle inline query
-
#handle(chosen_inline_result : ChosenInlineResult)
handle chosen inlien query
-
#handle(callback_query : CallbackQuery)
handle callback query
-
#handle(message_reaction : MessageReactionUpdated)
handle message reaction updates
-
#handle(message_reaction_count : MessageReactionCountUpdated)
handle message reaction count updates
-
#handle(shipping_query : ShippingQuery)
handle shipping query
-
#handle(pre_checkout_query : PreCheckoutQuery)
handle pre-checkout query
-
#handle(purchased_paid_media : PaidMediaPurchased)
handle purchased paid media updates
-
#handle(poll : Poll)
handle poll updates
-
#handle(poll_answer : PollAnswer)
handle poll answer updates
-
#handle(chat_member : ChatMemberUpdated)
handle chat member status updates
-
#handle(chat_join_request : ChatJoinRequest)
handle chat join requests
-
#handle(chat_boost : ChatBoostUpdated)
handle chat boost updates
-
#handle(removed_chat_boost : ChatBoostRemoved)
handle removed chat boost updates
-
#handle(managed_bot : ManagedBotUpdated)
handle managed bot updates
-
#handle_business_connection(business_connection : BusinessConnection)
handle business connection updates
-
#handle_business_message(message : Message)
handle business messages
- #handle_channel_post(message : Message)
-
#handle_deleted_business_messages(deleted_business_messages : BusinessMessagesDeleted)
handle deleted business messages
-
#handle_edited(message : Message)
handle edited messages
-
#handle_edited_business_message(message : Message)
handle edited business messages
- #handle_edited_channel_post(message : Message)
-
#handle_guest_message(message : Message)
handle guest messages
-
#handle_my_chat_member(my_chat_member : ChatMemberUpdated)
handle bot chat member status updates
- #handle_update(u)
-
#hide_general_forum_topic(chat_id : Int | String)
Hides the general forum topic.
-
#leave_chat(chat_id : Int | String)
Leaves a chat.
-
#log_out : Bool | Nil
Logs out from the cloud Bot API server before launching the bot locally.
-
#on_business_connection(&block : BusinessConnection -> _)
Registers a block handler for business connection updates.
-
#on_business_message(&block : Message -> _)
Registers a block handler for business messages.
-
#on_callback_query(&block : CallbackQuery -> _)
Registers a block handler for callback queries.
-
#on_channel_post(&block : Message -> _)
Registers a block handler for channel posts.
-
#on_chat_boost(&block : ChatBoostUpdated -> _)
Registers a block handler for chat boost updates.
-
#on_chat_join_request(&block : ChatJoinRequest -> _)
Registers a block handler for chat join requests.
-
#on_chat_member(&block : ChatMemberUpdated -> _)
Registers a block handler for chat member status updates.
-
#on_chosen_inline_result(&block : ChosenInlineResult -> _)
Registers a block handler for chosen inline results.
-
#on_deleted_business_messages(&block : BusinessMessagesDeleted -> _)
Registers a block handler for deleted business message updates.
-
#on_edited_business_message(&block : Message -> _)
Registers a block handler for edited business messages.
-
#on_edited_channel_post(&block : Message -> _)
Registers a block handler for edited channel posts.
-
#on_edited_message(&block : Message -> _)
Registers a block handler for edited messages.
-
#on_guest_message(&block : Message -> _)
Registers a block handler for guest messages.
-
#on_inline_query(&block : InlineQuery -> _)
Registers a block handler for inline queries.
-
#on_managed_bot(&block : ManagedBotUpdated -> _)
Registers a block handler for managed bot updates.
-
#on_message(&block : Message -> _)
Registers a block handler for incoming messages.
-
#on_message_reaction(&block : MessageReactionUpdated -> _)
Registers a block handler for message reaction updates.
-
#on_message_reaction_count(&block : MessageReactionCountUpdated -> _)
Registers a block handler for message reaction count updates.
-
#on_my_chat_member(&block : ChatMemberUpdated -> _)
Registers a block handler for bot chat member status updates.
-
#on_poll(&block : Poll -> _)
Registers a block handler for poll updates.
-
#on_poll_answer(&block : PollAnswer -> _)
Registers a block handler for poll answer updates.
-
#on_pre_checkout_query(&block : PreCheckoutQuery -> _)
Registers a block handler for pre-checkout queries.
-
#on_purchased_paid_media(&block : PaidMediaPurchased -> _)
Registers a block handler for purchased paid media updates.
-
#on_removed_chat_boost(&block : ChatBoostRemoved -> _)
Registers a block handler for removed chat boost updates.
-
#on_shipping_query(&block : ShippingQuery -> _)
Registers a block handler for shipping queries.
-
#pin_chat_message(chat_id : Int | String, message_id : Int, business_connection_id : String | Nil = nil, disable_notification : Bool | Nil = nil)
Pins a message in a chat.
-
#polling
run long polling in a loop and call handlers for messages
-
#post_story(business_connection_id : String, content : InputStoryContent, active_period : Int | Time::Span, caption : String | Nil = nil, parse_mode : String | Nil = nil, caption_entities : Array(MessageEntity) | Nil = nil, areas : Array(StoryArea) | Nil = nil, post_to_chat_page : Bool | Nil = nil, protect_content : Bool | Nil = nil) : Story
Posts a story on behalf of a managed business account.
-
#promote_chat_member(chat_id : Int | String, user_id : Int, is_anonymous : Bool | Nil = nil, can_manage_chat : Bool | Nil = nil, can_change_info : Bool | Nil = nil, can_post_messages : Bool | Nil = nil, can_edit_messages : Bool | Nil = nil, can_delete_messages : Bool | Nil = nil, can_manage_video_chats : Bool | Nil = nil, can_invite_users : Bool | Nil = nil, can_restrict_members : Bool | Nil = nil, can_pin_messages : Bool | Nil = nil, can_promote_members : Bool | Nil = nil, can_manage_topics : Bool | Nil = nil, can_manage_direct_messages : Bool | Nil = nil, can_post_stories : Bool | Nil = nil, can_edit_stories : Bool | Nil = nil, can_delete_stories : Bool | Nil = nil, can_manage_tags : Bool | Nil = nil)
Promotes or demotes a user in a supergroup or channel.
-
#read_business_message(business_connection_id : String, chat_id : Int | String, message_id : Int)
Marks a business message as read.
-
#refund_star_payment(user_id : Int, telegram_payment_charge_id : String)
Refunds a Telegram Star payment.
-
#remove_business_account_profile_photo(business_connection_id : String, is_public : Bool | Nil = nil)
Removes a business account profile photo.
-
#remove_chat_verification(chat_id : Int | String)
Removes verification from a chat.
-
#remove_my_profile_photo
Removes the bot's profile photo.
-
#remove_user_verification(user_id : Int)
Removes verification from a user.
-
#reopen_forum_topic(chat_id : Int | String, message_thread_id : Int)
Reopens a forum topic.
-
#reopen_general_forum_topic(chat_id : Int | String)
Reopens the general forum topic.
-
#replace_managed_bot_token(user_id : Int) : String
Replaces the token for a managed bot.
-
#replace_sticker_in_set(user_id : Int, name : String, old_sticker : String, sticker : InputSticker)
Replaces an existing sticker in a set.
-
#reply(message : Message, text : String) : Message | Nil
Replies to a message with text using
sendMessage. -
#repost_story(business_connection_id : String, from_chat_id : Int, from_story_id : Int, active_period : Int | Time::Span, post_to_chat_page : Bool | Nil = nil, protect_content : Bool | Nil = nil) : Story
Reposts a story on behalf of a managed business account.
-
#restrict_chat_member(chat_id : Int | String, user_id : Int, permissions : ChatPermissions, until_date : Int | Time | Nil = nil, use_independent_chat_permissions : Bool | Nil = nil)
Restricts a user in a supergroup.
-
#revoke_chat_invite_link(chat_id : Int | String, invite_link : String) : ChatInviteLink | Nil
Revokes an invite link created by the bot.
-
#save_prepared_inline_message(user_id : Int, result : InlineQueryResult, allow_user_chats : Bool | Nil = nil, allow_bot_chats : Bool | Nil = nil, allow_group_chats : Bool | Nil = nil, allow_channel_chats : Bool | Nil = nil) : PreparedInlineMessage
Stores an inline message for later use.
-
#save_prepared_keyboard_button(user_id : Int, button : KeyboardButton) : PreparedKeyboardButton
Stores a keyboard button for later use.
-
#send_animation(chat_id : Int | String, animation : ::File | String, duration : Int32 | Time::Span | Nil = nil, width : Int32 | Nil = nil, height : Int32 | Nil = nil, caption : String | Nil = nil, disable_notification : Bool | Nil = nil, reply_markup : ReplyMarkup = nil, business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, thumbnail : ::File | String | Nil = nil, parse_mode : String | Nil = nil, caption_entities : Array(MessageEntity) | Nil = nil, show_caption_above_media : Bool | Nil = nil, has_spoiler : Bool | Nil = nil, protect_content : Bool | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, message_effect_id : String | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil) : Message | Nil
Sends animation files.
-
#send_audio(chat_id : Int | String, audio : ::File | String, duration : Int32 | Time::Span | Nil = nil, performer : String | Nil = nil, title : String | Nil = nil, disable_notification : Bool | Nil = nil, reply_markup : ReplyMarkup = nil, business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, thumbnail : ::File | String | Nil = nil, caption : String | Nil = nil, parse_mode : String | Nil = nil, caption_entities : Array(MessageEntity) | Nil = nil, protect_content : Bool | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, message_effect_id : String | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil) : Message | Nil
Sends audio files.
-
#send_chat_action(chat_id : Int | String, action : String, business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil)
Sends a chat action indicator.
-
#send_checklist(business_connection_id : String, chat_id : Int | String, checklist : InputChecklist, disable_notification : Bool | Nil = nil, protect_content : Bool | Nil = nil, message_effect_id : String | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, reply_markup : InlineKeyboardMarkup | Nil = nil) : Message | Nil
Sends checklists on behalf of a connected business account.
-
#send_contact(chat_id : Int | String, phone_number : String, first_name : String, last_name : String | Nil = nil, reply_markup : ReplyMarkup = nil, disable_notification : Bool | Nil = nil, business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, vcard : String | Nil = nil, protect_content : Bool | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, message_effect_id : String | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil) : Message | Nil
Sends phone contacts.
-
#send_dice(chat_id : Int | String, emoji : String | Nil = nil, business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, disable_notification : Bool | Nil = nil, protect_content : Bool | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, message_effect_id : String | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, reply_markup : ReplyMarkup = nil) : Message | Nil
Sends an animated dice message.
-
#send_document(chat_id : Int | String, document : ::File | String, caption : String | Nil = nil, disable_notification : Bool | Nil = nil, reply_markup : ReplyMarkup = nil, business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, thumbnail : ::File | String | Nil = nil, parse_mode : String | Nil = nil, caption_entities : Array(MessageEntity) | Nil = nil, disable_content_type_detection : Bool | Nil = nil, protect_content : Bool | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, message_effect_id : String | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil) : Message | Nil
Sends general files.
-
#send_game(chat_id : Int | String, game_short_name : String, disable_notification : Bool | Nil = nil, reply_markup : InlineKeyboardMarkup | Nil = nil, *, business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, protect_content : Bool | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, message_effect_id : String | Nil = nil, reply_parameters : ReplyParameters | Nil = nil) : Message | Nil
Sends a game.
-
#send_gift(gift_id : String, user_id : Int | Nil = nil, chat_id : Int | String | Nil = nil, pay_for_upgrade : Bool | Nil = nil, text : String | Nil = nil, text_parse_mode : String | Nil = nil, text_entities : Array(MessageEntity) | Nil = nil)
Sends a gift to a user or chat.
-
#send_invoice(chat_id : Int | String, title : String, description : String, payload : String, provider_token : String, start_parameter : String, currency : String, prices : Array(LabeledPrice), business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, subscription_period : Int32 | Nil = nil, max_tip_amount : Int32 | Nil = nil, suggested_tip_amounts : Array(Int32) | Nil = nil, provider_data : String | Nil = nil, photo_url : String | Nil = nil, photo_size : Int32 | Nil = nil, photo_width : Int32 | Nil = nil, photo_height : Int32 | Nil = nil, need_name : Bool | Nil = nil, need_phone_number : Bool | Nil = nil, need_email : Bool | Nil = nil, need_shipping_address : Bool | Nil = nil, send_phone_number_to_provider : Bool | Nil = nil, send_email_to_provider : Bool | Nil = nil, is_flexible : Bool | Nil = nil, disable_notification : Bool | Nil = nil, protect_content : Bool | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, message_effect_id : String | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, reply_markup : InlineKeyboardMarkup | Nil = nil) : Message | Nil
Sends invoices.
-
#send_live_photo(chat_id : Int | String, live_photo : ::File | String, photo : ::File | String, caption : String | Nil = nil, disable_notification : Bool | Nil = nil, reply_markup : ReplyMarkup = nil, business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, parse_mode : String | Nil = nil, caption_entities : Array(MessageEntity) | Nil = nil, show_caption_above_media : Bool | Nil = nil, has_spoiler : Bool | Nil = nil, protect_content : Bool | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, message_effect_id : String | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil) : Message | Nil
Sends live photos.
-
#send_location(chat_id : Int | String, latitude : Float, longitude : Float, live_period : Int32 | Time::Span | Nil = nil, disable_notification : Bool | Nil = nil, reply_markup : ReplyMarkup = nil, business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, horizontal_accuracy : Float | Nil = nil, heading : Int32 | Nil = nil, proximity_alert_radius : Int32 | Nil = nil, protect_content : Bool | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, message_effect_id : String | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil) : Message | Nil
Sends point locations.
-
#send_media_group(chat_id : Int | String, media : Array(InputMedia), disable_notification : Bool | Nil = nil, business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, protect_content : Bool | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, message_effect_id : String | Nil = nil, allow_paid_broadcast : Bool | Nil = nil) : Array(Message)
Sends a group of photos, videos, documents, or audios.
-
#send_message(chat_id : Int | String, text : String, parse_mode : String | Nil = nil, disable_notification : Bool | Nil = nil, reply_markup : ReplyMarkup = nil, business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, entities : Array(MessageEntity) | Nil = nil, link_preview_options : LinkPreviewOptions | Nil = nil, protect_content : Bool | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, message_effect_id : String | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil) : Message | Nil
Sends text messages.
-
#send_message_draft(chat_id : Int, draft_id : Int, text : String | Nil = nil, message_thread_id : Int32 | Nil = nil, parse_mode : String | Nil = nil, entities : Array(MessageEntity) | Nil = nil) : Bool | Nil
Sends a message draft.
-
#send_paid_media(chat_id : Int | String, star_count : Int, media : Array(InputPaidMedia), business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, payload : String | Nil = nil, caption : String | Nil = nil, parse_mode : String | Nil = nil, caption_entities : Array(MessageEntity) | Nil = nil, show_caption_above_media : Bool | Nil = nil, disable_notification : Bool | Nil = nil, protect_content : Bool | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, reply_markup : ReplyMarkup = nil) : Message | Nil
Sends paid media messages.
-
#send_photo(chat_id : Int | String, photo : ::File | String, caption : String | Nil = nil, disable_notification : Bool | Nil = nil, reply_markup : ReplyMarkup = nil, business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, parse_mode : String | Nil = nil, caption_entities : Array(MessageEntity) | Nil = nil, show_caption_above_media : Bool | Nil = nil, has_spoiler : Bool | Nil = nil, protect_content : Bool | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, message_effect_id : String | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil) : Message | Nil
Sends photos.
-
#send_poll(chat_id : Int | String, question : String, options : Array(InputPollOption) | Array(String), business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, question_parse_mode : String | Nil = nil, question_entities : Array(MessageEntity) | Nil = nil, is_anonymous : Bool | Nil = nil, type : String | Nil = nil, allows_multiple_answers : Bool | Nil = nil, allows_revoting : Bool | Nil = nil, shuffle_options : Bool | Nil = nil, allow_adding_options : Bool | Nil = nil, hide_results_until_closes : Bool | Nil = nil, members_only : Bool | Nil = nil, country_codes : Array(String) | Nil = nil, correct_option_ids : Array(Int32) | Nil = nil, explanation : String | Nil = nil, explanation_parse_mode : String | Nil = nil, explanation_entities : Array(MessageEntity) | Nil = nil, explanation_media : InputPollMedia | Nil = nil, open_period : Int32 | Time::Span | Nil = nil, close_date : Int32 | Time | Nil = nil, is_closed : Bool | Nil = nil, description : String | Nil = nil, description_parse_mode : String | Nil = nil, description_entities : Array(MessageEntity) | Nil = nil, media : InputPollMedia | Nil = nil, disable_notification : Bool | Nil = nil, protect_content : Bool | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, message_effect_id : String | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, reply_markup : ReplyMarkup = nil) : Message | Nil
Sends native polls.
-
#send_sticker(chat_id : Int | String, sticker : ::File | String, disable_notification : Bool | Nil = nil, reply_markup : ReplyMarkup = nil, business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, emoji : String | Nil = nil, protect_content : Bool | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, message_effect_id : String | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil) : Message | Nil
Sends stickers.
-
#send_venue(chat_id : Int | String, latitude : Float, longitude : Float, title : String, address : String, foursquare_id : String | Nil = nil, disable_notification : Bool | Nil = nil, reply_markup : ReplyMarkup | Nil = nil, business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, foursquare_type : String | Nil = nil, google_place_id : String | Nil = nil, google_place_type : String | Nil = nil, protect_content : Bool | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, message_effect_id : String | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil) : Message | Nil
Sends venue information.
-
#send_video(chat_id : Int | String, video : ::File | String, duration : Int32 | Time::Span | Nil = nil, width : Int32 | Nil = nil, height : Int32 | Nil = nil, caption : String | Nil = nil, disable_notification : Bool | Nil = nil, reply_markup : ReplyMarkup = nil, business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, thumbnail : ::File | String | Nil = nil, cover : ::File | String | Nil = nil, start_timestamp : Int32 | Nil = nil, parse_mode : String | Nil = nil, caption_entities : Array(MessageEntity) | Nil = nil, show_caption_above_media : Bool | Nil = nil, has_spoiler : Bool | Nil = nil, supports_streaming : Bool | Nil = nil, protect_content : Bool | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, message_effect_id : String | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil) : Message | Nil
Sends video files.
-
#send_video_note(chat_id : Int | String, video_note : ::File | String, duration : Int32 | Time::Span | Nil = nil, length : Int32 | Nil = nil, disable_notification : Bool | Nil = nil, reply_markup : ReplyMarkup = nil, business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, thumbnail : ::File | String | Nil = nil, protect_content : Bool | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, message_effect_id : String | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil) : Message | Nil
Sends video notes.
-
#send_voice(chat_id : Int | String, voice : ::File | String, duration : Int32 | Time::Span | Nil = nil, disable_notification : Bool | Nil = nil, reply_markup : ReplyMarkup = nil, business_connection_id : String | Nil = nil, message_thread_id : Int32 | Nil = nil, direct_messages_topic_id : Int64 | Nil = nil, caption : String | Nil = nil, parse_mode : String | Nil = nil, caption_entities : Array(MessageEntity) | Nil = nil, protect_content : Bool | Nil = nil, reply_parameters : ReplyParameters | Nil = nil, message_effect_id : String | Nil = nil, allow_paid_broadcast : Bool | Nil = nil, suggested_post_parameters : SuggestedPostParameters | Nil = nil) : Message | Nil
Sends voice messages.
- #serve(bind_address : String = "127.0.0.1", bind_port : Int32 = 80, ssl_certificate_path : String | Nil = nil, ssl_key_path : String | Nil = nil)
-
#set_business_account_bio(business_connection_id : String, bio : String | Nil = nil)
Sets the bio of a business account.
-
#set_business_account_gift_settings(business_connection_id : String, show_gift_button : Bool, accepted_gift_types : AcceptedGiftTypes)
Sets gift settings for a business account.
-
#set_business_account_name(business_connection_id : String, first_name : String, last_name : String | Nil = nil)
Sets the name of a business account.
-
#set_business_account_profile_photo(business_connection_id : String, photo : InputProfilePhoto, is_public : Bool | Nil = nil)
Sets a business account profile photo.
-
#set_business_account_username(business_connection_id : String, username : String | Nil = nil)
Sets the username of a business account.
-
#set_chat_administrator_custom_title(chat_id : Int | String, user_id : Int, custom_title : String)
Sets a custom title for an administrator in a supergroup.
-
#set_chat_description(chat_id : Int | String, description : String | Nil = nil)
Sets a chat description.
-
#set_chat_member_tag(chat_id : Int | String, user_id : Int, tag : String | Nil = nil)
Sets a tag for a regular member in a group or supergroup.
-
#set_chat_menu_button(chat_id : Int | Nil = nil, menu_button : MenuButton | Nil = nil)
Sets the bot's menu button in a private chat or globally.
-
#set_chat_permissions(chat_id : Int | String, permissions : ChatPermissions, use_independent_chat_permissions : Bool | Nil = nil)
Sets default chat permissions for all members.
-
#set_chat_photo(chat_id : Int | String, photo : ::File)
Sets a chat photo.
-
#set_chat_sticker_set(chat_id : Int | String, sticker_set_name : String)
Sets a group sticker set for a supergroup.
-
#set_chat_title(chat_id : Int | String, title : String)
Sets a chat title.
-
#set_custom_emoji_sticker_set_thumbnail(name : String, custom_emoji_id : String | Nil = nil)
Sets the thumbnail of a custom emoji sticker set.
-
#set_game_score(user_id : Int, score : Int, force : Bool | Nil = nil, disable_edit_message : Bool | Nil = nil, chat_id : Int | Nil = nil, message_id : Int32 | Nil = nil, inline_message_id : String | Nil = nil) : Message | Bool | Nil
Sets a user's score in a game.
-
#set_managed_bot_access_settings(user_id : Int, is_access_restricted : Bool, added_user_ids : Array(Int64) | Nil = nil)
Sets access settings for a managed bot.
-
#set_message_reaction(chat_id : Int | String, message_id : Int, reaction : Array(ReactionType) | Nil = nil, is_big : Bool | Nil = nil)
Sets reactions on a message.
-
#set_my_commands(commands : Array(BotCommand), scope : BotCommandScope | Nil = nil, language_code : String | Nil = nil)
Sets the bot's command list.
-
#set_my_default_administrator_rights(rights : ChatAdministratorRights | Nil = nil, for_channels : Bool | Nil = nil)
Sets the bot's default administrator rights.
-
#set_my_description(description : String | Nil = nil, language_code : String | Nil = nil)
Sets the bot's description.
-
#set_my_name(name : String | Nil = nil, language_code : String | Nil = nil)
Sets the bot's name.
-
#set_my_profile_photo(photo : InputProfilePhoto)
Sets the bot's profile photo.
-
#set_my_short_description(short_description : String | Nil = nil, language_code : String | Nil = nil)
Sets the bot's short description.
-
#set_passport_data_errors(user_id : Int, errors : Array(PassportElementError))
Reports validation errors in submitted Telegram Passport data.
-
#set_sticker_emoji_list(sticker : String, emoji_list : Array(String))
Changes the emoji list assigned to a sticker.
-
#set_sticker_keywords(sticker : String, keywords : Array(String) | Nil = nil)
Changes search keywords assigned to a sticker.
-
#set_sticker_mask_position(sticker : String, mask_position : MaskPosition | Nil = nil)
Changes the mask position assigned to a mask sticker.
-
#set_sticker_position_in_set(sticker : String, position : Int)
Moves a sticker in a sticker set.
-
#set_sticker_set_thumbnail(name : String, user_id : Int, format : String, thumbnail : ::File | String | Nil = nil)
Sets the thumbnail of a regular, mask, or custom emoji sticker set.
-
#set_sticker_set_title(name : String, title : String)
Changes a sticker set title.
-
#set_user_emoji_status(user_id : Int, emoji_status_custom_emoji_id : String | Nil = nil, emoji_status_expiration_date : Int | Time | Nil = nil)
Changes a user's emoji status.
-
#set_webhook(url : String, certificate : ::File | Nil = nil, max_connections : Int32 | Nil = nil, allowed_updates : Array(String) | Nil = @allowed_updates, ip_address : String | Nil = nil, drop_pending_updates : Bool | Nil = nil, secret_token : String | Nil = nil)
Sets a webhook for receiving incoming updates.
- #stop
-
#stop_message_live_location(business_connection_id : String | Nil = nil, chat_id : Int | String | Nil = nil, message_id : Int32 | Nil = nil, inline_message_id : String | Nil = nil, reply_markup : ReplyMarkup | Nil = nil)
Stops updating a live location message.
-
#stop_poll(chat_id : Int | String, message_id : Int32, business_connection_id : String | Nil = nil, reply_markup : InlineKeyboardMarkup | Nil = nil) : Poll | Nil
Stops a poll sent by the bot.
-
#transfer_business_account_stars(business_connection_id : String, star_count : Int)
Transfers Stars from a business account to the bot's balance.
-
#transfer_gift(business_connection_id : String, owned_gift_id : String, new_owner_chat_id : Int, star_count : Int | Nil = nil)
Transfers a unique gift owned by a business account to another user.
-
#unban_chat_member(chat_id : Int | String, user_id : Int, only_if_banned : Bool | Nil = nil)
Unbans a previously banned user in a chat.
-
#unban_chat_sender_chat(chat_id : Int | String, sender_chat_id : Int)
Unbans a previously banned channel chat in a supergroup or channel.
-
#unhide_general_forum_topic(chat_id : Int | String)
Unhides the general forum topic.
-
#unpin_all_chat_messages(chat_id : Int | String)
Clears the list of pinned messages in a chat.
-
#unpin_all_forum_topic_messages(chat_id : Int | String, message_thread_id : Int)
Unpins all messages in a forum topic.
-
#unpin_all_general_forum_topic_messages(chat_id : Int | String)
Unpins all messages in the general forum topic.
-
#unpin_chat_message(chat_id : Int | String, business_connection_id : String | Nil = nil, message_id : Int | Nil = nil)
Unpins a message in a chat.
-
#upgrade_gift(business_connection_id : String, owned_gift_id : String, keep_original_details : Bool | Nil = nil, star_count : Int | Nil = nil)
Upgrades a regular gift owned by a business account to a unique gift.
-
#upload_sticker_file(user_id : Int, sticker : ::File, sticker_format : String)
Uploads a sticker file for later use.
-
#verify_chat(chat_id : Int | String, custom_description : String | Nil = nil)
Verifies a chat on behalf of the bot's organization.
-
#verify_user(user_id : Int, custom_description : String | Nil = nil)
Verifies a user on behalf of the bot's organization.
Constructor Detail
Instance Method Detail
Adds a sticker to an existing sticker set.
Sends an answer to a callback query.
Sends an answer to a guest query.
Sends answers to an inline query.
Sends an answer to a pre-checkout query.
See: https://core.telegram.org/bots/api#answerprecheckoutquery
Sends an answer to a shipping query.
Sends an answer to a Web App query.
Approves a chat join request.
See: https://core.telegram.org/bots/api#approvechatjoinrequest
Approves a suggested post in a direct messages chat.
See: https://core.telegram.org/bots/api#approvesuggestedpost
Creates a named multipart attachment reference for nested JSON request objects.
Bans a user from a chat.
Bans a channel chat in a supergroup or channel.
Closes the general forum topic.
See: https://core.telegram.org/bots/api#closegeneralforumtopic
Converts a regular gift owned by a business account to Stars.
Copies a message without a link to the original message.
Copies multiple messages without links to the original messages.
Creates an additional invite link for a chat.
See: https://core.telegram.org/bots/api#createchatinvitelink
Creates a subscription invite link for a channel chat.
See: https://core.telegram.org/bots/api#createchatsubscriptioninvitelink
Creates a forum topic.
Creates a link for an invoice.
Creates a new sticker set for a user.
Declines a chat join request.
See: https://core.telegram.org/bots/api#declinechatjoinrequest
Declines a suggested post in a direct messages chat.
See: https://core.telegram.org/bots/api#declinesuggestedpost
Deletes all reactions from a message.
See: https://core.telegram.org/bots/api#deleteallmessagereactions
Deletes messages on behalf of a business account.
See: https://core.telegram.org/bots/api#deletebusinessmessages
Deletes the group sticker set from a supergroup.
See: https://core.telegram.org/bots/api#deletechatstickerset
Deletes one reaction from a message.
See: https://core.telegram.org/bots/api#deletemessagereaction
Deletes multiple messages.
Deletes the bot's command list.
Deletes a sticker from a sticker set.
See: https://core.telegram.org/bots/api#deletestickerfromset
Deletes a story posted on behalf of a managed business account.
Removes webhook integration.
Edits a non-primary invite link for a chat.
Edits a subscription invite link for a channel chat.
See: https://core.telegram.org/bots/api#editchatsubscriptioninvitelink
Edits a forum topic.
Edits the general forum topic.
See: https://core.telegram.org/bots/api#editgeneralforumtopic
Edits captions of messages.
Edits checklists on behalf of a connected business account.
See: https://core.telegram.org/bots/api#editmessagechecklist
Edits live location messages.
See: https://core.telegram.org/bots/api#editmessagelivelocation
Edits animation, audio, document, live photo, photo, or video messages.
Edits only the reply markup of messages.
See: https://core.telegram.org/bots/api#editmessagereplymarkup
Edits text and game messages.
Edits a story posted on behalf of a managed business account.
Edits a user's Telegram Star subscription.
See: https://core.telegram.org/bots/api#edituserstarsubscription
Exports the primary invite link for a chat.
See: https://core.telegram.org/bots/api#exportchatinvitelink
Forwards a message.
Forwards multiple messages.
Returns gifts that can be sent by the bot.
Returns gifts owned by a managed business account.
See: https://core.telegram.org/bots/api#getbusinessaccountgifts
Returns the Star balance of a managed business account.
See: https://core.telegram.org/bots/api#getbusinessaccountstarbalance
Returns information about a business connection.
See: https://core.telegram.org/bots/api#getbusinessconnection
Returns the list of chat administrators.
See: https://core.telegram.org/bots/api#getchatadministrators
Returns gifts owned by a chat.
Returns information about a chat member.
Returns custom emoji stickers by identifier.
See: https://core.telegram.org/bots/api#getcustomemojistickers
Returns file metadata and a download path.
Returns custom emoji stickers available as forum topic icons.
See: https://core.telegram.org/bots/api#getforumtopiciconstickers
Returns high scores for a game.
Returns access settings for a managed bot.
See: https://core.telegram.org/bots/api#getmanagedbotaccesssettings
Returns the bot's command list.
Returns the bot's default administrator rights.
See: https://core.telegram.org/bots/api#getmydefaultadministratorrights
Returns the bot's description.
Returns the bot's name.
Returns the bot's Telegram Star transactions.
Returns boosts added to a chat by a user.
Returns gifts owned and hosted by a user.
Returns recent messages from a user's personal chat.
See: https://core.telegram.org/bots/api#getuserpersonalchatmessages
handle message reaction count updates
handle business connection updates
handle deleted business messages
handle bot chat member status updates
Hides the general forum topic.
See: https://core.telegram.org/bots/api#hidegeneralforumtopic
Registers a block handler for business connection updates.
Registers a block handler for callback queries.
Registers a block handler for chat boost updates.
Registers a block handler for chat join requests.
Registers a block handler for chat member status updates.
Registers a block handler for chosen inline results.
Registers a block handler for deleted business message updates.
Registers a block handler for edited business messages.
Registers a block handler for edited channel posts.
Registers a block handler for managed bot updates.
Registers a block handler for message reaction updates.
Registers a block handler for message reaction count updates.
Registers a block handler for bot chat member status updates.
Registers a block handler for pre-checkout queries.
Registers a block handler for purchased paid media updates.
Registers a block handler for removed chat boost updates.
Registers a block handler for shipping queries.
Pins a message in a chat.
Posts a story on behalf of a managed business account.
Promotes or demotes a user in a supergroup or channel.
Marks a business message as read.
Refunds a Telegram Star payment.
Removes a business account profile photo.
See: https://core.telegram.org/bots/api#removebusinessaccountprofilephoto
Removes verification from a chat.
See: https://core.telegram.org/bots/api#removechatverification
Removes the bot's profile photo.
See: https://core.telegram.org/bots/api#removemyprofilephoto
Removes verification from a user.
See: https://core.telegram.org/bots/api#removeuserverification
Reopens the general forum topic.
See: https://core.telegram.org/bots/api#reopengeneralforumtopic
Replaces the token for a managed bot.
See: https://core.telegram.org/bots/api#replacemanagedbottoken
Replaces an existing sticker in a set.
Replies to a message with text using sendMessage.
Reposts a story on behalf of a managed business account.
Restricts a user in a supergroup.
Revokes an invite link created by the bot.
See: https://core.telegram.org/bots/api#revokechatinvitelink
Stores an inline message for later use.
See: https://core.telegram.org/bots/api#savepreparedinlinemessage
Stores a keyboard button for later use.
See: https://core.telegram.org/bots/api#savepreparedkeyboardbutton
Sends animation files.
Sends audio files.
Sends a chat action indicator.
Sends checklists on behalf of a connected business account.
Sends phone contacts.
Sends an animated dice message.
Sends general files.
Sends a game.
Sends a gift to a user or chat.
Sends invoices.
Sends live photos.
Sends point locations.
Sends a group of photos, videos, documents, or audios.
Sends text messages.
Sends a message draft.
Sends paid media messages.
Sends photos.
Sends native polls.
Sends stickers.
Sends venue information.
Sends video files.
Sends video notes.
Sends voice messages.
Sets the bio of a business account.
See: https://core.telegram.org/bots/api#setbusinessaccountbio
Sets gift settings for a business account.
See: https://core.telegram.org/bots/api#setbusinessaccountgiftsettings
Sets the name of a business account.
See: https://core.telegram.org/bots/api#setbusinessaccountname
Sets a business account profile photo.
See: https://core.telegram.org/bots/api#setbusinessaccountprofilephoto
Sets the username of a business account.
See: https://core.telegram.org/bots/api#setbusinessaccountusername
Sets a custom title for an administrator in a supergroup.
See: https://core.telegram.org/bots/api#setchatadministratorcustomtitle
Sets a chat description.
Sets a tag for a regular member in a group or supergroup.
Sets default chat permissions for all members.
Sets a group sticker set for a supergroup.
Sets the thumbnail of a custom emoji sticker set.
See: https://core.telegram.org/bots/api#setcustomemojistickersetthumbnail
Sets a user's score in a game.
Sets access settings for a managed bot.
See: https://core.telegram.org/bots/api#setmanagedbotaccesssettings
Sets reactions on a message.
Sets the bot's command list.
Sets the bot's default administrator rights.
See: https://core.telegram.org/bots/api#setmydefaultadministratorrights
Sets the bot's description.
Sets the bot's name.
Sets the bot's short description.
See: https://core.telegram.org/bots/api#setmyshortdescription
Reports validation errors in submitted Telegram Passport data.
See: https://core.telegram.org/bots/api#setpassportdataerrors
Changes the emoji list assigned to a sticker.
Changes search keywords assigned to a sticker.
Changes the mask position assigned to a mask sticker.
See: https://core.telegram.org/bots/api#setstickermaskposition
Moves a sticker in a sticker set.
See: https://core.telegram.org/bots/api#setstickerpositioninset
Sets the thumbnail of a regular, mask, or custom emoji sticker set.
See: https://core.telegram.org/bots/api#setstickersetthumbnail
Changes a user's emoji status.
Sets a webhook for receiving incoming updates.
Stops updating a live location message.
See: https://core.telegram.org/bots/api#stopmessagelivelocation
Stops a poll sent by the bot.
Transfers Stars from a business account to the bot's balance.
See: https://core.telegram.org/bots/api#transferbusinessaccountstars
Transfers a unique gift owned by a business account to another user.
Unbans a previously banned user in a chat.
Unbans a previously banned channel chat in a supergroup or channel.
Unhides the general forum topic.
See: https://core.telegram.org/bots/api#unhidegeneralforumtopic
Clears the list of pinned messages in a chat.
See: https://core.telegram.org/bots/api#unpinallchatmessages
Unpins all messages in a forum topic.
See: https://core.telegram.org/bots/api#unpinallforumtopicmessages
Unpins all messages in the general forum topic.
See: https://core.telegram.org/bots/api#unpinallgeneralforumtopicmessages
Unpins a message in a chat.
Upgrades a regular gift owned by a business account to a unique gift.
Uploads a sticker file for later use.
Verifies a chat on behalf of the bot's organization.
Verifies a user on behalf of the bot's organization.