|
Telebot 9.4
Library for Telegram bot API
|
Simplified APIs to create telegram bot. More...
Files | |
| file | telebot-common.h |
| This file contains telegram bot common defintions. | |
| file | telebot-forums.h |
| This file contains forums feature of telegram bot. | |
| file | telebot-games.h |
| This file contains games feature of telegram bot. | |
| file | telebot-inline.h |
| This file contains inline mode feature of telegram bot. | |
| file | telebot-methods.h |
| This file contains methods used to create telegram bot. | |
| file | telebot-passport.h |
| This file contains Telegram Passport feature of telegram bot. | |
| file | telebot-payments.h |
| This file contains payments feature of telegram bot. | |
| file | telebot-stickers.h |
| This file contains stickers feature of telegram bot. | |
| file | telebot-types.h |
| This file contains types used to create telegram bot. | |
| file | telebot.h |
| This file includes all the header files of the telegram bot library. | |
Classes | |
| struct | telebot_sticker_set |
| This object represents a sticker set. More... | |
| struct | telebot_birthdate |
| Describes the birthdate of a user. More... | |
| struct | telebot_business_intro |
| Contains information about the start page settings of a Telegram Business account. More... | |
| struct | telebot_business_location |
| Contains information about the location of a Telegram Business account. More... | |
| struct | telebot_business_opening_hours_interval |
| Describes an interval of time during which a business is open. More... | |
| struct | telebot_business_opening_hours |
| Describes the opening hours of a business. More... | |
| struct | telebot_business_bot_rights |
| Represents the rights of a business bot. More... | |
| struct | telebot_business_connection |
| Describes the connection of the bot with a business account. More... | |
| struct | telebot_business_messages_deleted |
| This object is received when messages are deleted from a connected business account. More... | |
| struct | telebot_user |
| This object represents a Telegram user or bot. More... | |
| struct | telebot_chat |
| This object represents a chat. More... | |
| struct | telebot_game |
| This object represents a game. More... | |
| struct | telebot_shipping_address |
| This object represents a shipping address. More... | |
| struct | telebot_order_info |
| This object represents information about an order. More... | |
| struct | telebot_invoice |
| This object contains basic information about an invoice. More... | |
| struct | telebot_successful_payment |
| This object contains basic information about a successful payment. More... | |
| struct | telebot_passport_file |
| This object represents an internal identifier of a user in Telegram Passport. More... | |
| struct | telebot_encrypted_passport_element |
| This object represents one element of the Telegram Passport data. More... | |
| struct | telebot_encrypted_credentials |
| This object represents credentials required to decrypt the data. More... | |
| struct | telebot_passport_data |
| Contains information about Telegram Passport data which was shared with the bot by the user. More... | |
| struct | telebot_proximity_alert_triggered |
| This object represents a service message about a user in the chat triggered another user's proximity alert while sharing Live Location. More... | |
| struct | telebot_forum_topic_created |
| This object represents a service message about a new forum topic created in the chat. More... | |
| struct | telebot_forum_topic_closed |
| This object represents a service message about a forum topic closed in the chat. More... | |
| struct | telebot_forum_topic_reopened |
| This object represents a service message about a forum topic reopened in the chat. More... | |
| struct | telebot_video_chat_scheduled |
| This object represents a service message about a video chat scheduled in the chat. More... | |
| struct | telebot_video_chat_started |
| This object represents a service message about a video chat started in the chat. More... | |
| struct | telebot_video_chat_ended |
| This object represents a service message about a video chat ended in the chat. More... | |
| struct | telebot_video_chat_participants_invited |
| This object represents a service message about new members invited to a video chat. More... | |
| struct | telebot_web_app_data |
| This object represents data sent by a Web App to the bot. More... | |
| struct | telebot_callback_game |
| A placeholder, currently holds no information. Use BotFather to set up your game. More... | |
| struct | telebot_login_url |
| This object represents a parameter of the inline keyboard button used to automatically authorize a user. More... | |
| struct | telebot_switch_inline_query_chosen_chat |
| This object represents an inline button that switches the current user to inline mode in a chosen chat. More... | |
| struct | telebot_copy_text_button |
| This object represents an inline keyboard button that copies specified text to the clipboard. More... | |
| struct | telebot_inline_keyboard_button |
| This object represents one button of an inline keyboard. You must use exactly one of the optional fields. More... | |
| struct | telebot_inline_keyboard_markup |
| This object represents an inline keyboard that appears right next to the message it belongs to. More... | |
| struct | telebot_forum_topic_edited |
| This object represents a service message about a forum topic edited in the chat. More... | |
| struct | telebot_general_forum_topic_hidden |
| This object represents a service message about a general forum topic hidden in the chat. More... | |
| struct | telebot_general_forum_topic_unhidden |
| This object represents a service message about a general forum topic unhidden in the chat. More... | |
| struct | telebot_write_access_allowed |
| This object represents a service message about a user allowing a bot to write messages after adding the bot to the attachment menu or launching a Web App from a link. More... | |
| struct | telebot_user_shared |
| This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button. More... | |
| struct | telebot_chat_shared |
| This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button. More... | |
| struct | telebot_chat_invite_link |
| This object represents a chat invite link. More... | |
| struct | telebot_chat_member_updated |
| This object represents changes in the status of a chat member. More... | |
| struct | telebot_chat_join_request |
| This object represents a join request sent to a chat. More... | |
| struct | telebot_message_reaction_updated |
| This object represents a change of a reaction on a message performed by a user. More... | |
| struct | telebot_message_reaction_count_updated |
| This object represents reaction changes on a message with anonymous reactions. More... | |
| struct | telebot_reaction_type |
| This object represents a reaction type. More... | |
| struct | telebot_reaction_count |
| This object represents a reaction count. More... | |
| struct | telebot_chat_boost_updated |
| This object represents a boost added to a chat. More... | |
| struct | telebot_chat_boost |
| This object contains information about a chat boost. More... | |
| struct | telebot_chat_boost_source |
| This object represents the source of a chat boost. More... | |
| struct | telebot_chat_boost_removed |
| This object represents a boost removed from a chat. More... | |
| struct | telebot_message_origin |
| This object describes the origin of a message. More... | |
| struct | telebot_text_quote |
| This object contains information about the quoted part of a message that is replied to by the given message. More... | |
| struct | telebot_story |
| This object contains information about a story. More... | |
| struct | telebot_external_reply_info |
| This object contains information about the message that is being replied to, which may come from another chat or forum topic. More... | |
| struct | telebot_link_preview_options |
| Describes the options used for link preview generation. More... | |
| struct | telebot_paid_media |
| This object describes paid media. More... | |
| struct | telebot_paid_media_info |
| Describes the paid media added to a message. More... | |
| struct | telebot_giveaway |
| This object represents a message about a scheduled giveaway. More... | |
| struct | telebot_giveaway_winners |
| This object represents a message about the completion of a giveaway with public winners. More... | |
| struct | telebot_refunded_payment |
| This object represents a service message about a refunded payment. More... | |
| struct | telebot_users_shared |
| This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button. More... | |
| struct | telebot_shared_user |
| This object contains information about a user that was shared with the bot. More... | |
| struct | telebot_gift |
| This object represents a gift that can be sent by the bot. More... | |
| struct | telebot_gift_info |
| Describes a regular gift that was sent or received. More... | |
| struct | telebot_unique_gift_info |
| Describes a unique gift that was sent or received. More... | |
| struct | telebot_unique_gift |
| This object describes a unique gift that was upgraded from a regular gift. More... | |
| struct | telebot_chat_boost_added |
| This object represents a service message about a user boosting a chat. More... | |
| struct | telebot_chat_background |
| This object represents a chat background. More... | |
| struct | telebot_giveaway_created |
| This object represents a service message about the creation of a scheduled giveaway. More... | |
| struct | telebot_giveaway_completed |
| This object represents a service message about the completion of a giveaway without public winners. More... | |
| struct | telebot_star_amount |
| Describes an amount of Telegram Stars. More... | |
| struct | telebot_affiliate_info |
| Contains information about the affiliate that received a commission. More... | |
| struct | telebot_revenue_withdrawal_state |
| This object describes the state of a revenue withdrawal operation. More... | |
| struct | telebot_transaction_partner |
| This object describes the source of a transaction. More... | |
| struct | telebot_star_transaction |
| Describes a Telegram Star transaction. More... | |
| struct | telebot_star_transactions |
| Contains a list of Telegram Star transactions. More... | |
| struct | telebot_paid_media_purchased |
| This object contains information about a paid media purchase. More... | |
| struct | telebot_passport_element_error |
| This object represents an error in the Telegram Passport element. More... | |
| struct | telebot_game_high_score |
| This object represents a game high score row. More... | |
| struct | telebot_message |
| This object represents a message. More... | |
| struct | telebot_message_entity |
| This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. More... | |
| struct | telebot_photo |
| This object represents one size of a photo or a file / sticker thumbnail. More... | |
| struct | telebot_audio |
| This object represents an audio file to be treated as music by the Telegram clients. More... | |
| struct | telebot_gifts |
| This object represent a list of gifts. More... | |
| struct | telebot_user_profile_audios |
| This object represents a list of user profile audios. More... | |
| struct | telebot_user_gift |
| This object represents a gift received by a user. More... | |
| struct | telebot_user_gifts |
| This object represents a list of gifts received by a user. More... | |
| struct | telebot_user_chat_boosts |
| This object represents a list of user chat boosts. More... | |
| struct | telebot_document |
| This object represents a general file (as opposed to photos, voice messages and audio files). More... | |
| struct | telebot_video |
| This object represents a video file. More... | |
| struct | telebot_animation |
| This object represents a video file. More... | |
| struct | telebot_voice |
| This object represents a voice note. More... | |
| struct | telebot_video_note |
| This object represents a video message (available in Telegram apps as of v.4.0). More... | |
| struct | telebot_contact |
| This object represents a phone contact. More... | |
| struct | telebot_location |
| This object represents a point on the map. More... | |
| struct | telebot_venue |
| This object represents a venue. More... | |
| struct | telebot_poll_option |
| This object contains information about one answer option in a poll. More... | |
| struct | telebot_poll_answer |
| This object represents an answer of a user in a non-anonymous poll. More... | |
| struct | telebot_poll |
| This object contains information about a poll. More... | |
| struct | telebot_dice |
| This object represents a dice with random value from 1 to 6. More... | |
| struct | telebot_user_profile_photos |
| This object represent a user's profile pictures. More... | |
| struct | telebot_file |
| This object represents a file ready to be downloaded. More... | |
| struct | telebot_keyboard_button_poll_type |
| This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed. More... | |
| struct | telebot_keyboard_button_request_users |
| This object defines the criteria used to request suitable users. More... | |
| struct | telebot_keyboard_button_request_chat |
| This object defines the criteria used to request a suitable chat. More... | |
| struct | telebot_web_app_info |
| Describes a Web App. More... | |
| struct | telebot_keyboard_button |
| This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields request_contact, request_location, and request_poll are mutually exclusive. More... | |
| struct | telebot_reply_keyboard_markup |
| This object represents a custom keyboard with reply options. More... | |
| struct | telebot_reply_keyboard_remove |
| Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see telebot_reply_keyboard_markup_t). More... | |
| struct | telebot_callback_query |
| This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present. More... | |
| struct | telebot_force_reply |
| Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped ’Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. More... | |
| struct | telebot_chat_photo |
| This object represents a chat photo. More... | |
| struct | telebot_chat_member |
| This object contains information about one member of a chat. More... | |
| struct | telebot_chat_permissions |
| Describes actions that a non-administrator user is allowed to take in a chat. More... | |
| struct | telebot_bot_command |
| This object represents a bot command. More... | |
| struct | telebot_response_paramters |
| Contains information about why a request was unsuccessful. More... | |
| struct | telebot_inline_query |
| This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results. More... | |
| struct | telebot_chosen_inline_result |
| Represents a result of an inline query that was chosen by the user and sent to their chat partner. More... | |
| struct | telebot_shipping_query |
| This object contains information about an incoming shipping query. More... | |
| struct | telebot_pre_checkout_query |
| This object contains information about an incoming pre-checkout query. More... | |
| struct | telebot_mask_position |
| This object describes the position on faces where a mask should be placed by default. More... | |
| struct | telebot_sticker |
| This object represents a sticker. More... | |
| struct | telebot_forum_topic |
| This object represents a forum topic. More... | |
| struct | telebot_prepared_inline_message |
| This object represents a prepared inline message. More... | |
| struct | telebot_sent_web_app_message |
| This object represents a message sent via a Web App. More... | |
| struct | telebot_update |
| This object represents an incoming update. More... | |
| struct | telebot_webhook_info |
| Thi object represetns information about the current status of a webhook. More... | |
| struct | telebot_chat_location |
| Thi object represetns information about the current status of a webhook. More... | |
| struct | telebot_message_auto_delete_timer_changed |
| This object represents a service message about a change in auto-delete timer settings. More... | |
Typedefs | |
| typedef struct telebot_sticker_set | telebot_sticker_set_t |
| This object represents a sticker set. | |
| typedef enum telebot_update_type | telebot_update_type_e |
| Enumerations of telegram update types. | |
| typedef struct telebot_birthdate | telebot_birthdate_t |
| Describes the birthdate of a user. | |
| typedef struct telebot_business_intro | telebot_business_intro_t |
| Contains information about the start page settings of a Telegram Business account. | |
| typedef struct telebot_business_location | telebot_business_location_t |
| Contains information about the location of a Telegram Business account. | |
| typedef struct telebot_business_opening_hours_interval | telebot_business_opening_hours_interval_t |
| Describes an interval of time during which a business is open. | |
| typedef struct telebot_business_opening_hours | telebot_business_opening_hours_t |
| Describes the opening hours of a business. | |
| typedef struct telebot_business_bot_rights | telebot_business_bot_rights_t |
| Represents the rights of a business bot. | |
| typedef struct telebot_business_connection | telebot_business_connection_t |
| Describes the connection of the bot with a business account. | |
| typedef struct telebot_business_messages_deleted | telebot_business_messages_deleted_t |
| This object is received when messages are deleted from a connected business account. | |
| typedef struct telebot_user | telebot_user_t |
| This object represents a Telegram user or bot. | |
| typedef struct telebot_chat | telebot_chat_t |
| This object represents a chat. | |
| typedef struct telebot_game | telebot_game_t |
| This object represents a game. | |
| typedef struct telebot_shipping_address | telebot_shipping_address_t |
| This object represents a shipping address. | |
| typedef struct telebot_order_info | telebot_order_info_t |
| This object represents information about an order. | |
| typedef struct telebot_invoice | telebot_invoice_t |
| This object contains basic information about an invoice. | |
| typedef struct telebot_successful_payment | telebot_successful_payment_t |
| This object contains basic information about a successful payment. | |
| typedef struct telebot_passport_file | telebot_passport_file_t |
| This object represents an internal identifier of a user in Telegram Passport. | |
| typedef struct telebot_encrypted_passport_element | telebot_encrypted_passport_element_t |
| This object represents one element of the Telegram Passport data. | |
| typedef struct telebot_encrypted_credentials | telebot_encrypted_credentials_t |
| This object represents credentials required to decrypt the data. | |
| typedef struct telebot_passport_data | telebot_passport_data_t |
| Contains information about Telegram Passport data which was shared with the bot by the user. | |
| typedef struct telebot_proximity_alert_triggered | telebot_proximity_alert_triggered_t |
| This object represents a service message about a user in the chat triggered another user's proximity alert while sharing Live Location. | |
| typedef struct telebot_forum_topic_created | telebot_forum_topic_created_t |
| This object represents a service message about a new forum topic created in the chat. | |
| typedef struct telebot_forum_topic_closed | telebot_forum_topic_closed_t |
| This object represents a service message about a forum topic closed in the chat. | |
| typedef struct telebot_forum_topic_reopened | telebot_forum_topic_reopened_t |
| This object represents a service message about a forum topic reopened in the chat. | |
| typedef struct telebot_video_chat_scheduled | telebot_video_chat_scheduled_t |
| This object represents a service message about a video chat scheduled in the chat. | |
| typedef struct telebot_video_chat_started | telebot_video_chat_started_t |
| This object represents a service message about a video chat started in the chat. | |
| typedef struct telebot_video_chat_ended | telebot_video_chat_ended_t |
| This object represents a service message about a video chat ended in the chat. | |
| typedef struct telebot_video_chat_participants_invited | telebot_video_chat_participants_invited_t |
| This object represents a service message about new members invited to a video chat. | |
| typedef struct telebot_web_app_data | telebot_web_app_data_t |
| This object represents data sent by a Web App to the bot. | |
| typedef struct telebot_callback_game | telebot_callback_game_t |
| A placeholder, currently holds no information. Use BotFather to set up your game. | |
| typedef struct telebot_login_url | telebot_login_url_t |
| This object represents a parameter of the inline keyboard button used to automatically authorize a user. | |
| typedef struct telebot_switch_inline_query_chosen_chat | telebot_switch_inline_query_chosen_chat_t |
| This object represents an inline button that switches the current user to inline mode in a chosen chat. | |
| typedef struct telebot_copy_text_button | telebot_copy_text_button_t |
| This object represents an inline keyboard button that copies specified text to the clipboard. | |
| typedef struct telebot_inline_keyboard_button | telebot_inline_keyboard_button_t |
| This object represents one button of an inline keyboard. You must use exactly one of the optional fields. | |
| typedef struct telebot_inline_keyboard_markup | telebot_inline_keyboard_markup_t |
| This object represents an inline keyboard that appears right next to the message it belongs to. | |
| typedef struct telebot_forum_topic_edited | telebot_forum_topic_edited_t |
| This object represents a service message about a forum topic edited in the chat. | |
| typedef struct telebot_general_forum_topic_hidden | telebot_general_forum_topic_hidden_t |
| This object represents a service message about a general forum topic hidden in the chat. | |
| typedef struct telebot_general_forum_topic_unhidden | telebot_general_forum_topic_unhidden_t |
| This object represents a service message about a general forum topic unhidden in the chat. | |
| typedef struct telebot_write_access_allowed | telebot_write_access_allowed_t |
| This object represents a service message about a user allowing a bot to write messages after adding the bot to the attachment menu or launching a Web App from a link. | |
| typedef struct telebot_user_shared | telebot_user_shared_t |
| This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button. | |
| typedef struct telebot_chat_shared | telebot_chat_shared_t |
| This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button. | |
| typedef struct telebot_chat_invite_link | telebot_chat_invite_link_t |
| This object represents a chat invite link. | |
| typedef struct telebot_chat_member_updated | telebot_chat_member_updated_t |
| This object represents changes in the status of a chat member. | |
| typedef struct telebot_chat_join_request | telebot_chat_join_request_t |
| This object represents a join request sent to a chat. | |
| typedef struct telebot_message_reaction_updated | telebot_message_reaction_updated_t |
| This object represents a change of a reaction on a message performed by a user. | |
| typedef struct telebot_message_reaction_count_updated | telebot_message_reaction_count_updated_t |
| This object represents reaction changes on a message with anonymous reactions. | |
| typedef struct telebot_reaction_type | telebot_reaction_type_t |
| This object represents a reaction type. | |
| typedef struct telebot_reaction_count | telebot_reaction_count_t |
| This object represents a reaction count. | |
| typedef struct telebot_chat_boost_updated | telebot_chat_boost_updated_t |
| This object represents a boost added to a chat. | |
| typedef struct telebot_chat_boost | telebot_chat_boost_t |
| This object contains information about a chat boost. | |
| typedef struct telebot_chat_boost_source | telebot_chat_boost_source_t |
| This object represents the source of a chat boost. | |
| typedef struct telebot_chat_boost_removed | telebot_chat_boost_removed_t |
| This object represents a boost removed from a chat. | |
| typedef struct telebot_message_origin | telebot_message_origin_t |
| This object describes the origin of a message. | |
| typedef struct telebot_text_quote | telebot_text_quote_t |
| This object contains information about the quoted part of a message that is replied to by the given message. | |
| typedef struct telebot_story | telebot_story_t |
| This object contains information about a story. | |
| typedef struct telebot_external_reply_info | telebot_external_reply_info_t |
| This object contains information about the message that is being replied to, which may come from another chat or forum topic. | |
| typedef struct telebot_link_preview_options | telebot_link_preview_options_t |
| Describes the options used for link preview generation. | |
| typedef struct telebot_paid_media | telebot_paid_media_t |
| This object describes paid media. | |
| typedef struct telebot_paid_media_info | telebot_paid_media_info_t |
| Describes the paid media added to a message. | |
| typedef struct telebot_giveaway | telebot_giveaway_t |
| This object represents a message about a scheduled giveaway. | |
| typedef struct telebot_giveaway_winners | telebot_giveaway_winners_t |
| This object represents a message about the completion of a giveaway with public winners. | |
| typedef struct telebot_refunded_payment | telebot_refunded_payment_t |
| This object represents a service message about a refunded payment. | |
| typedef struct telebot_users_shared | telebot_users_shared_t |
| This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button. | |
| typedef struct telebot_shared_user | telebot_shared_user_t |
| This object contains information about a user that was shared with the bot. | |
| typedef struct telebot_gift | telebot_gift_t |
| This object represents a gift that can be sent by the bot. | |
| typedef struct telebot_gift_info | telebot_gift_info_t |
| Describes a regular gift that was sent or received. | |
| typedef struct telebot_unique_gift_info | telebot_unique_gift_info_t |
| Describes a unique gift that was sent or received. | |
| typedef struct telebot_unique_gift | telebot_unique_gift_t |
| This object describes a unique gift that was upgraded from a regular gift. | |
| typedef struct telebot_chat_boost_added | telebot_chat_boost_added_t |
| This object represents a service message about a user boosting a chat. | |
| typedef struct telebot_chat_background | telebot_chat_background_t |
| This object represents a chat background. | |
| typedef struct telebot_giveaway_created | telebot_giveaway_created_t |
| This object represents a service message about the creation of a scheduled giveaway. | |
| typedef struct telebot_giveaway_completed | telebot_giveaway_completed_t |
| This object represents a service message about the completion of a giveaway without public winners. | |
| typedef struct telebot_star_amount | telebot_star_amount_t |
| Describes an amount of Telegram Stars. | |
| typedef struct telebot_affiliate_info | telebot_affiliate_info_t |
| Contains information about the affiliate that received a commission. | |
| typedef struct telebot_revenue_withdrawal_state | telebot_revenue_withdrawal_state_t |
| This object describes the state of a revenue withdrawal operation. | |
| typedef struct telebot_transaction_partner | telebot_transaction_partner_t |
| This object describes the source of a transaction. | |
| typedef struct telebot_star_transaction | telebot_star_transaction_t |
| Describes a Telegram Star transaction. | |
| typedef struct telebot_star_transactions | telebot_star_transactions_t |
| Contains a list of Telegram Star transactions. | |
| typedef struct telebot_paid_media_purchased | telebot_paid_media_purchased_t |
| This object contains information about a paid media purchase. | |
| typedef struct telebot_passport_element_error | telebot_passport_element_error_t |
| This object represents an error in the Telegram Passport element. | |
| typedef struct telebot_game_high_score | telebot_game_high_score_t |
| This object represents a game high score row. | |
| typedef struct telebot_message | telebot_message_t |
| This object represents a message. | |
| typedef struct telebot_message_entity | telebot_message_entity_t |
| This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc. | |
| typedef struct telebot_photo | telebot_photo_t |
| This object represents one size of a photo or a file / sticker thumbnail. | |
| typedef struct telebot_audio | telebot_audio_t |
| This object represents an audio file to be treated as music by the Telegram clients. | |
| typedef struct telebot_gifts | telebot_gifts_t |
| This object represent a list of gifts. | |
| typedef struct telebot_user_profile_audios | telebot_user_profile_audios_t |
| This object represents a list of user profile audios. | |
| typedef struct telebot_user_gift | telebot_user_gift_t |
| This object represents a gift received by a user. | |
| typedef struct telebot_user_gifts | telebot_user_gifts_t |
| This object represents a list of gifts received by a user. | |
| typedef struct telebot_user_chat_boosts | telebot_user_chat_boosts_t |
| This object represents a list of user chat boosts. | |
| typedef struct telebot_document | telebot_document_t |
| This object represents a general file (as opposed to photos, voice messages and audio files). | |
| typedef struct telebot_video | telebot_video_t |
| This object represents a video file. | |
| typedef struct telebot_animation | telebot_animation_t |
| This object represents a video file. | |
| typedef struct telebot_voice | telebot_voice_t |
| This object represents a voice note. | |
| typedef struct telebot_video_note | telebot_video_note_t |
| This object represents a video message (available in Telegram apps as of v.4.0). | |
| typedef struct telebot_contact | telebot_contact_t |
| This object represents a phone contact. | |
| typedef struct telebot_location | telebot_location_t |
| This object represents a point on the map. | |
| typedef struct telebot_venue | telebot_venue_t |
| This object represents a venue. | |
| typedef struct telebot_poll_option | telebot_poll_option_t |
| This object contains information about one answer option in a poll. | |
| typedef struct telebot_poll_answer | telebot_poll_answer_t |
| This object represents an answer of a user in a non-anonymous poll. | |
| typedef struct telebot_poll | telebot_poll_t |
| This object contains information about a poll. | |
| typedef struct telebot_dice | telebot_dice_t |
| This object represents a dice with random value from 1 to 6. | |
| typedef struct telebot_user_profile_photos | telebot_user_profile_photos_t |
| This object represent a user's profile pictures. | |
| typedef struct telebot_file | telebot_file_t |
| This object represents a file ready to be downloaded. | |
| typedef struct telebot_keyboard_button_poll_type | telebot_keyboard_button_poll_type_t |
| This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed. | |
| typedef struct telebot_keyboard_button_request_users | telebot_keyboard_button_request_users_t |
| This object defines the criteria used to request suitable users. | |
| typedef struct telebot_keyboard_button_request_chat | telebot_keyboard_button_request_chat_t |
| This object defines the criteria used to request a suitable chat. | |
| typedef struct telebot_web_app_info | telebot_web_app_info_t |
| Describes a Web App. | |
| typedef struct telebot_keyboard_button | telebot_keyboard_button_t |
| This object represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields request_contact, request_location, and request_poll are mutually exclusive. | |
| typedef struct telebot_reply_keyboard_markup | telebot_reply_keyboard_markup_t |
| This object represents a custom keyboard with reply options. | |
| typedef struct telebot_reply_keyboard_remove | telebot_reply_keyboard_remove_t |
| Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see telebot_reply_keyboard_markup_t). | |
| typedef struct telebot_callback_query | telebot_callback_query_t |
| This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present. | |
| typedef struct telebot_force_reply | telebot_force_reply_t |
| Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot's message and tapped ’Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. | |
| typedef struct telebot_chat_photo | telebot_chat_photo_t |
| This object represents a chat photo. | |
| typedef struct telebot_chat_member | telebot_chat_member_t |
| This object contains information about one member of a chat. | |
| typedef struct telebot_chat_permissions | telebot_chat_permissions_t |
| Describes actions that a non-administrator user is allowed to take in a chat. | |
| typedef struct telebot_bot_command | telebot_bot_command_t |
| This object represents a bot command. | |
| typedef struct telebot_response_paramters | telebot_response_paramters_t |
| Contains information about why a request was unsuccessful. | |
| typedef struct telebot_inline_query | telebot_inline_query_t |
| This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results. | |
| typedef struct telebot_chosen_inline_result | telebot_chosen_inline_result_t |
| Represents a result of an inline query that was chosen by the user and sent to their chat partner. | |
| typedef struct telebot_shipping_query | telebot_shipping_query_t |
| This object contains information about an incoming shipping query. | |
| typedef struct telebot_pre_checkout_query | telebot_pre_checkout_query_t |
| This object contains information about an incoming pre-checkout query. | |
| typedef struct telebot_mask_position | telebot_mask_position_t |
| This object describes the position on faces where a mask should be placed by default. | |
| typedef struct telebot_sticker | telebot_sticker_t |
| This object represents a sticker. | |
| typedef struct telebot_forum_topic | telebot_forum_topic_t |
| This object represents a forum topic. | |
| typedef struct telebot_prepared_inline_message | telebot_prepared_inline_message_t |
| This object represents a prepared inline message. | |
| typedef struct telebot_sent_web_app_message | telebot_sent_web_app_message_t |
| This object represents a message sent via a Web App. | |
| typedef struct telebot_update | telebot_update_t |
| This object represents an incoming update. | |
| typedef struct telebot_webhook_info | telebot_webhook_info_t |
| Thi object represetns information about the current status of a webhook. | |
| typedef struct telebot_chat_location | telebot_chat_location_t |
| Thi object represetns information about the current status of a webhook. | |
| typedef struct telebot_message_auto_delete_timer_changed | telebot_message_auto_delete_timer_changed_t |
| This object represents a service message about a change in auto-delete timer settings. | |
| typedef struct telebot_handler * | telebot_handler_t |
| This is opaque object to represent a telebot handler. | |
Functions | |
| telebot_error_e | telebot_create_forum_topic (telebot_handler_t handle, long long int chat_id, const char *name, int icon_color, const char *icon_custom_emoji_id, telebot_forum_topic_t *topic) |
| Use this method to create a topic in a forum supergroup chat. | |
| telebot_error_e | telebot_put_forum_topic (telebot_forum_topic_t *topic) |
| Release forum topic obtained with telebot_create_forum_topic. | |
| telebot_error_e | telebot_edit_forum_topic (telebot_handler_t handle, long long int chat_id, int message_thread_id, const char *name, const char *icon_custom_emoji_id) |
| Use this method to edit name and icon of a topic in a forum supergroup chat. | |
| telebot_error_e | telebot_close_forum_topic (telebot_handler_t handle, long long int chat_id, int message_thread_id) |
| Use this method to close an open topic in a forum supergroup chat. | |
| telebot_error_e | telebot_reopen_forum_topic (telebot_handler_t handle, long long int chat_id, int message_thread_id) |
| Use this method to reopen a closed topic in a forum supergroup chat. | |
| telebot_error_e | telebot_delete_forum_topic (telebot_handler_t handle, long long int chat_id, int message_thread_id) |
| Use this method to delete a forum topic along with all its messages in a forum supergroup chat. | |
| telebot_error_e | telebot_unpin_all_forum_topic_messages (telebot_handler_t handle, long long int chat_id, int message_thread_id) |
| Use this method to unpin all messages in a forum topic. | |
| telebot_error_e | telebot_get_forum_topic_icon_stickers (telebot_handler_t handle, telebot_sticker_t **stickers, int *count) |
| Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. | |
| telebot_error_e | telebot_edit_general_forum_topic (telebot_handler_t handle, long long int chat_id, const char *name) |
| Use this method to edit the name of the 'General' topic in a forum supergroup chat. | |
| telebot_error_e | telebot_close_general_forum_topic (telebot_handler_t handle, long long int chat_id) |
| Use this method to close an open 'General' topic in a forum supergroup chat. | |
| telebot_error_e | telebot_reopen_general_forum_topic (telebot_handler_t handle, long long int chat_id) |
| Use this method to reopen a closed 'General' topic in a forum supergroup chat. | |
| telebot_error_e | telebot_hide_general_forum_topic (telebot_handler_t handle, long long int chat_id) |
| Use this method to hide the 'General' topic in a forum supergroup chat. | |
| telebot_error_e | telebot_unhide_general_forum_topic (telebot_handler_t handle, long long int chat_id) |
| Use this method to unhide the 'General' topic in a forum supergroup chat. | |
| telebot_error_e | telebot_unpin_all_general_forum_topic_messages (telebot_handler_t handle, long long int chat_id) |
| Use this method to unpin all messages in a General forum topic. | |
| telebot_error_e | telebot_send_game (telebot_handler_t handle, long long int chat_id, int message_thread_id, const char *game_short_name, bool disable_notification, bool protect_content, const char *reply_parameters, const char *reply_markup, telebot_message_t *message) |
| Use this method to send a game. | |
| telebot_error_e | telebot_set_game_score (telebot_handler_t handle, long long int user_id, int score, bool force, bool disable_edit_message, long long int chat_id, int message_id, const char *inline_message_id, telebot_message_t *message) |
| Use this method to set the score of the specified user in a game. | |
| telebot_error_e | telebot_get_game_high_scores (telebot_handler_t handle, long long int user_id, long long int chat_id, int message_id, const char *inline_message_id, telebot_game_high_score_t **high_scores, int *count) |
| Use this method to get data for high score tables. | |
| telebot_error_e | telebot_put_game_high_scores (telebot_game_high_score_t *high_scores, int count) |
| Release game high scores obtained with telebot_get_game_high_scores. | |
| telebot_error_e | telebot_answer_inline_query (telebot_handler_t handle, const char *inline_query_id, const char *results, int cache_time, bool is_personal, const char *next_offset, const char *button) |
| Use this method to send answers to an inline query. | |
| telebot_error_e | telebot_save_prepared_inline_message (telebot_handler_t handle, long long int user_id, const char *result, bool allow_user_chats, bool allow_bot_chats, bool allow_group_chats, bool allow_channel_chats, telebot_prepared_inline_message_t *prepared_message) |
| Use this method to save a prepared inline message. | |
| telebot_error_e | telebot_put_prepared_inline_message (telebot_prepared_inline_message_t *prepared_message) |
| Release prepared inline message. | |
| telebot_error_e | telebot_answer_web_app_query (telebot_handler_t handle, const char *web_app_query_id, const char *result, char **inline_message_id) |
| Use this method to send answers to an inline query to a user from a Web App. | |
| telebot_error_e | telebot_create (telebot_handler_t *handle, char *token) |
| Initial function to use telebot APIs. | |
| telebot_error_e | telebot_destroy (telebot_handler_t handle) |
| Final function to use telebo APIs. | |
| telebot_error_e | telebot_set_proxy (telebot_handler_t handle, char *addr, char *auth) |
| Set proxy address to use telebot behind proxy. | |
| telebot_error_e | telebot_get_proxy (telebot_handler_t handle, char **addr) |
| Get proxy address currently used. | |
| telebot_error_e | telebot_get_updates (telebot_handler_t handle, int offset, int limit, int timeout, telebot_update_type_e allowed_updates[], int allowed_updates_count, telebot_update_t **updates, int *count) |
| This function is used to get latest updates. | |
| telebot_error_e | telebot_put_updates (telebot_update_t *updates, int count) |
| This function is used to release memory used for obtained updates. | |
| telebot_error_e | telebot_set_webhook (telebot_handler_t handle, char *url, char *certificate, int max_connections, telebot_update_type_e allowed_updates[], int allowed_updates_count) |
| This function is used to specify a url and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified url, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. | |
| telebot_error_e | telebot_delete_webhook (telebot_handler_t handle) |
| This function is used to remove webhook integration if you decide to switch back to getUpdates. | |
| telebot_error_e | telebot_get_webhook_info (telebot_handler_t handle, telebot_webhook_info_t *info) |
| This function is used to get information about telegram bot itself. | |
| telebot_error_e | telebot_put_webhook_info (telebot_webhook_info_t *info) |
| This function is used to release memory used for obtained information about telegram bot itself. | |
| telebot_error_e | telebot_get_me (telebot_handler_t handle, telebot_user_t *me) |
| This function is used to get information about telegram bot itself. | |
| telebot_error_e | telebot_put_me (telebot_user_t *me) |
| This function is used to release memory used for obtained information about telegram bot itself. | |
| telebot_error_e | telebot_put_user (telebot_user_t *user) |
| This function is used to release memory used for user object. | |
| telebot_error_e | telebot_send_message (telebot_handler_t handle, long long int chat_id, const char *text, const char *parse_mode, bool disable_web_page_preview, bool disable_notification, int reply_to_message_id, const char *reply_markup) |
| Send text messages. | |
| telebot_error_e | telebot_forward_message (telebot_handler_t handle, long long int chat_id, long long int from_chat_id, bool disable_notification, int message_id) |
| Forward messages of any kind. | |
| telebot_error_e | telebot_send_photo (telebot_handler_t handle, long long int chat_id, const char *photo, bool is_file, const char *caption, const char *parse_mode, bool disable_notification, int reply_to_message_id, const char *reply_markup) |
| Send photos. | |
| telebot_error_e | telebot_send_audio (telebot_handler_t handle, long long int chat_id, const char *audio, bool is_file, const char *caption, const char *parse_mode, int duration, const char *performer, const char *title, const char *thumb, bool disable_notification, int reply_to_message_id, const char *reply_markup) |
| Send audio files. if you want Telegram clients to display them in the music player. Your audio must be in the .mp3 format. Bots can currently send audio files of up to 50 MB in size. For backward compatibility, when the fields title and performer are both empty and the mime-type of the file to be sent is not audio/mpeg, the file will be sent as a playable voice message. For this to work, the audio must be in an .ogg file encoded with OPUS. For sending voice messages, use the telegram_send_voice() function instead. | |
| telebot_error_e | telebot_send_document (telebot_handler_t handle, long long int chat_id, const char *document, bool is_file, const char *thumb, const char *caption, const char *parse_mode, bool disable_notification, int reply_to_message_id, const char *reply_markup) |
| Send general files. | |
| telebot_error_e | telebot_send_video (telebot_handler_t handle, long long int chat_id, const char *video, bool is_file, int duration, int width, int height, const char *thumb, const char *caption, const char *parse_mode, bool supports_streaming, bool disable_notification, int reply_to_message_id, const char *reply_markup) |
| Send video files, Telegram clients support mp4 videos (other formats may be sent as Document). | |
| telebot_error_e | telebot_send_animation (telebot_handler_t handle, long long int chat_id, const char *animation, bool is_file, int duration, int width, int height, const char *thumb, const char *caption, const char *parse_mode, bool disable_notification, int reply_to_message_id, const char *reply_markup) |
| Send animation files (GIF or H.264/MPEG-4 AVC without sound). | |
| telebot_error_e | telebot_send_voice (telebot_handler_t handle, long long int chat_id, const char *voice, bool is_file, const char *caption, const char *parse_mode, int duration, bool disable_notification, int reply_to_message_id, const char *reply_markup) |
| Send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). | |
| telebot_error_e | telebot_send_video_note (telebot_handler_t handle, long long int chat_id, char *video_note, bool is_file, int duration, int length, const char *thumb, bool disable_notification, int reply_to_message_id, const char *reply_markup) |
| Send video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long. | |
| telebot_error_e | telebot_send_media_group (telebot_handler_t handle, long long int chat_id, char *media_paths[], int count, bool disable_notification, int reply_to_message_id) |
| Send a group of photos as an album. | |
| telebot_error_e | telebot_send_location (telebot_handler_t handle, long long int chat_id, float latitude, float longitude, int live_period, bool disable_notification, int reply_to_message_id, const char *reply_markup) |
| Send point on the map. | |
| telebot_error_e | telebot_edit_message_live_location (telebot_handler_t handle, long long int chat_id, int message_id, const char *inline_message_id, float latitude, float longitude, const char *reply_markup) |
| Edit live location messages sent by the bot or via the bot (for inline bots). A location can be edited until its live_period expires or editing is explicitly disabled by a call to telebot_stop_message_live_location(). | |
| telebot_error_e | telebot_stop_message_live_location (telebot_handler_t handle, long long int chat_id, int message_id, char *inline_message_id, const char *reply_markup) |
| Stop updating a live location message sent by the bot or via the bot (for inline bots) before live_period expires. | |
| telebot_error_e | telebot_send_venue (telebot_handler_t handle, long long int chat_id, float latitude, float longitude, const char *title, const char *address, const char *foursquare_id, const char *foursquare_type, bool disable_notification, int reply_to_message_id, const char *reply_markup) |
| Send information about a venue. | |
| telebot_error_e | telebot_send_contact (telebot_handler_t handle, long long int chat_id, const char *phone_number, const char *first_name, const char *last_name, const char *vcard, bool disable_notification, int reply_to_message_id, const char *reply_markup) |
| Send phone contacts. | |
| telebot_error_e | telebot_send_poll (telebot_handler_t handle, long long int chat_id, const char *question, const char **options, int count_options, bool is_anonymous, const char *type, bool allows_multiple_answers, int correct_option_id, bool is_closed, bool disable_notification, int reply_to_message_id, const char *reply_markup) |
| Send a native poll. | |
| telebot_error_e | telebot_send_dice (telebot_handler_t handle, long long int chat_id, bool disable_notification, int reply_to_message_id, const char *reply_markup) |
| Send a dice, which will have a random value from 1 to 6. | |
| telebot_error_e | telebot_send_chat_action (telebot_handler_t handle, long long int chat_id, char *action) |
| Tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of "Retrieving image, please wait…", the bot may use telebot_send_chat_action() with action = upload_photo. The user will see a "sending photo" status for the bot. It is only recommended to use when a response from the bot will take a noticeable amount of time to arrive. | |
| telebot_error_e | telebot_get_user_profile_photos (telebot_handler_t handle, int user_id, int offset, int limit, telebot_user_profile_photos_t *photos) |
| This function is used to get user profile pictures object. | |
| telebot_error_e | telebot_put_user_profile_photos (telebot_user_profile_photos_t *photos) |
| This function is used to free memory allocated for user profile pictures object. | |
| telebot_error_e | telebot_get_user_profile_audios (telebot_handler_t handle, long long int user_id, int offset, int limit, telebot_user_profile_audios_t *audios) |
| Use this method to get user profile audios. | |
| telebot_error_e | telebot_put_user_profile_audios (telebot_user_profile_audios_t *audios) |
| Release user profile audios obtained with telebot_get_user_profile_audios. | |
| telebot_error_e | telebot_set_my_profile_photo (telebot_handler_t handle, const char *photo) |
| Use this method to set the bot's profile photo. | |
| telebot_error_e | telebot_remove_my_profile_photo (telebot_handler_t handle, const char *photo_id) |
| Use this method to remove the bot's profile photo. | |
| telebot_error_e | telebot_get_business_connection (telebot_handler_t handle, const char *business_connection_id, telebot_business_connection_t *connection) |
| Use this method to get information about the business connection. | |
| telebot_error_e | telebot_put_business_connection (telebot_business_connection_t *connection) |
| Release business connection obtained with telebot_get_business_connection. | |
| telebot_error_e | telebot_get_user_chat_boosts (telebot_handler_t handle, long long int chat_id, long long int user_id, telebot_user_chat_boosts_t *boosts) |
| Use this method to get user chat boosts. | |
| telebot_error_e | telebot_put_user_chat_boosts (telebot_user_chat_boosts_t *boosts) |
| Release user chat boosts obtained with telebot_get_user_chat_boosts. | |
| telebot_error_e | telebot_download_file (telebot_handler_t handle, const char *file_id, const char *path) |
| This function is used to download file. | |
| telebot_error_e | telebot_kick_chat_member (telebot_handler_t handle, long long int chat_id, int user_id, long until_date) |
| Kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. | |
| telebot_error_e | telebot_unban_chat_member (telebot_handler_t handle, long long int chat_id, int user_id) |
| Unban a previously kicked user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. | |
| telebot_error_e | telebot_restrict_chat_member (telebot_handler_t handle, long long int chat_id, int user_id, long until_date, bool can_send_messages, bool can_send_media_messages, 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) |
| Restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass true for all boolean parameters to lift restrictions from a user. | |
| telebot_error_e | telebot_promote_chat_member (telebot_handler_t handle, long long int chat_id, int user_id, bool can_change_info, bool can_post_messages, bool can_edit_messages, bool can_delete_messages, bool can_invite_users, bool can_restrict_members, bool can_pin_messages, bool can_promote_members) |
| Promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass False for all boolean parameters to demote a user. | |
| telebot_error_e | telebot_set_chat_admin_custom_title (telebot_handler_t handle, long long int chat_id, int user_id, const char *custom_title) |
| Export an invite link to a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. | |
| telebot_error_e | telebot_set_chat_permissions (telebot_handler_t handle, long long int chat_id, bool can_send_messages, bool can_send_media_messages, 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) |
| Set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the 'can_restrict_members' admin rights. | |
| telebot_error_e | telebot_export_chat_invite_link (telebot_handler_t handle, long long int chat_id, char **invite_link) |
| Generate a new invite link for a chat; any previously generated link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. | |
| telebot_error_e | telebot_set_chat_photo (telebot_handler_t handle, long long int chat_id, const char *photo) |
| Set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. | |
| telebot_error_e | telebot_delete_chat_photo (telebot_handler_t handle, long long int chat_id) |
| Delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. | |
| telebot_error_e | telebot_set_chat_title (telebot_handler_t handle, long long int chat_id, const char *title) |
| Change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. | |
| telebot_error_e | telebot_set_chat_description (telebot_handler_t handle, long long int chat_id, const char *description) |
| Change the description of a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. | |
| telebot_error_e | telebot_pin_chat_message (telebot_handler_t handle, long long int chat_id, int message_id, bool disable_notification) |
| Pin a message in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel. | |
| telebot_error_e | telebot_unpin_chat_message (telebot_handler_t handle, long long int chat_id) |
| Unpin a message in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel. | |
| telebot_error_e | telebot_leave_chat (telebot_handler_t handle, long long int chat_id) |
| Leave a group, supergroup or channel. | |
| telebot_error_e | telebot_get_chat (telebot_handler_t handle, long long int chat_id, telebot_chat_t *chat) |
| Get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc). | |
| telebot_error_e | telebot_put_chat (telebot_chat_t *chat) |
| Release chat obtained with telebot_get_chat(). | |
| telebot_error_e | telebot_get_chat_admins (telebot_handler_t handle, long long int chat_id, telebot_chat_member_t **admin, int *count) |
| Get a list of administrators in a chat. Response contains an array of objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned. | |
| telebot_error_e | telebot_put_chat_admins (telebot_chat_member_t *admins, int count) |
| Release chat admins obtained with telebot_get_chat_admins(). | |
| telebot_error_e | telebot_get_chat_members_count (telebot_handler_t handle, long long int chat_id, int *count) |
| Get the number of members in a chat. | |
| telebot_error_e | telebot_get_chat_member (telebot_handler_t handle, long long int chat_id, int user_id, telebot_chat_member_t *member) |
| Get information about a member of a chat. | |
| telebot_error_e | telebot_put_chat_member (telebot_chat_member_t *member) |
| Release chat member otained with telebot_get_chat_member(). | |
| telebot_error_e | telebot_set_chat_sticker_set (telebot_handler_t handle, long long int chat_id, const char *sticker_set_name) |
| Set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set optionally returned in telebot_get_chat requests to check if the bot can use it. | |
| telebot_error_e | telebot_delete_chat_sticker_set (telebot_handler_t handle, long long int chat_id) |
| Delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set optionally returned in telebot_get_chat requests to check if the bot can use this method. | |
| telebot_error_e | telebot_answer_callback_query (telebot_handler_t handle, const char *callback_query_id, const char *text, bool show_alert, const char *url, int cache_time) |
| Send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. | |
| telebot_error_e | telebot_set_my_commands (telebot_handler_t handle, telebot_bot_command_t commands[], int count) |
| Change the list of the bot's commands. | |
| telebot_error_e | telebot_get_my_commands (telebot_handler_t handle, telebot_bot_command_t **commands, int *count) |
| Get the current list of the bot's commands. | |
| telebot_error_e | telebot_put_my_commands (telebot_bot_command_t *commands, int count) |
| Release bot commands obtained with telebot_get_my_commands(). | |
| telebot_error_e | telebot_edit_message_text (telebot_handler_t handle, long long int chat_id, int message_id, const char *inline_message_id, const char *text, const char *parse_mode, bool disable_web_page_preview, const char *reply_markup) |
| Edit text and game messages sent by the bot or via the bot (for inline bots). | |
| telebot_error_e | telebot_edit_message_caption (telebot_handler_t handle, long long int chat_id, int message_id, const char *inline_message_id, const char *caption, const char *parse_mode, const char *reply_markup) |
| Edit captions of messages sent by the bot or via the bot (for inline bots). | |
| telebot_error_e | telebot_edit_message_reply_markup (telebot_handler_t handle, long long int chat_id, int message_id, const char *inline_message_id, const char *reply_markup) |
| Edit only the reply markup of messages sent by the bot or via the bot (for inline bots). | |
| telebot_error_e | telebot_stop_poll (telebot_handler_t handle, long long int chat_id, int message_id, const char *reply_markup) |
| Stop a poll which was sent by the bot. | |
| telebot_error_e | telebot_delete_message (telebot_handler_t handle, long long int chat_id, int message_id) |
| Delete a message, including service messages, with the following limitations: | |
| telebot_error_e | telebot_log_out (telebot_handler_t handle) |
| Use this method to log out from the cloud Bot API server before launching the bot locally. | |
| telebot_error_e | telebot_close (telebot_handler_t handle) |
| Use this method to close the bot instance before moving it from one local server to another. | |
| telebot_error_e | telebot_set_my_name (telebot_handler_t handle, const char *name, const char *language_code) |
| Use this method to change the bot's name. | |
| telebot_error_e | telebot_get_my_name (telebot_handler_t handle, const char *language_code, char **name) |
| Use this method to get the current bot name for the given user language. | |
| telebot_error_e | telebot_set_my_description (telebot_handler_t handle, const char *description, const char *language_code) |
| Use this method to change the bot's description. | |
| telebot_error_e | telebot_get_my_description (telebot_handler_t handle, const char *language_code, char **description) |
| Use this method to get the current bot description for the given user language. | |
| telebot_error_e | telebot_set_my_short_description (telebot_handler_t handle, const char *short_description, const char *language_code) |
| Use this method to change the bot's short description. | |
| telebot_error_e | telebot_get_my_short_description (telebot_handler_t handle, const char *language_code, char **short_description) |
| Use this method to get the current bot short description for the given user language. | |
| telebot_error_e | telebot_set_chat_menu_button (telebot_handler_t handle, long long int chat_id, const char *menu_button) |
| Use this method to change the bot's menu button in a private chat, or the default menu button. | |
| telebot_error_e | telebot_get_chat_menu_button (telebot_handler_t handle, long long int chat_id, char **menu_button) |
| Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. | |
| telebot_error_e | telebot_set_my_default_administrator_rights (telebot_handler_t handle, const char *rights, bool for_channels) |
| Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. | |
| telebot_error_e | telebot_get_my_default_administrator_rights (telebot_handler_t handle, bool for_channels, char **rights) |
| Use this method to get the current default administrator rights of the bot. | |
| telebot_error_e | telebot_delete_my_commands (telebot_handler_t handle, const char *scope, const char *language_code) |
| Use this method to delete the list of the bot's commands for the given scope and user language. | |
| telebot_error_e | telebot_copy_message (telebot_handler_t handle, long long int chat_id, long long int from_chat_id, int message_id, const char *caption, const char *parse_mode, const char *caption_entities, bool disable_notification, bool protect_content, int reply_to_message_id, bool allow_sending_without_reply, const char *reply_markup, int *message_id_out) |
| Use this method to copy messages of any kind. | |
| telebot_error_e | telebot_copy_messages (telebot_handler_t handle, long long int chat_id, long long int from_chat_id, const char *message_ids, bool disable_notification, bool protect_content, bool remove_caption, int **message_ids_out, int *count) |
| Use this method to copy multiple messages of any kind. | |
| telebot_error_e | telebot_forward_messages (telebot_handler_t handle, long long int chat_id, long long int from_chat_id, const char *message_ids, bool disable_notification, bool protect_content, int **message_ids_out, int *count) |
| Use this method to forward multiple messages of any kind. | |
| telebot_error_e | telebot_delete_messages (telebot_handler_t handle, long long int chat_id, const char *message_ids) |
| Use this method to delete multiple messages in a chat. | |
| telebot_error_e | telebot_ban_chat_member (telebot_handler_t handle, long long int chat_id, int user_id, long until_date, bool revoke_messages) |
| Use this method to ban a user in a group, a supergroup or a channel. | |
| telebot_error_e | telebot_ban_chat_sender_chat (telebot_handler_t handle, long long int chat_id, long long int sender_chat_id) |
| Use this method to ban a channel chat in a supergroup or a channel. | |
| telebot_error_e | telebot_unban_chat_sender_chat (telebot_handler_t handle, long long int chat_id, long long int sender_chat_id) |
| Use this method to unban a previously banned channel chat in a supergroup or a channel. | |
| telebot_error_e | telebot_create_chat_invite_link (telebot_handler_t handle, long long int chat_id, const char *name, long expire_date, int member_limit, bool creates_join_request, telebot_chat_invite_link_t *invite_link) |
| Use this method to create an additional invite link for a chat. | |
| telebot_error_e | telebot_edit_chat_invite_link (telebot_handler_t handle, long long int chat_id, const char *invite_link_str, const char *name, long expire_date, int member_limit, bool creates_join_request, telebot_chat_invite_link_t *invite_link) |
| Use this method to edit a non-primary invite link created by the bot. | |
| telebot_error_e | telebot_revoke_chat_invite_link (telebot_handler_t handle, long long int chat_id, const char *invite_link_str, telebot_chat_invite_link_t *invite_link) |
| Use this method to revoke an invite link created by the bot. | |
| telebot_error_e | telebot_put_chat_invite_link (telebot_chat_invite_link_t *invite_link) |
| Release chat invite link obtained with telebot_create_chat_invite_link etc. | |
| telebot_error_e | telebot_approve_chat_join_request (telebot_handler_t handle, long long int chat_id, int user_id) |
| Use this method to approve a chat join request. | |
| telebot_error_e | telebot_decline_chat_join_request (telebot_handler_t handle, long long int chat_id, int user_id) |
| Use this method to decline a chat join request. | |
| telebot_error_e | telebot_set_message_reaction (telebot_handler_t handle, long long int chat_id, int message_id, const char *reaction, bool is_big) |
| Use this method to set a new message reaction. | |
| telebot_error_e | telebot_edit_message_media (telebot_handler_t handle, long long int chat_id, int message_id, const char *inline_message_id, const char *media, const char *reply_markup) |
| Use this method to edit animation, audio, document, photo, or video messages. | |
| telebot_error_e | telebot_set_passport_data_errors (telebot_handler_t handle, long long int user_id, const char *errors) |
| Use this method to set passport data errors. | |
| telebot_error_e | telebot_send_invoice (telebot_handler_t handle, long long int chat_id, int message_thread_id, const char *title, const char *description, const char *payload, const char *provider_token, const char *currency, const char *prices, int max_tip_amount, const char *suggested_tip_amounts, const char *start_parameter, const char *provider_data, const char *photo_url, int photo_size, int photo_width, int photo_height, bool 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, const char *reply_parameters, const char *reply_markup, telebot_message_t *message) |
| Use this method to send an invoice. | |
| telebot_error_e | telebot_create_invoice_link (telebot_handler_t handle, const char *title, const char *description, const char *payload, const char *provider_token, const char *currency, const char *prices, int max_tip_amount, const char *suggested_tip_amounts, const char *provider_data, const char *photo_url, int photo_size, int photo_width, int photo_height, bool 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, char **invoice_link) |
| Use this method to create a link for an invoice. | |
| telebot_error_e | telebot_answer_shipping_query (telebot_handler_t handle, const char *shipping_query_id, bool ok, const char *shipping_options, const char *error_message) |
| Use this method to reply to shipping queries. | |
| telebot_error_e | telebot_answer_pre_checkout_query (telebot_handler_t handle, const char *pre_checkout_query_id, bool ok, const char *error_message) |
| Use this method to respond to pre-checkout queries. | |
| telebot_error_e | telebot_get_my_star_balance (telebot_handler_t handle, long long int *balance) |
| Use this method to get the current Telegram Stars balance of the bot. | |
| telebot_error_e | telebot_get_star_transactions (telebot_handler_t handle, int offset, int limit, telebot_star_transactions_t *transactions) |
| Use this method to get the bot's Telegram Star transactions. | |
| telebot_error_e | telebot_put_star_transactions (telebot_star_transactions_t *transactions) |
| Release star transactions obtained with telebot_get_star_transactions. | |
| telebot_error_e | telebot_refund_star_payment (telebot_handler_t handle, long long int user_id, const char *telegram_payment_charge_id) |
| Use this method to refund a successful payment in Telegram Stars. | |
| telebot_error_e | telebot_get_available_gifts (telebot_handler_t handle, telebot_gifts_t *gifts) |
| Use this method to get a list of gifts that can be sent by the bot to users. | |
| telebot_error_e | telebot_put_available_gifts (telebot_gifts_t *gifts) |
| Release available gifts obtained with telebot_get_available_gifts. | |
| telebot_error_e | telebot_put_gift (telebot_gift_t *gift) |
| Release a gift object. | |
| telebot_error_e | telebot_get_user_gifts (telebot_handler_t handle, long long int user_id, int offset, int limit, telebot_user_gifts_t *gifts) |
| Use this method to get a list of gifts received by a user. | |
| telebot_error_e | telebot_put_user_gifts (telebot_user_gifts_t *gifts) |
| Release user gifts obtained with telebot_get_user_gifts. | |
| telebot_error_e | telebot_put_user_gift (telebot_user_gift_t *gift) |
| Release a user gift object. | |
| telebot_error_e | telebot_get_chat_gifts (telebot_handler_t handle, long long int chat_id, int offset, int limit, telebot_user_gifts_t *gifts) |
| Use this method to get a list of gifts received by a chat. | |
| telebot_error_e | telebot_put_chat_gifts (telebot_user_gifts_t *gifts) |
| Release chat gifts obtained with telebot_get_chat_gifts. | |
| telebot_error_e | telebot_upgrade_gift (telebot_handler_t handle, const char *gift_id, bool pay_for_upgrade, const char *text, const char *text_parse_mode, const char *text_entities) |
| Use this method to upgrade a gift. | |
| telebot_error_e | telebot_transfer_gift (telebot_handler_t handle, long long int user_id, long long int chat_id, const char *gift_id) |
| Use this method to transfer a gift. | |
| telebot_error_e | telebot_convert_gift_to_stars (telebot_handler_t handle, const char *gift_id) |
| Use this method to convert a gift to Telegram Stars. | |
| telebot_error_e | telebot_send_gift (telebot_handler_t handle, long long int user_id, long long int chat_id, const char *gift_id, bool pay_for_upgrade, const char *text, const char *text_parse_mode, const char *text_entities) |
| Use this method to send a gift. | |
| telebot_error_e | telebot_gift_premium_subscription (telebot_handler_t handle, long long int user_id, int month_count, int star_count, const char *text, const char *text_parse_mode, const char *text_entities) |
| Use this method to gift a Telegram Premium subscription to a user. | |
| telebot_error_e | telebot_send_sticker (telebot_handler_t handle, long long int chat_id, const char *sticker, bool is_file, bool disable_notification, int reply_to_message_id, char *reply_markup) |
| Send static .WEBP or animated .TGS stickers. | |
| telebot_error_e | telebot_get_sticker_set (telebot_handler_t handle, const char *name, telebot_sticker_set_t *stickers) |
| Get a sticker set. | |
| telebot_error_e | telebot_put_sticker_set (telebot_sticker_set_t *stickers) |
| Release sticker set obtained with telebot_get_sticker_set() | |
| telebot_error_e | telebot_put_sticker (telebot_sticker_t *sticker) |
| Release a sticker object. | |
Simplified APIs to create telegram bot.
| typedef struct telebot_file telebot_file_t |
This object represents a file ready to be downloaded.
The file can be downloaded via the link https://api.telegram.org/file/bot[token]/[file_path]. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile. Maximum file size to download is 20 MB.
| enum telebot_error_e |
Enumerations of error code for telebot programming interface.
| enum telebot_update_type |
Enumerations of telegram update types.
| telebot_error_e telebot_answer_callback_query | ( | telebot_handler_t | handle, |
| const char * | callback_query_id, | ||
| const char * | text, | ||
| bool | show_alert, | ||
| const char * | url, | ||
| int | cache_time | ||
| ) |
Send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | callback_query_id | Unique identifier for the query to be answered. |
| [in] | text | Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters |
| [in] | show_alert | If true, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false. |
| [in] | url | URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @Botfather, specify the URL that opens your game - note that this will only work if the query comes from a callback_game button. |
| [in] | cache_time | The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. |
| telebot_error_e telebot_approve_chat_join_request | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | user_id | ||
| ) |
Use this method to approve a chat join request.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | user_id | Unique identifier of the target user. |
| telebot_error_e telebot_ban_chat_member | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | user_id, | ||
| long | until_date, | ||
| bool | revoke_messages | ||
| ) |
Use this method to ban a user in a group, a supergroup or a channel.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | user_id | Unique identifier of the target user. |
| [in] | until_date | Date when the user will be unbanned, unix time. |
| [in] | revoke_messages | Pass True to delete all messages from the chat for the user that is being banned. |
| telebot_error_e telebot_ban_chat_sender_chat | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| long long int | sender_chat_id | ||
| ) |
Use this method to ban a channel chat in a supergroup or a channel.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | sender_chat_id | Unique identifier of the target sender chat. |
| telebot_error_e telebot_close | ( | telebot_handler_t | handle | ) |
Use this method to close the bot instance before moving it from one local server to another.
| [in] | handle | The telebot handler. |
| telebot_error_e telebot_close_forum_topic | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | message_thread_id | ||
| ) |
Use this method to close an open topic in a forum supergroup chat.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | message_thread_id | Unique identifier for the target message thread of the forum topic. |
| telebot_error_e telebot_close_general_forum_topic | ( | telebot_handler_t | handle, |
| long long int | chat_id | ||
| ) |
Use this method to close an open 'General' topic in a forum supergroup chat.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| telebot_error_e telebot_copy_message | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| long long int | from_chat_id, | ||
| int | message_id, | ||
| const char * | caption, | ||
| const char * | parse_mode, | ||
| const char * | caption_entities, | ||
| bool | disable_notification, | ||
| bool | protect_content, | ||
| int | reply_to_message_id, | ||
| bool | allow_sending_without_reply, | ||
| const char * | reply_markup, | ||
| int * | message_id_out | ||
| ) |
Use this method to copy messages of any kind.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | from_chat_id | Unique identifier for the chat where the original message was sent. |
| [in] | message_id | Message identifier in the chat specified by from_chat_id. |
| [in] | caption | New caption for media, 0-1024 characters after entities parsing. |
| [in] | parse_mode | Mode for parsing entities in the new caption. |
| [in] | caption_entities | A JSON-serialized list of special entities that appear in the new caption. |
| [in] | disable_notification | Sends the message silently. |
| [in] | protect_content | Protects the contents of the sent message from forwarding and saving. |
| [in] | reply_to_message_id | If the message is a reply, ID of the original message. |
| [in] | allow_sending_without_reply | Pass True if the message should be sent even if the specified replied-to message is not found. |
| [in] | reply_markup | Additional interface options. |
| [out] | message_id_out | Pointer to get the message identifier of the sent message. |
| telebot_error_e telebot_copy_messages | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| long long int | from_chat_id, | ||
| const char * | message_ids, | ||
| bool | disable_notification, | ||
| bool | protect_content, | ||
| bool | remove_caption, | ||
| int ** | message_ids_out, | ||
| int * | count | ||
| ) |
Use this method to copy multiple messages of any kind.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | from_chat_id | Unique identifier for the chat where the original messages were sent. |
| [in] | message_ids | A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to copy. |
| [in] | disable_notification | Sends the messages silently. |
| [in] | protect_content | Protects the contents of the sent messages from forwarding and saving. |
| [in] | remove_caption | Pass True to copy the messages without their captions. |
| [out] | message_ids_out | Pointer to get the message identifiers of the sent messages, MUST be freed after use. |
| [out] | count | Pointer to get the number of messages sent. |
| telebot_error_e telebot_create | ( | telebot_handler_t * | handle, |
| char * | token | ||
| ) |
Initial function to use telebot APIs.
This function must be used first to call, and it creates handler. This call MUST have corresponding call to telebot_destroy() when operation is complete.
| [out] | handle | Pointer to create telebot handler to use APIs, it must be destroyed with telebot_destroy(). |
| [in] | token | Telegram Bot token to use. |
| telebot_error_e telebot_create_chat_invite_link | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | name, | ||
| long | expire_date, | ||
| int | member_limit, | ||
| bool | creates_join_request, | ||
| telebot_chat_invite_link_t * | invite_link | ||
| ) |
Use this method to create an additional invite link for a chat.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | name | Invite link name; 0-32 characters. |
| [in] | expire_date | Point in time (Unix timestamp) when the link will expire. |
| [in] | member_limit | The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999. |
| [in] | creates_join_request | True, if users joining the chat via the link need to be approved by chat administrators. |
| [out] | invite_link | Pointer to get ChatInviteLink, MUST be released with telebot_put_chat_invite_link. |
| telebot_error_e telebot_create_forum_topic | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | name, | ||
| int | icon_color, | ||
| const char * | icon_custom_emoji_id, | ||
| telebot_forum_topic_t * | topic | ||
| ) |
Use this method to create a topic in a forum supergroup chat.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | name | Topic name, 1-128 characters. |
| [in] | icon_color | Color of the topic icon in RGB format. |
| [in] | icon_custom_emoji_id | Unique identifier of the custom emoji used as the topic icon. |
| [out] | topic | Pointer to get ForumTopic, MUST be released with telebot_put_forum_topic. |
| telebot_error_e telebot_decline_chat_join_request | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | user_id | ||
| ) |
Use this method to decline a chat join request.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | user_id | Unique identifier of the target user. |
| telebot_error_e telebot_delete_chat_photo | ( | telebot_handler_t | handle, |
| long long int | chat_id | ||
| ) |
Delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| telebot_error_e telebot_delete_chat_sticker_set | ( | telebot_handler_t | handle, |
| long long int | chat_id | ||
| ) |
Delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set optionally returned in telebot_get_chat requests to check if the bot can use this method.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| telebot_error_e telebot_delete_forum_topic | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | message_thread_id | ||
| ) |
Use this method to delete a forum topic along with all its messages in a forum supergroup chat.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | message_thread_id | Unique identifier for the target message thread of the forum topic. |
| telebot_error_e telebot_delete_message | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | message_id | ||
| ) |
Delete a message, including service messages, with the following limitations:
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target message_id Message identifier to be deleted. |
| telebot_error_e telebot_delete_messages | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | message_ids | ||
| ) |
Use this method to delete multiple messages in a chat.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | message_ids | A JSON-serialized list of 1-100 identifiers of messages to delete. |
| telebot_error_e telebot_delete_my_commands | ( | telebot_handler_t | handle, |
| const char * | scope, | ||
| const char * | language_code | ||
| ) |
Use this method to delete the list of the bot's commands for the given scope and user language.
| [in] | handle | The telebot handler. |
| [in] | scope | A JSON-serialized object, describing scope of users for which the commands are relevant. |
| [in] | language_code | A two-letter ISO 639-1 language code. |
| telebot_error_e telebot_delete_webhook | ( | telebot_handler_t | handle | ) |
This function is used to remove webhook integration if you decide to switch back to getUpdates.
| [in] | handle | The telebot handler created with telebot_create(). |
| telebot_error_e telebot_destroy | ( | telebot_handler_t | handle | ) |
Final function to use telebo APIs.
This function must be the last function to call for a telebot use. It is the opposite of the telebot_create() function.
| [in] | handle | The telebot handler created with telebot_create(). |
| telebot_error_e telebot_download_file | ( | telebot_handler_t | handle, |
| const char * | file_id, | ||
| const char * | path | ||
| ) |
This function is used to download file.
| [in] | file_id | File identifier to get info about. |
| [in] | path | A path where the file is downloaded |
| telebot_error_e telebot_edit_chat_invite_link | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | invite_link_str, | ||
| const char * | name, | ||
| long | expire_date, | ||
| int | member_limit, | ||
| bool | creates_join_request, | ||
| telebot_chat_invite_link_t * | invite_link | ||
| ) |
Use this method to edit a non-primary invite link created by the bot.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | invite_link_str | The invite link to edit. |
| [in] | name | Invite link name; 0-32 characters. |
| [in] | expire_date | Point in time (Unix timestamp) when the link will expire. |
| [in] | member_limit | The maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999. |
| [in] | creates_join_request | True, if users joining the chat via the link need to be approved by chat administrators. |
| [out] | invite_link | Pointer to get ChatInviteLink, MUST be released with telebot_put_chat_invite_link. |
| telebot_error_e telebot_edit_forum_topic | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | message_thread_id, | ||
| const char * | name, | ||
| const char * | icon_custom_emoji_id | ||
| ) |
Use this method to edit name and icon of a topic in a forum supergroup chat.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | message_thread_id | Unique identifier for the target message thread of the forum topic. |
| [in] | name | New topic name, 0-128 characters. |
| [in] | icon_custom_emoji_id | New unique identifier of the custom emoji used as the topic icon. |
| telebot_error_e telebot_edit_general_forum_topic | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | name | ||
| ) |
Use this method to edit the name of the 'General' topic in a forum supergroup chat.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | name | New topic name, 1-128 characters. |
| telebot_error_e telebot_edit_message_caption | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | message_id, | ||
| const char * | inline_message_id, | ||
| const char * | caption, | ||
| const char * | parse_mode, | ||
| const char * | reply_markup | ||
| ) |
Edit captions of messages sent by the bot or via the bot (for inline bots).
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Required if inline_message_id. Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | message_id | Required if inline_message_id is not specified. Identifier of the sent message. |
| [in] | inline_message_id | Required if chat_id and message_id are not specified. Identifier of the inline message. |
| [in] | caption | New caption of the message. |
| [in] | reply_markup | A JSON-serialized object for an inline keyboard. |
| telebot_error_e telebot_edit_message_live_location | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | message_id, | ||
| const char * | inline_message_id, | ||
| float | latitude, | ||
| float | longitude, | ||
| const char * | reply_markup | ||
| ) |
Edit live location messages sent by the bot or via the bot (for inline bots). A location can be edited until its live_period expires or editing is explicitly disabled by a call to telebot_stop_message_live_location().
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | message_id | Required if inline_message_id is not specified. Identifier of the sent message. |
| [in] | inline_message_id | Required if chat_id and message_id are not specified. Identifier of the inline message. |
| [in] | latitude | Latitude of location. |
| [in] | longitude | Longitude of location. |
| [in] | reply_markup | A JSON-serialized object for a new inline keyboard. |
| telebot_error_e telebot_edit_message_media | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | message_id, | ||
| const char * | inline_message_id, | ||
| const char * | media, | ||
| const char * | reply_markup | ||
| ) |
Use this method to edit animation, audio, document, photo, or video messages.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Required if inline_message_id is not specified. |
| [in] | message_id | Required if inline_message_id is not specified. |
| [in] | inline_message_id | Required if chat_id and message_id are not specified. |
| [in] | media | A JSON-serialized object for a new media content of the message. |
| [in] | reply_markup | A JSON-serialized object for a new inline keyboard. |
| telebot_error_e telebot_edit_message_reply_markup | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | message_id, | ||
| const char * | inline_message_id, | ||
| const char * | reply_markup | ||
| ) |
Edit only the reply markup of messages sent by the bot or via the bot (for inline bots).
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Required if inline_message_id. Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | message_id | Required if inline_message_id is not specified. Identifier of the sent message. |
| [in] | inline_message_id | Required if chat_id and message_id are not specified. Identifier of the inline message. |
| [in] | reply_markup | A JSON-serialized object for an inline keyboard. |
| telebot_error_e telebot_edit_message_text | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | message_id, | ||
| const char * | inline_message_id, | ||
| const char * | text, | ||
| const char * | parse_mode, | ||
| bool | disable_web_page_preview, | ||
| const char * | reply_markup | ||
| ) |
Edit text and game messages sent by the bot or via the bot (for inline bots).
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Required if inline_message_id. Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | message_id | Required if inline_message_id is not specified. Identifier of the sent message. |
| [in] | inline_message_id | Required if chat_id and message_id are not specified. Identifier of the inline message. |
| [in] | text | New text of the message. |
| [in] | parse_mode | Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. |
| [in] | disable_web_page_priview | Disables link previews for links in this message. |
| [in] | reply_markup | A JSON-serialized object for an inline keyboard. |
| telebot_error_e telebot_export_chat_invite_link | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| char ** | invite_link | ||
| ) |
Generate a new invite link for a chat; any previously generated link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [out] | invite_link | Exported invite link, must be freed after use. |
| telebot_error_e telebot_forward_message | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| long long int | from_chat_id, | ||
| bool | disable_notification, | ||
| int | message_id | ||
| ) |
Forward messages of any kind.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | from_chat_id | Unique identifier for the chat where the original message was sent (or channel username in the format @channelusername). |
| [in] | disable_notification | Sends the message silently. Users will receive a notification with no sound. |
| [in] | message_id | Unique message identifier. |
| telebot_error_e telebot_forward_messages | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| long long int | from_chat_id, | ||
| const char * | message_ids, | ||
| bool | disable_notification, | ||
| bool | protect_content, | ||
| int ** | message_ids_out, | ||
| int * | count | ||
| ) |
Use this method to forward multiple messages of any kind.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | from_chat_id | Unique identifier for the chat where the original messages were sent. |
| [in] | message_ids | A JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to forward. |
| [in] | disable_notification | Sends the messages silently. |
| [in] | protect_content | Protects the contents of the sent messages from forwarding and saving. |
| [out] | message_ids_out | Pointer to get the message identifiers of the sent messages, MUST be freed after use. |
| [out] | count | Pointer to get the number of messages sent. |
| telebot_error_e telebot_get_chat | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| telebot_chat_t * | chat | ||
| ) |
Get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc).
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [out] | chat | Pointer to chat, must be released with telebot_put_chat(). |
| telebot_error_e telebot_get_chat_admins | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| telebot_chat_member_t ** | admin, | ||
| int * | count | ||
| ) |
Get a list of administrators in a chat. Response contains an array of objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [out] | admin | Pointer to chat administrators, must be released with telebot_put_chat_admins(). |
| [out] | count | Pointer to get a number of administrators. |
| telebot_error_e telebot_get_chat_member | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | user_id, | ||
| telebot_chat_member_t * | member | ||
| ) |
Get information about a member of a chat.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | user_id | Unique identifier of the target user. |
| [out] | member | Pointer to chat member to obtain, must be released with telebot_put_chat_member(). |
| telebot_error_e telebot_get_chat_members_count | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int * | count | ||
| ) |
Get the number of members in a chat.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [out] | count | Number of chat members. |
| telebot_error_e telebot_get_chat_menu_button | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| char ** | menu_button | ||
| ) |
Use this method to get the current value of the bot's menu button in a private chat, or the default menu button.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target private chat. |
| [out] | menu_button | Pointer to get menu button, MUST be freed after use. |
| telebot_error_e telebot_get_forum_topic_icon_stickers | ( | telebot_handler_t | handle, |
| telebot_sticker_t ** | stickers, | ||
| int * | count | ||
| ) |
Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user.
| [in] | handle | The telebot handler. |
| [out] | stickers | Pointer to stickers to be obtained, MUST be released with #telebot_put_stickers. |
| [out] | count | Pointer to get the number of stickers. |
| telebot_error_e telebot_get_me | ( | telebot_handler_t | handle, |
| telebot_user_t * | me | ||
| ) |
This function is used to get information about telegram bot itself.
| [in] | handle | The telebot handler created with telebot_create(). |
| [out] | me | Telegram user object, it needs to be released with telebot_put_me after use. |
| telebot_error_e telebot_get_my_commands | ( | telebot_handler_t | handle, |
| telebot_bot_command_t ** | commands, | ||
| int * | count | ||
| ) |
Get the current list of the bot's commands.
| [in] | handle | The telebot handler created with telebot_create(). |
| [out] | commands | Pointer to commands to be obtained, which must be released with telebot_put_my_commands(). |
| [out] | count | Pointer to place the number of commands. |
| telebot_error_e telebot_get_my_default_administrator_rights | ( | telebot_handler_t | handle, |
| bool | for_channels, | ||
| char ** | rights | ||
| ) |
Use this method to get the current default administrator rights of the bot.
| [in] | handle | The telebot handler. |
| [in] | for_channels | Pass True to get default administrator rights of the bot in channels. |
| [out] | rights | Pointer to get admin rights, MUST be freed after use. |
| telebot_error_e telebot_get_my_description | ( | telebot_handler_t | handle, |
| const char * | language_code, | ||
| char ** | description | ||
| ) |
Use this method to get the current bot description for the given user language.
| [in] | handle | The telebot handler. |
| [in] | language_code | A two-letter ISO 639-1 language code. |
| [out] | description | Pointer to get bot description, MUST be freed after use. |
| telebot_error_e telebot_get_my_name | ( | telebot_handler_t | handle, |
| const char * | language_code, | ||
| char ** | name | ||
| ) |
Use this method to get the current bot name for the given user language.
| [in] | handle | The telebot handler. |
| [in] | language_code | A two-letter ISO 639-1 language code. |
| [out] | name | Pointer to get bot name, MUST be freed after use. |
| telebot_error_e telebot_get_my_short_description | ( | telebot_handler_t | handle, |
| const char * | language_code, | ||
| char ** | short_description | ||
| ) |
Use this method to get the current bot short description for the given user language.
| [in] | handle | The telebot handler. |
| [in] | language_code | A two-letter ISO 639-1 language code. |
| [out] | short_description | Pointer to get bot short description, MUST be freed after use. |
| telebot_error_e telebot_get_proxy | ( | telebot_handler_t | handle, |
| char ** | addr | ||
| ) |
Get proxy address currently used.
| [in] | handle | The telebot handler created with telebot_create(). |
| [out] | addr | Current proxy address or NULL, MUST be freed after use. |
| telebot_error_e telebot_get_sticker_set | ( | telebot_handler_t | handle, |
| const char * | name, | ||
| telebot_sticker_set_t * | stickers | ||
| ) |
Get a sticker set.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | name | Name of the sticker set. |
| [out] | stickers | Pointer to sticker set, must be released with telebot_put_sticker_set. |
| telebot_error_e telebot_get_updates | ( | telebot_handler_t | handle, |
| int | offset, | ||
| int | limit, | ||
| int | timeout, | ||
| telebot_update_type_e | allowed_updates[], | ||
| int | allowed_updates_count, | ||
| telebot_update_t ** | updates, | ||
| int * | count | ||
| ) |
This function is used to get latest updates.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | offset | Identifier of the first update to be returned. The negative offset can be specified to retrieve updates starting from -offset update from the end of the updates queue. |
| [in] | limit | Number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100. |
| [in] | timeout | Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only. |
| [in] | allowed_updates | An array of types of updates you want your bot to receive. Refers to telebot_update_type_e. |
| [in] | allowed_updates_count | Number of update types. |
| [out] | updates | An array of update objects, it needs to be released with telebot_put_updates after use. |
| [out] | count | Number of updates received. |
| telebot_error_e telebot_get_user_profile_photos | ( | telebot_handler_t | handle, |
| int | user_id, | ||
| int | offset, | ||
| int | limit, | ||
| telebot_user_profile_photos_t * | photos | ||
| ) |
This function is used to get user profile pictures object.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | user_id | Unique identifier of the target user. |
| [in] | offset | Sequential number of the first photo to be returned. By default, up to 10 photos are returned. |
| [in] | limit | Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100. |
| [out] | photos | A pointer to user profile photo object. It MUST be released with telebot_put_user_profile_photos after use. |
| telebot_error_e telebot_get_webhook_info | ( | telebot_handler_t | handle, |
| telebot_webhook_info_t * | info | ||
| ) |
This function is used to get information about telegram bot itself.
| [in] | handle | The telebot handler created with telebot_create(). |
| [out] | info | Telegram webhoook information, it needs to be released with telebot_put_webhook_info after use. |
| telebot_error_e telebot_hide_general_forum_topic | ( | telebot_handler_t | handle, |
| long long int | chat_id | ||
| ) |
Use this method to hide the 'General' topic in a forum supergroup chat.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| telebot_error_e telebot_kick_chat_member | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | user_id, | ||
| long | until_date | ||
| ) |
Kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
| [in] | user_id | Unique identifier of the target user |
| [in] | until_date | Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. |
| telebot_error_e telebot_leave_chat | ( | telebot_handler_t | handle, |
| long long int | chat_id | ||
| ) |
Leave a group, supergroup or channel.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| telebot_error_e telebot_log_out | ( | telebot_handler_t | handle | ) |
Use this method to log out from the cloud Bot API server before launching the bot locally.
| [in] | handle | The telebot handler. |
| telebot_error_e telebot_pin_chat_message | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | message_id, | ||
| bool | disable_notification | ||
| ) |
Pin a message in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | message_id | Identifier of a message to pin. |
| [in] | disable_notification | Pass True, if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels. |
| telebot_error_e telebot_promote_chat_member | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | user_id, | ||
| bool | can_change_info, | ||
| bool | can_post_messages, | ||
| bool | can_edit_messages, | ||
| bool | can_delete_messages, | ||
| bool | can_invite_users, | ||
| bool | can_restrict_members, | ||
| bool | can_pin_messages, | ||
| bool | can_promote_members | ||
| ) |
Promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass False for all boolean parameters to demote a user.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | user_id | Unique identifier of the target user. |
| [in] | can_change_info | Pass true, if the administrator can change chat title, photo and other settings. |
| [in] | can_post_messages | Pass true, if the administrator can create channel posts, channels only. |
| [in] | can_edit_messages | Pass true, if the administrator can edit messages of other users and can pin messages, channels only. |
| [in] | can_delete_messages | Pass true, if the administrator can delete messages of other users. |
| [in] | can_invite_users | Pass true, if the administrator can invite new users to the chat. |
| [in] | can_restrict_members | Pass true, if the administrator can restrict, ban or unban chat members. |
| [in] | can_pin_messages | Pass true, if the administrator can pin messages, supergroups only. |
| [in] | can_promote_members | Pass true, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by him). |
| telebot_error_e telebot_put_chat | ( | telebot_chat_t * | chat | ) |
Release chat obtained with telebot_get_chat().
| [in] | chat | Pointer to chat |
| telebot_error_e telebot_put_chat_admins | ( | telebot_chat_member_t * | admins, |
| int | count | ||
| ) |
Release chat admins obtained with telebot_get_chat_admins().
| [in] | chat | Pointer to chat administrators to be released. |
| [in] | count | Number of chat administrators. |
| telebot_error_e telebot_put_chat_invite_link | ( | telebot_chat_invite_link_t * | invite_link | ) |
Release chat invite link obtained with telebot_create_chat_invite_link etc.
| [in] | invite_link | Pointer to chat invite link to be released. |
| telebot_error_e telebot_put_chat_member | ( | telebot_chat_member_t * | member | ) |
Release chat member otained with telebot_get_chat_member().
| [in] | member | Pointer to chat member to be released. |
| telebot_error_e telebot_put_forum_topic | ( | telebot_forum_topic_t * | topic | ) |
Release forum topic obtained with telebot_create_forum_topic.
| [in] | topic | Pointer to forum topic to be released. |
| telebot_error_e telebot_put_me | ( | telebot_user_t * | me | ) |
This function is used to release memory used for obtained information about telegram bot itself.
| [in] | me | Pointer to telegram user object obtained with telebot_get_me. |
| telebot_error_e telebot_put_my_commands | ( | telebot_bot_command_t * | commands, |
| int | count | ||
| ) |
Release bot commands obtained with telebot_get_my_commands().
| [in] | commands | Pointer to commands to be released. |
| [in] | count | The number of commands to be released. |
| telebot_error_e telebot_put_sticker | ( | telebot_sticker_t * | sticker | ) |
Release a sticker object.
| [in] | sticker | Pointer to sticker to be released. |
| telebot_error_e telebot_put_sticker_set | ( | telebot_sticker_set_t * | stickers | ) |
Release sticker set obtained with telebot_get_sticker_set()
| [in] | stickers | Pointer to sticker set to be released. |
| telebot_error_e telebot_put_updates | ( | telebot_update_t * | updates, |
| int | count | ||
| ) |
This function is used to release memory used for obtained updates.
| [int] | updates Pointer to udpates obtained with telebot_get_updates. |
| [int] | count Number of updates obtained with telebot_get_updates. |
| telebot_error_e telebot_put_user | ( | telebot_user_t * | user | ) |
This function is used to release memory used for user object.
| [in] | user | Pointer to telegram user object. |
| telebot_error_e telebot_put_user_profile_photos | ( | telebot_user_profile_photos_t * | photos | ) |
This function is used to free memory allocated for user profile pictures object.
| [in] | photos | A pointer to user profile photo object, obtained with telebot_get_user_profile_photos. |
| telebot_error_e telebot_put_webhook_info | ( | telebot_webhook_info_t * | info | ) |
This function is used to release memory used for obtained information about telegram bot itself.
| [in] | info | Telegram webhook information object obtained with telebot_get_webhook_info. |
| telebot_error_e telebot_reopen_forum_topic | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | message_thread_id | ||
| ) |
Use this method to reopen a closed topic in a forum supergroup chat.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | message_thread_id | Unique identifier for the target message thread of the forum topic. |
| telebot_error_e telebot_reopen_general_forum_topic | ( | telebot_handler_t | handle, |
| long long int | chat_id | ||
| ) |
Use this method to reopen a closed 'General' topic in a forum supergroup chat.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| telebot_error_e telebot_restrict_chat_member | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | user_id, | ||
| long | until_date, | ||
| bool | can_send_messages, | ||
| bool | can_send_media_messages, | ||
| 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 | ||
| ) |
Restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass true for all boolean parameters to lift restrictions from a user.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
| [in] | user_id | Unique identifier of the target user. |
| [in] | until_date | Date when restrictions will be lifted for the user, unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever. |
| [in] | can_send_messages | Pass true, if the user is allowed to send text messages, contacts, locations and venues |
| [in] | can_send_media_messages | Pass true, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages |
| [in | can_send_polls Pass true, if the user is allowed to send polls, implies can_send_messages | |
| [in] | can_send_other_messages | Pass true, if the user can send animations, games, stickers and use inline bots, implies can_send_media_messages |
| [in] | can_add_web_page_previews | Pass true, if the user may add web page previews to their messages, implies can_send_media_messages. |
| [in] | can_change_info | Pass true, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups. |
| [in] | can_invite_users | Pass true, if the user is allowed to invite new users to the chat. |
| [in] | can_pin_messages | Pass true, if the user is allowed to pin messages. Ignored in public supergroups |
| telebot_error_e telebot_revoke_chat_invite_link | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | invite_link_str, | ||
| telebot_chat_invite_link_t * | invite_link | ||
| ) |
Use this method to revoke an invite link created by the bot.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | invite_link_str | The invite link to revoke. |
| [out] | invite_link | Pointer to get ChatInviteLink, MUST be released with telebot_put_chat_invite_link. |
| telebot_error_e telebot_send_animation | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | animation, | ||
| bool | is_file, | ||
| int | duration, | ||
| int | width, | ||
| int | height, | ||
| const char * | thumb, | ||
| const char * | caption, | ||
| const char * | parse_mode, | ||
| bool | disable_notification, | ||
| int | reply_to_message_id, | ||
| const char * | reply_markup | ||
| ) |
Send animation files (GIF or H.264/MPEG-4 AVC without sound).
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | animation | Animation file to send. It is either a file_id to resend an animation that exists on the Telegram servers, or a path to animation file. |
| [in] | is_file | False if animation is file_id, true, if animation is a file path. |
| [in] | duration | Duration of sent animation in seconds. |
| [in] | width | Animation width |
| [in] | height | Animation height |
| [in] | thumb | Thumbnail file path of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Optional. Set to NULL to ignore. |
| [in] | caption | Animation caption. (may also be used when resending animations). |
| [in] | parse_mode | Send Markdown or HTML, if you want Telegram apps to show bold, |
| [in] | disable_notification | Sends the message silently. Users will receive a notification with no sound. |
| [in] | reply_to_message_id | If the message is a reply, ID of the original message. |
| [in] | reply_markup | Additional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user. |
| telebot_error_e telebot_send_audio | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | audio, | ||
| bool | is_file, | ||
| const char * | caption, | ||
| const char * | parse_mode, | ||
| int | duration, | ||
| const char * | performer, | ||
| const char * | title, | ||
| const char * | thumb, | ||
| bool | disable_notification, | ||
| int | reply_to_message_id, | ||
| const char * | reply_markup | ||
| ) |
Send audio files. if you want Telegram clients to display them in the music player. Your audio must be in the .mp3 format. Bots can currently send audio files of up to 50 MB in size. For backward compatibility, when the fields title and performer are both empty and the mime-type of the file to be sent is not audio/mpeg, the file will be sent as a playable voice message. For this to work, the audio must be in an .ogg file encoded with OPUS. For sending voice messages, use the telegram_send_voice() function instead.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | audio | Audio file to send. It is either a file_id as String to resend an audio that is already on the Telegram servers, or a path to audio file. |
| [in] | is_file | False if audio is file_id, true, if audio is a file path. |
| [in] | caption | Audio caption. (may also be used when resending audios). |
| [in] | parse_mode | Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width or inline URLs in your bot's message. |
| [in] | duration | Duration of sent audio in seconds. |
| [in] | performer | The performer of the audio. |
| [in] | title | The track name of the audio. |
| [in] | thumb | Thumbnail file path of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Optional. Set to NULL to ignore. |
| [in] | disable_notification | Sends the message silently. Users will receive a notification with no sound. |
| [in] | reply_to_message_id | If the message is a reply, ID of the original message. |
| [in] | reply_markup | Additional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user. |
| telebot_error_e telebot_send_chat_action | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| char * | action | ||
| ) |
Tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of "Retrieving image, please wait…", the bot may use telebot_send_chat_action() with action = upload_photo. The user will see a "sending photo" status for the bot. It is only recommended to use when a response from the bot will take a noticeable amount of time to arrive.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
| [in] | action | Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_audio or upload_audio for audio files, upload_document for general files, find_location for location data. |
| telebot_error_e telebot_send_contact | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | phone_number, | ||
| const char * | first_name, | ||
| const char * | last_name, | ||
| const char * | vcard, | ||
| bool | disable_notification, | ||
| int | reply_to_message_id, | ||
| const char * | reply_markup | ||
| ) |
Send phone contacts.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | phone_number | Contact's phone numbers. |
| [in] | first_name | Contact's first name. |
| [in] | last_name | Contact's last name. |
| [in] | vcard | Additional data about the contact in the form of a vCard, 0-2048 bytes. |
| [in] | disable_notification | Sends the message silently. Users will receive a notification with no sound. |
| [in] | reply_to_message_id | If the message is a reply, ID of the original message. |
| [in] | reply_markup | Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. |
| telebot_error_e telebot_send_dice | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| bool | disable_notification, | ||
| int | reply_to_message_id, | ||
| const char * | reply_markup | ||
| ) |
Send a dice, which will have a random value from 1 to 6.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
| [in] | disable_notification | Sends the message silently. Users will receive a notification with no sound. |
| [in] | reply_to_message_id | If the message is a reply, ID of the original message. |
| [in] | reply_markup | Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. |
| telebot_error_e telebot_send_document | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | document, | ||
| bool | is_file, | ||
| const char * | thumb, | ||
| const char * | caption, | ||
| const char * | parse_mode, | ||
| bool | disable_notification, | ||
| int | reply_to_message_id, | ||
| const char * | reply_markup | ||
| ) |
Send general files.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | document | Document file to send. It is either a file_id as String to resend a file that is already on the Telegram servers, or a path to file. |
| [in] | is_file | False if document is file_id, true, if document is a file path. |
| [in] | thumb | Thumbnail file path of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Optional. Set to NULL to ignore. |
| [in] | caption | Document caption. (may also be used when resending documents). |
| [in] | parse_mode | Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width or inline URLs in your bot's message. |
| [in] | disable_notification | Sends the message silently. Users will receive a notification with no sound. |
| [in] | reply_to_message_id | If the message is a reply, ID of the original message. |
| [in] | reply_markup | Additional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user. |
| telebot_error_e telebot_send_location | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| float | latitude, | ||
| float | longitude, | ||
| int | live_period, | ||
| bool | disable_notification, | ||
| int | reply_to_message_id, | ||
| const char * | reply_markup | ||
| ) |
Send point on the map.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | latitude | Latitude of location. |
| [in] | longitude | Longitude of location. |
| [in] | live_period | Period in secnods for which the location will be updated. Should be between 60 and 86400. |
| [in] | disable_notification | Sends the message silently. Users will receive a notification with no sound. |
| [in] | reply_to_message_id | If the message is a reply, ID of the original message. |
| [in] | reply_markup | Additional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user. |
| telebot_error_e telebot_send_media_group | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| char * | media_paths[], | ||
| int | count, | ||
| bool | disable_notification, | ||
| int | reply_to_message_id | ||
| ) |
Send a group of photos as an album.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel. |
| [in] | media_paths | Array of file paths to photos to send. |
| [in] | count | Number of photos in the array (2–10). |
| [in] | disable_notification | Sends the message silently. |
| [in] | reply_to_message_id | If the message is a reply, ID of the original message. |
| telebot_error_e telebot_send_message | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | text, | ||
| const char * | parse_mode, | ||
| bool | disable_web_page_preview, | ||
| bool | disable_notification, | ||
| int | reply_to_message_id, | ||
| const char * | reply_markup | ||
| ) |
Send text messages.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | text | Text of the message to be sent, 1-4096 characters after entities parsing. |
| [in] | parse_mode | Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width or inline URLs in your bot's message. |
| [in] | disable_web_page_preview | Disables link previews for links in this message. |
| [in] | disable_notification | Sends the message silently. Users will receive a notification with no sound. |
| [in] | reply_to_message_id | If the message is a reply, ID of the original message. |
| [in] | reply_markup | Additional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user. |
| telebot_error_e telebot_send_photo | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | photo, | ||
| bool | is_file, | ||
| const char * | caption, | ||
| const char * | parse_mode, | ||
| bool | disable_notification, | ||
| int | reply_to_message_id, | ||
| const char * | reply_markup | ||
| ) |
Send photos.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | photo | Photo to send. It is either file_id as String to resend a photo that is already on the Telegram servers, or a path to photo file. |
| [in] | is_file | False if photo is file_id, true, if photo is a file path. |
| [in] | caption | Photo caption. (may also be used when resending photos). |
| [in] | parse_mode | Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width or inline URLs in your bot's message. |
| [in] | disable_notification | Sends the message silently. Users will receive a notification with no sound. |
| [in] | reply_to_message_id | If the message is a reply, ID of the original message. |
| [in] | reply_markup | Additional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user. |
| telebot_error_e telebot_send_poll | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | question, | ||
| const char ** | options, | ||
| int | count_options, | ||
| bool | is_anonymous, | ||
| const char * | type, | ||
| bool | allows_multiple_answers, | ||
| int | correct_option_id, | ||
| bool | is_closed, | ||
| bool | disable_notification, | ||
| int | reply_to_message_id, | ||
| const char * | reply_markup | ||
| ) |
Send a native poll.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | question | Poll question, 1-255 characters. |
| [in] | options | A aray of answer options, 2-10 strings 1-100 characters each. |
| [in] | count_options | Number of answer options. |
| [in] | is_anonymous | True, if the poll needs to be anonymous, defaults to True. |
| [in] | type | Poll type, “quiz” or “regular”, defaults to “regular”. |
| [in] | allows_multiple_answers | True, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False |
| [in] | correct_option_id | 0-based identifier of the correct answer option, required for polls in quiz mode. |
| [in] | is_closed | Pass True, if the poll needs to be immediately closed. This can be useful for poll preview. |
| [in] | disable_notification | Sends the message silently. Users will receive a notification with no sound. |
| [in] | reply_to_message_id | If the message is a reply, ID of the original message. |
| [in] | reply_markup | Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. |
| telebot_error_e telebot_send_sticker | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | sticker, | ||
| bool | is_file, | ||
| bool | disable_notification, | ||
| int | reply_to_message_id, | ||
| char * | reply_markup | ||
| ) |
Send static .WEBP or animated .TGS stickers.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
| [in] | sticker | Sticker file to send. It is either a file_id to resend a sticker that is already on the Telegram servers, or a path to file. |
| [in] | is_file | False if sticker is file_id, true, if sticker is a file path. |
| [in] | reply_to_message_id | If the message is a reply, ID of the original message. |
| [in] | reply_markup | Additional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user. |
| telebot_error_e telebot_send_venue | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| float | latitude, | ||
| float | longitude, | ||
| const char * | title, | ||
| const char * | address, | ||
| const char * | foursquare_id, | ||
| const char * | foursquare_type, | ||
| bool | disable_notification, | ||
| int | reply_to_message_id, | ||
| const char * | reply_markup | ||
| ) |
Send information about a venue.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | latitude | Latitude of venue. |
| [in] | longitude | Longitude of venue. |
| [in] | title | Name of the venue |
| [in] | address | Address of the venue. |
| [in] | foursquare_id | Foursquare identifier of the venue. |
| [in] | foursquare_type | Foursquare type of the venue, if known. |
| [in] | disable_notification | Sends the message silently. Users will receive a notification with no sound. |
| [in] | reply_to_message_id | If the message is a reply, ID of the original message. |
| [in] | reply_markup | Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user. |
| telebot_error_e telebot_send_video | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | video, | ||
| bool | is_file, | ||
| int | duration, | ||
| int | width, | ||
| int | height, | ||
| const char * | thumb, | ||
| const char * | caption, | ||
| const char * | parse_mode, | ||
| bool | supports_streaming, | ||
| bool | disable_notification, | ||
| int | reply_to_message_id, | ||
| const char * | reply_markup | ||
| ) |
Send video files, Telegram clients support mp4 videos (other formats may be sent as Document).
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | video | Video file to send. It is either a file_id as String to resend a video that is already on the Telegram servers, or a path to video file. |
| [in] | is_file | False if video is file_id, true, if video is a file path. |
| [in] | duration | Duration of sent video in seconds. Optional, set 0 for ignoring. |
| [in] | width | Video width. Optional, set 0 for ignoring. |
| [in] | height | Video heigh. Optional, set 0 for ignoring. |
| [in] | thumb | Thumbnail file path of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Optional. Set to NULL to ignore. |
| [in] | caption | Video caption. (may also be used when resending videos). |
| [in] | parse_mode | Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width or inline URLs in your bot's message. |
| [in] | supports_streaming | Pass True, if the uploaded video is suitable for streaming. |
| [in] | disable_notification | Sends the message silently. Users will receive a notification with no sound. |
| [in] | reply_to_message_id | If the message is a reply, ID of the original message. |
| [in] | reply_markup | Additional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user. |
| telebot_error_e telebot_send_video_note | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| char * | video_note, | ||
| bool | is_file, | ||
| int | duration, | ||
| int | length, | ||
| const char * | thumb, | ||
| bool | disable_notification, | ||
| int | reply_to_message_id, | ||
| const char * | reply_markup | ||
| ) |
Send video messages. As of v.4.0, Telegram clients support rounded square mp4 videos of up to 1 minute long.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | video_not | Video note to send. It is either a file_id to resend a video note that exists on the Telegram servers, or a path to video note file. |
| [in] | is_file | False if video note is file_id, true, if video note is a file path. |
| [in] | duration | Duration of sent video in seconds. |
| [in] | length | Video width and height, i.e. diameter of the video message. |
| [in] | thumb | Thumbnail file path of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Optional. Set to NULL to ignore. |
| [in] | disable_notification | Sends the message silently. Users will receive a notification with no sound. |
| [in] | reply_to_message_id | If the message is a reply, ID of the original message. |
| [in] | reply_markup | Additional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user. |
| [out] | response | Response data that contains the sent message on success. It MUST be freed with #telebot_put_response(). |
| telebot_error_e telebot_send_voice | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | voice, | ||
| bool | is_file, | ||
| const char * | caption, | ||
| const char * | parse_mode, | ||
| int | duration, | ||
| bool | disable_notification, | ||
| int | reply_to_message_id, | ||
| const char * | reply_markup | ||
| ) |
Send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document).
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | voice | Audio file to send. It is either a file_id as String to resend a audio that is already on the Telegram servers, or a path to audio file. |
| [in] | is_file | False if voice is file_id, true, if voice is a file path. |
| [in] | caption | Voice message caption. (may also be used when resending). |
| [in] | parse_mode | Send Markdown or HTML, if you want Telegram apps to show bold, |
| [in] | duration | Duration of sent voice/audio in seconds. |
| [in] | disable_notification | Sends the message silently. Users will receive a notification with no sound. |
| [in] | reply_to_message_id | If the message is a reply, ID of the original message. |
| [in] | reply_markup | Additional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user. |
| telebot_error_e telebot_set_chat_admin_custom_title | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | user_id, | ||
| const char * | custom_title | ||
| ) |
Export an invite link to a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | user_id | Unique identifier of the target user. |
| [in] | custom_title | New custom title for the administrator; 0-16 characters, emoji are not allowed. |
| telebot_error_e telebot_set_chat_description | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | description | ||
| ) |
Change the description of a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | description | New chat description, 0-255 characters. |
| telebot_error_e telebot_set_chat_menu_button | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | menu_button | ||
| ) |
Use this method to change the bot's menu button in a private chat, or the default menu button.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target private chat. |
| [in] | menu_button | A JSON-serialized object for the bot's new menu button. |
| telebot_error_e telebot_set_chat_permissions | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| bool | can_send_messages, | ||
| bool | can_send_media_messages, | ||
| 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 | ||
| ) |
Set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the 'can_restrict_members' admin rights.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
| [in] | can_send_messages | Pass true, if the user is allowed to send text messages, contacts, locations and venues |
| [in] | can_send_media_messages | Pass true, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages |
| [in | can_send_polls Pass true, if the user is allowed to send polls, implies can_send_messages | |
| [in] | can_send_other_messages | Pass true, if the user can send animations, games, stickers and use inline bots, implies can_send_media_messages |
| [in] | can_add_web_page_previews | Pass true, if the user may add web page previews to their messages, implies can_send_media_messages. |
| [in] | can_change_info | Pass true, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups. |
| [in] | can_invite_users | Pass true, if the user is allowed to invite new users to the chat. |
| [in] | can_pin_messages | Pass true, if the user is allowed to pin messages. Ignored in public supergroups |
| telebot_error_e telebot_set_chat_photo | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | photo | ||
| ) |
Set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | photo | New chat photo file path. |
| telebot_error_e telebot_set_chat_sticker_set | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | sticker_set_name | ||
| ) |
Set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use the field can_set_sticker_set optionally returned in telebot_get_chat requests to check if the bot can use it.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | sticker_set_name | Name of the sticker set to be set as the group sticker set. |
| telebot_error_e telebot_set_chat_title | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| const char * | title | ||
| ) |
Change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | title | New chat title, 1-255 characters. |
| telebot_error_e telebot_set_message_reaction | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | message_id, | ||
| const char * | reaction, | ||
| bool | is_big | ||
| ) |
Use this method to set a new message reaction.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | message_id | Unique identifier of the target message. |
| [in] | reaction | A JSON-serialized list of reaction types to set on the message. |
| [in] | is_big | Pass True to set the reaction with a big animation. |
| telebot_error_e telebot_set_my_commands | ( | telebot_handler_t | handle, |
| telebot_bot_command_t | commands[], | ||
| int | count | ||
| ) |
Change the list of the bot's commands.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | commands | Array of telegram bot commands. |
| [in] | count | The number of commands in array. |
| telebot_error_e telebot_set_my_default_administrator_rights | ( | telebot_handler_t | handle, |
| const char * | rights, | ||
| bool | for_channels | ||
| ) |
Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels.
| [in] | handle | The telebot handler. |
| [in] | rights | A JSON-serialized object describing new default administrator rights. |
| [in] | for_channels | Pass True to change the default administrator rights of the bot in channels. |
| telebot_error_e telebot_set_my_description | ( | telebot_handler_t | handle, |
| const char * | description, | ||
| const char * | language_code | ||
| ) |
Use this method to change the bot's description.
| [in] | handle | The telebot handler. |
| [in] | description | New bot description; 0-512 characters. |
| [in] | language_code | A two-letter ISO 639-1 language code. |
| telebot_error_e telebot_set_my_name | ( | telebot_handler_t | handle, |
| const char * | name, | ||
| const char * | language_code | ||
| ) |
Use this method to change the bot's name.
| [in] | handle | The telebot handler. |
| [in] | name | New bot name; 0-64 characters. |
| [in] | language_code | A two-letter ISO 639-1 language code. |
| telebot_error_e telebot_set_my_short_description | ( | telebot_handler_t | handle, |
| const char * | short_description, | ||
| const char * | language_code | ||
| ) |
Use this method to change the bot's short description.
| [in] | handle | The telebot handler. |
| [in] | short_description | New short description; 0-120 characters. |
| [in] | language_code | A two-letter ISO 639-1 language code. |
| telebot_error_e telebot_set_proxy | ( | telebot_handler_t | handle, |
| char * | addr, | ||
| char * | auth | ||
| ) |
Set proxy address to use telebot behind proxy.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | addr | Proxy address to use. |
| [in] | auth | Proxy authorization information. |
| telebot_error_e telebot_set_webhook | ( | telebot_handler_t | handle, |
| char * | url, | ||
| char * | certificate, | ||
| int | max_connections, | ||
| telebot_update_type_e | allowed_updates[], | ||
| int | allowed_updates_count | ||
| ) |
This function is used to specify a url and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified url, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | url | HTTPS url to send updates to. Use an empty string to remove webhook integration |
| [in] | certificate | A path to to a public key certificate to upload server. |
| [in] | max_connections | Optional Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot's server, and higher values to increase your bot's throughput. |
| [in] | allowed_updates | Array of the update types you want your bot to receive. |
| [in] | allowed_updates_count | Size of array of the update types. |
| telebot_error_e telebot_stop_message_live_location | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | message_id, | ||
| char * | inline_message_id, | ||
| const char * | reply_markup | ||
| ) |
Stop updating a live location message sent by the bot or via the bot (for inline bots) before live_period expires.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | message_id | Required if inline_message_id is not specified. Identifier of the sent message. |
| [in] | inline_message_id | Required if chat_id and message_id are not specified. Identifier of the inline message. |
| [in] | reply_markup | A JSON-serialized object for a new inline keyboard. |
| telebot_error_e telebot_stop_poll | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | message_id, | ||
| const char * | reply_markup | ||
| ) |
Stop a poll which was sent by the bot.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Required if inline_message_id. Unique identifier for the target chat or username of the target channel (in the format @channelusername). |
| [in] | message_id | Required if inline_message_id is not specified. Identifier of the sent message. |
| [in] | inline_message_id | Required if chat_id and message_id are not specified. Identifier of the inline message. |
| [in] | reply_markup | A JSON-serialized object for an inline keyboard. |
| telebot_error_e telebot_unban_chat_member | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | user_id | ||
| ) |
Unban a previously kicked user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername) |
| [in] | user_id | Unique identifier of the target user |
| telebot_error_e telebot_unban_chat_sender_chat | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| long long int | sender_chat_id | ||
| ) |
Use this method to unban a previously banned channel chat in a supergroup or a channel.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | sender_chat_id | Unique identifier of the target sender chat. |
| telebot_error_e telebot_unhide_general_forum_topic | ( | telebot_handler_t | handle, |
| long long int | chat_id | ||
| ) |
Use this method to unhide the 'General' topic in a forum supergroup chat.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| telebot_error_e telebot_unpin_all_forum_topic_messages | ( | telebot_handler_t | handle, |
| long long int | chat_id, | ||
| int | message_thread_id | ||
| ) |
Use this method to unpin all messages in a forum topic.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| [in] | message_thread_id | Unique identifier for the target message thread of the forum topic. |
| telebot_error_e telebot_unpin_all_general_forum_topic_messages | ( | telebot_handler_t | handle, |
| long long int | chat_id | ||
| ) |
Use this method to unpin all messages in a General forum topic.
| [in] | handle | The telebot handler. |
| [in] | chat_id | Unique identifier for the target chat. |
| telebot_error_e telebot_unpin_chat_message | ( | telebot_handler_t | handle, |
| long long int | chat_id | ||
| ) |
Unpin a message in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' admin right in the supergroup or 'can_edit_messages' admin right in the channel.
| [in] | handle | The telebot handler created with telebot_create(). |
| [in] | chat_id | Unique identifier for the target chat or username of the target channel (in the format @channelusername). |