telegram-bot
TelegramBot - the Ruby gem for the telegram-bot-api
Unofficial telegram-bot-api OpenAPI spec. Generated from the Bot API docs at https://core.telegram.org/bots/api
This SDK is automatically generated by the OpenAPI Generator project:
- API version: Bot API 7.2
- Package version: 7.2.0
- Generator version: 7.7.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
Installation
Build a gem
To build the Ruby code into a gem:
gem build telegram-bot.gemspec
Then either install the gem locally:
gem install ./telegram-bot-7.2.0.gem
(for development, run gem install --dev ./telegram-bot-7.2.0.gem to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'telegram-bot', '~> 7.2.0'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'telegram-bot', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'telegram-bot'
api_instance = TelegramBot::DefaultApi.new
user_id = 789 # Integer |
name = 'name_example' # String |
sticker = TelegramBot::InputSticker.new({sticker: { key: nil}, format: 'format_example', emoji_list: ['emoji_list_example']}) # InputSticker |
begin
#addStickerToSet
result = api_instance.add_sticker_to_set(user_id, name, sticker)
p result
rescue TelegramBot::ApiError => e
puts "Exception when calling DefaultApi->add_sticker_to_set: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://api.telegram.org/bot123:XYZ
| Class | Method | HTTP request | Description |
|---|---|---|---|
| TelegramBot::DefaultApi | add_sticker_to_set | POST /addStickerToSet | addStickerToSet |
| TelegramBot::DefaultApi | answer_callback_query | POST /answerCallbackQuery | answerCallbackQuery |
| TelegramBot::DefaultApi | answer_inline_query | POST /answerInlineQuery | answerInlineQuery |
| TelegramBot::DefaultApi | answer_pre_checkout_query | POST /answerPreCheckoutQuery | answerPreCheckoutQuery |
| TelegramBot::DefaultApi | answer_shipping_query | POST /answerShippingQuery | answerShippingQuery |
| TelegramBot::DefaultApi | answer_web_app_query | POST /answerWebAppQuery | answerWebAppQuery |
| TelegramBot::DefaultApi | approve_chat_join_request | POST /approveChatJoinRequest | approveChatJoinRequest |
| TelegramBot::DefaultApi | ban_chat_member | POST /banChatMember | banChatMember |
| TelegramBot::DefaultApi | ban_chat_sender_chat | POST /banChatSenderChat | banChatSenderChat |
| TelegramBot::DefaultApi | close | POST /close | close |
| TelegramBot::DefaultApi | close_forum_topic | POST /closeForumTopic | closeForumTopic |
| TelegramBot::DefaultApi | close_general_forum_topic | POST /closeGeneralForumTopic | closeGeneralForumTopic |
| TelegramBot::DefaultApi | copy_message | POST /copyMessage | copyMessage |
| TelegramBot::DefaultApi | copy_messages | POST /copyMessages | copyMessages |
| TelegramBot::DefaultApi | create_chat_invite_link | POST /createChatInviteLink | createChatInviteLink |
| TelegramBot::DefaultApi | create_forum_topic | POST /createForumTopic | createForumTopic |
| TelegramBot::DefaultApi | create_invoice_link | POST /createInvoiceLink | createInvoiceLink |
| TelegramBot::DefaultApi | create_new_sticker_set | POST /createNewStickerSet | createNewStickerSet |
| TelegramBot::DefaultApi | decline_chat_join_request | POST /declineChatJoinRequest | declineChatJoinRequest |
| TelegramBot::DefaultApi | delete_chat_photo | POST /deleteChatPhoto | deleteChatPhoto |
| TelegramBot::DefaultApi | delete_chat_sticker_set | POST /deleteChatStickerSet | deleteChatStickerSet |
| TelegramBot::DefaultApi | delete_forum_topic | POST /deleteForumTopic | deleteForumTopic |
| TelegramBot::DefaultApi | delete_message | POST /deleteMessage | deleteMessage |
| TelegramBot::DefaultApi | delete_messages | POST /deleteMessages | deleteMessages |
| TelegramBot::DefaultApi | delete_my_commands | POST /deleteMyCommands | deleteMyCommands |
| TelegramBot::DefaultApi | delete_sticker_from_set | POST /deleteStickerFromSet | deleteStickerFromSet |
| TelegramBot::DefaultApi | delete_sticker_set | POST /deleteStickerSet | deleteStickerSet |
| TelegramBot::DefaultApi | delete_webhook | POST /deleteWebhook | deleteWebhook |
| TelegramBot::DefaultApi | edit_chat_invite_link | POST /editChatInviteLink | editChatInviteLink |
| TelegramBot::DefaultApi | edit_forum_topic | POST /editForumTopic | editForumTopic |
| TelegramBot::DefaultApi | edit_general_forum_topic | POST /editGeneralForumTopic | editGeneralForumTopic |
| TelegramBot::DefaultApi | edit_message_caption | POST /editMessageCaption | editMessageCaption |
| TelegramBot::DefaultApi | edit_message_live_location | POST /editMessageLiveLocation | editMessageLiveLocation |
| TelegramBot::DefaultApi | edit_message_media | POST /editMessageMedia | editMessageMedia |
| TelegramBot::DefaultApi | edit_message_reply_markup | POST /editMessageReplyMarkup | editMessageReplyMarkup |
| TelegramBot::DefaultApi | edit_message_text | POST /editMessageText | editMessageText |
| TelegramBot::DefaultApi | export_chat_invite_link | POST /exportChatInviteLink | exportChatInviteLink |
| TelegramBot::DefaultApi | forward_message | POST /forwardMessage | forwardMessage |
| TelegramBot::DefaultApi | forward_messages | POST /forwardMessages | forwardMessages |
| TelegramBot::DefaultApi | get_business_connection | POST /getBusinessConnection | getBusinessConnection |
| TelegramBot::DefaultApi | get_chat | POST /getChat | getChat |
| TelegramBot::DefaultApi | get_chat_administrators | POST /getChatAdministrators | getChatAdministrators |
| TelegramBot::DefaultApi | get_chat_member | POST /getChatMember | getChatMember |
| TelegramBot::DefaultApi | get_chat_member_count | POST /getChatMemberCount | getChatMemberCount |
| TelegramBot::DefaultApi | get_chat_menu_button | POST /getChatMenuButton | getChatMenuButton |
| TelegramBot::DefaultApi | get_custom_emoji_stickers | POST /getCustomEmojiStickers | getCustomEmojiStickers |
| TelegramBot::DefaultApi | get_file | POST /getFile | getFile |
| TelegramBot::DefaultApi | get_forum_topic_icon_stickers | POST /getForumTopicIconStickers | getForumTopicIconStickers |
| TelegramBot::DefaultApi | get_game_high_scores | POST /getGameHighScores | getGameHighScores |
| TelegramBot::DefaultApi | get_me | POST /getMe | getMe |
| TelegramBot::DefaultApi | get_my_commands | POST /getMyCommands | getMyCommands |
| TelegramBot::DefaultApi | get_my_default_administrator_rights | POST /getMyDefaultAdministratorRights | getMyDefaultAdministratorRights |
| TelegramBot::DefaultApi | get_my_description | POST /getMyDescription | getMyDescription |
| TelegramBot::DefaultApi | get_my_name | POST /getMyName | getMyName |
| TelegramBot::DefaultApi | get_my_short_description | POST /getMyShortDescription | getMyShortDescription |
| TelegramBot::DefaultApi | get_sticker_set | POST /getStickerSet | getStickerSet |
| TelegramBot::DefaultApi | get_updates | POST /getUpdates | getUpdates |
| TelegramBot::DefaultApi | get_user_chat_boosts | POST /getUserChatBoosts | getUserChatBoosts |
| TelegramBot::DefaultApi | get_user_profile_photos | POST /getUserProfilePhotos | getUserProfilePhotos |
| TelegramBot::DefaultApi | get_webhook_info | POST /getWebhookInfo | getWebhookInfo |
| TelegramBot::DefaultApi | hide_general_forum_topic | POST /hideGeneralForumTopic | hideGeneralForumTopic |
| TelegramBot::DefaultApi | leave_chat | POST /leaveChat | leaveChat |
| TelegramBot::DefaultApi | log_out | POST /logOut | logOut |
| TelegramBot::DefaultApi | pin_chat_message | POST /pinChatMessage | pinChatMessage |
| TelegramBot::DefaultApi | promote_chat_member | POST /promoteChatMember | promoteChatMember |
| TelegramBot::DefaultApi | reopen_forum_topic | POST /reopenForumTopic | reopenForumTopic |
| TelegramBot::DefaultApi | reopen_general_forum_topic | POST /reopenGeneralForumTopic | reopenGeneralForumTopic |
| TelegramBot::DefaultApi | replace_sticker_in_set | POST /replaceStickerInSet | replaceStickerInSet |
| TelegramBot::DefaultApi | restrict_chat_member | POST /restrictChatMember | restrictChatMember |
| TelegramBot::DefaultApi | revoke_chat_invite_link | POST /revokeChatInviteLink | revokeChatInviteLink |
| TelegramBot::DefaultApi | send_animation | POST /sendAnimation | sendAnimation |
| TelegramBot::DefaultApi | send_audio | POST /sendAudio | sendAudio |
| TelegramBot::DefaultApi | send_chat_action | POST /sendChatAction | sendChatAction |
| TelegramBot::DefaultApi | send_contact | POST /sendContact | sendContact |
| TelegramBot::DefaultApi | send_dice | POST /sendDice | sendDice |
| TelegramBot::DefaultApi | send_document | POST /sendDocument | sendDocument |
| TelegramBot::DefaultApi | send_game | POST /sendGame | sendGame |
| TelegramBot::DefaultApi | send_invoice | POST /sendInvoice | sendInvoice |
| TelegramBot::DefaultApi | send_location | POST /sendLocation | sendLocation |
| TelegramBot::DefaultApi | send_media_group | POST /sendMediaGroup | sendMediaGroup |
| TelegramBot::DefaultApi | send_message | POST /sendMessage | sendMessage |
| TelegramBot::DefaultApi | send_photo | POST /sendPhoto | sendPhoto |
| TelegramBot::DefaultApi | send_poll | POST /sendPoll | sendPoll |
| TelegramBot::DefaultApi | send_sticker | POST /sendSticker | sendSticker |
| TelegramBot::DefaultApi | send_venue | POST /sendVenue | sendVenue |
| TelegramBot::DefaultApi | send_video | POST /sendVideo | sendVideo |
| TelegramBot::DefaultApi | send_video_note | POST /sendVideoNote | sendVideoNote |
| TelegramBot::DefaultApi | send_voice | POST /sendVoice | sendVoice |
| TelegramBot::DefaultApi | set_chat_administrator_custom_title | POST /setChatAdministratorCustomTitle | setChatAdministratorCustomTitle |
| TelegramBot::DefaultApi | set_chat_description | POST /setChatDescription | setChatDescription |
| TelegramBot::DefaultApi | set_chat_menu_button | POST /setChatMenuButton | setChatMenuButton |
| TelegramBot::DefaultApi | set_chat_permissions | POST /setChatPermissions | setChatPermissions |
| TelegramBot::DefaultApi | set_chat_photo | POST /setChatPhoto | setChatPhoto |
| TelegramBot::DefaultApi | set_chat_sticker_set | POST /setChatStickerSet | setChatStickerSet |
| TelegramBot::DefaultApi | set_chat_title | POST /setChatTitle | setChatTitle |
| TelegramBot::DefaultApi | set_custom_emoji_sticker_set_thumbnail | POST /setCustomEmojiStickerSetThumbnail | setCustomEmojiStickerSetThumbnail |
| TelegramBot::DefaultApi | set_game_score | POST /setGameScore | setGameScore |
| TelegramBot::DefaultApi | set_message_reaction | POST /setMessageReaction | setMessageReaction |
| TelegramBot::DefaultApi | set_my_commands | POST /setMyCommands | setMyCommands |
| TelegramBot::DefaultApi | set_my_default_administrator_rights | POST /setMyDefaultAdministratorRights | setMyDefaultAdministratorRights |
| TelegramBot::DefaultApi | set_my_description | POST /setMyDescription | setMyDescription |
| TelegramBot::DefaultApi | set_my_name | POST /setMyName | setMyName |
| TelegramBot::DefaultApi | set_my_short_description | POST /setMyShortDescription | setMyShortDescription |
| TelegramBot::DefaultApi | set_passport_data_errors | POST /setPassportDataErrors | setPassportDataErrors |
| TelegramBot::DefaultApi | set_sticker_emoji_list | POST /setStickerEmojiList | setStickerEmojiList |
| TelegramBot::DefaultApi | set_sticker_keywords | POST /setStickerKeywords | setStickerKeywords |
| TelegramBot::DefaultApi | set_sticker_mask_position | POST /setStickerMaskPosition | setStickerMaskPosition |
| TelegramBot::DefaultApi | set_sticker_position_in_set | POST /setStickerPositionInSet | setStickerPositionInSet |
| TelegramBot::DefaultApi | set_sticker_set_thumbnail | POST /setStickerSetThumbnail | setStickerSetThumbnail |
| TelegramBot::DefaultApi | set_sticker_set_title | POST /setStickerSetTitle | setStickerSetTitle |
| TelegramBot::DefaultApi | set_webhook | POST /setWebhook | setWebhook |
| TelegramBot::DefaultApi | stop_message_live_location | POST /stopMessageLiveLocation | stopMessageLiveLocation |
| TelegramBot::DefaultApi | stop_poll | POST /stopPoll | stopPoll |
| TelegramBot::DefaultApi | unban_chat_member | POST /unbanChatMember | unbanChatMember |
| TelegramBot::DefaultApi | unban_chat_sender_chat | POST /unbanChatSenderChat | unbanChatSenderChat |
| TelegramBot::DefaultApi | unhide_general_forum_topic | POST /unhideGeneralForumTopic | unhideGeneralForumTopic |
| TelegramBot::DefaultApi | unpin_all_chat_messages | POST /unpinAllChatMessages | unpinAllChatMessages |
| TelegramBot::DefaultApi | unpin_all_forum_topic_messages | POST /unpinAllForumTopicMessages | unpinAllForumTopicMessages |
| TelegramBot::DefaultApi | unpin_all_general_forum_topic_messages | POST /unpinAllGeneralForumTopicMessages | unpinAllGeneralForumTopicMessages |
| TelegramBot::DefaultApi | unpin_chat_message | POST /unpinChatMessage | unpinChatMessage |
| TelegramBot::DefaultApi | upload_sticker_file | POST /uploadStickerFile | uploadStickerFile |
Documentation for Models
- TelegramBot::Animation
- TelegramBot::AnswerWebAppQuery200Response
- TelegramBot::Audio
- TelegramBot::Birthdate
- TelegramBot::BotCommand
- TelegramBot::BotCommandScopeAllChatAdministrators
- TelegramBot::BotCommandScopeAllGroupChats
- TelegramBot::BotCommandScopeAllPrivateChats
- TelegramBot::BotCommandScopeChat
- TelegramBot::BotCommandScopeChatAdministrators
- TelegramBot::BotCommandScopeChatMember
- TelegramBot::BotCommandScopeDefault
- TelegramBot::BotDescription
- TelegramBot::BotName
- TelegramBot::BotShortDescription
- TelegramBot::BusinessConnection
- TelegramBot::BusinessIntro
- TelegramBot::BusinessLocation
- TelegramBot::BusinessMessagesDeleted
- TelegramBot::BusinessOpeningHours
- TelegramBot::BusinessOpeningHoursInterval
- TelegramBot::CallbackQuery
- TelegramBot::Chat
- TelegramBot::ChatAdministratorRights
- TelegramBot::ChatBoost
- TelegramBot::ChatBoostAdded
- TelegramBot::ChatBoostRemoved
- TelegramBot::ChatBoostSourceGiftCode
- TelegramBot::ChatBoostSourceGiveaway
- TelegramBot::ChatBoostSourcePremium
- TelegramBot::ChatBoostUpdated
- TelegramBot::ChatInviteLink
- TelegramBot::ChatJoinRequest
- TelegramBot::ChatLocation
- TelegramBot::ChatMemberAdministrator
- TelegramBot::ChatMemberBanned
- TelegramBot::ChatMemberLeft
- TelegramBot::ChatMemberMember
- TelegramBot::ChatMemberOwner
- TelegramBot::ChatMemberRestricted
- TelegramBot::ChatMemberUpdated
- TelegramBot::ChatPermissions
- TelegramBot::ChatPhoto
- TelegramBot::ChatShared
- TelegramBot::ChosenInlineResult
- TelegramBot::Contact
- TelegramBot::CopyMessage200Response
- TelegramBot::CreateChatInviteLink200Response
- TelegramBot::CreateForumTopic200Response
- TelegramBot::Dice
- TelegramBot::Document
- TelegramBot::EditMessageText200Response
- TelegramBot::EditMessageText200ResponseResultValue
- TelegramBot::EncryptedCredentials
- TelegramBot::EncryptedPassportElement
- TelegramBot::ExportChatInviteLink200Response
- TelegramBot::ExternalReplyInfo
- TelegramBot::File
- TelegramBot::ForceReply
- TelegramBot::ForumTopic
- TelegramBot::ForumTopicCreated
- TelegramBot::ForumTopicEdited
- TelegramBot::ForwardMessages200Response
- TelegramBot::Game
- TelegramBot::GameHighScore
- TelegramBot::GetBusinessConnection200Response
- TelegramBot::GetChat200Response
- TelegramBot::GetChatAdministrators200Response
- TelegramBot::GetChatMember200Response
- TelegramBot::GetChatMemberCount200Response
- TelegramBot::GetChatMenuButton200Response
- TelegramBot::GetFile200Response
- TelegramBot::GetForumTopicIconStickers200Response
- TelegramBot::GetGameHighScores200Response
- TelegramBot::GetMe200Response
- TelegramBot::GetMyCommands200Response
- TelegramBot::GetMyDefaultAdministratorRights200Response
- TelegramBot::GetMyDescription200Response
- TelegramBot::GetMyName200Response
- TelegramBot::GetMyShortDescription200Response
- TelegramBot::GetStickerSet200Response
- TelegramBot::GetUpdates200Response
- TelegramBot::GetUpdates4XXResponse
- TelegramBot::GetUserChatBoosts200Response
- TelegramBot::GetUserProfilePhotos200Response
- TelegramBot::GetWebhookInfo200Response
- TelegramBot::Giveaway
- TelegramBot::GiveawayCompleted
- TelegramBot::GiveawayWinners
- TelegramBot::InaccessibleMessage
- TelegramBot::InlineKeyboardButton
- TelegramBot::InlineKeyboardMarkup
- TelegramBot::InlineQuery
- TelegramBot::InlineQueryResultArticle
- TelegramBot::InlineQueryResultAudio
- TelegramBot::InlineQueryResultCachedAudio
- TelegramBot::InlineQueryResultCachedDocument
- TelegramBot::InlineQueryResultCachedGif
- TelegramBot::InlineQueryResultCachedMpeg4Gif
- TelegramBot::InlineQueryResultCachedPhoto
- TelegramBot::InlineQueryResultCachedSticker
- TelegramBot::InlineQueryResultCachedVideo
- TelegramBot::InlineQueryResultCachedVoice
- TelegramBot::InlineQueryResultContact
- TelegramBot::InlineQueryResultDocument
- TelegramBot::InlineQueryResultGame
- TelegramBot::InlineQueryResultGif
- TelegramBot::InlineQueryResultLocation
- TelegramBot::InlineQueryResultMpeg4Gif
- TelegramBot::InlineQueryResultPhoto
- TelegramBot::InlineQueryResultVenue
- TelegramBot::InlineQueryResultVideo
- TelegramBot::InlineQueryResultVoice
- TelegramBot::InlineQueryResultsButton
- TelegramBot::InputContactMessageContent
- TelegramBot::InputInvoiceMessageContent
- TelegramBot::InputLocationMessageContent
- TelegramBot::InputMediaAnimation
- TelegramBot::InputMediaAudio
- TelegramBot::InputMediaDocument
- TelegramBot::InputMediaPhoto
- TelegramBot::InputMediaVideo
- TelegramBot::InputSticker
- TelegramBot::InputTextMessageContent
- TelegramBot::InputVenueMessageContent
- TelegramBot::Invoice
- TelegramBot::KeyboardButton
- TelegramBot::KeyboardButtonPollType
- TelegramBot::KeyboardButtonRequestChat
- TelegramBot::KeyboardButtonRequestUsers
- TelegramBot::LabeledPrice
- TelegramBot::LinkPreviewOptions
- TelegramBot::Location
- TelegramBot::LoginUrl
- TelegramBot::MaskPosition
- TelegramBot::MenuButtonCommands
- TelegramBot::MenuButtonDefault
- TelegramBot::MenuButtonWebApp
- TelegramBot::Message
- TelegramBot::MessageAutoDeleteTimerChanged
- TelegramBot::MessageEntity
- TelegramBot::MessageId
- TelegramBot::MessageOriginChannel
- TelegramBot::MessageOriginChat
- TelegramBot::MessageOriginHiddenUser
- TelegramBot::MessageOriginUser
- TelegramBot::MessageReactionCountUpdated
- TelegramBot::MessageReactionUpdated
- TelegramBot::OrderInfo
- TelegramBot::PassportData
- TelegramBot::PassportElementErrorDataField
- TelegramBot::PassportElementErrorFile
- TelegramBot::PassportElementErrorFiles
- TelegramBot::PassportElementErrorFrontSide
- TelegramBot::PassportElementErrorReverseSide
- TelegramBot::PassportElementErrorSelfie
- TelegramBot::PassportElementErrorTranslationFile
- TelegramBot::PassportElementErrorTranslationFiles
- TelegramBot::PassportElementErrorUnspecified
- TelegramBot::PassportFile
- TelegramBot::PhotoSize
- TelegramBot::Poll
- TelegramBot::PollAnswer
- TelegramBot::PollOption
- TelegramBot::PreCheckoutQuery
- TelegramBot::ProximityAlertTriggered
- TelegramBot::ReactionCount
- TelegramBot::ReactionTypeCustomEmoji
- TelegramBot::ReactionTypeEmoji
- TelegramBot::ReplyKeyboardMarkup
- TelegramBot::ReplyKeyboardRemove
- TelegramBot::ReplyParameters
- TelegramBot::ResponseParameters
- TelegramBot::SendMediaGroup200Response
- TelegramBot::SendMediaGroupMediaParameterValue
- TelegramBot::SendMessage200Response
- TelegramBot::SendMessageChatIdParameterValue
- TelegramBot::SendMessageReplyMarkupParameterValue
- TelegramBot::SendPhotoPhotoParameterValue
- TelegramBot::SentWebAppMessage
- TelegramBot::SetWebhook200Response
- TelegramBot::SharedUser
- TelegramBot::ShippingAddress
- TelegramBot::ShippingOption
- TelegramBot::ShippingQuery
- TelegramBot::Sticker
- TelegramBot::StickerSet
- TelegramBot::StopPoll200Response
- TelegramBot::Story
- TelegramBot::SuccessfulPayment
- TelegramBot::SwitchInlineQueryChosenChat
- TelegramBot::TextQuote
- TelegramBot::Update
- TelegramBot::User
- TelegramBot::UserChatBoosts
- TelegramBot::UserProfilePhotos
- TelegramBot::UsersShared
- TelegramBot::Venue
- TelegramBot::Video
- TelegramBot::VideoChatEnded
- TelegramBot::VideoChatParticipantsInvited
- TelegramBot::VideoChatScheduled
- TelegramBot::VideoNote
- TelegramBot::Voice
- TelegramBot::WebAppData
- TelegramBot::WebAppInfo
- TelegramBot::WebhookInfo
- TelegramBot::WriteAccessAllowed
Documentation for Authorization
Endpoints do not require authorization.