Telebot 9.4
Library for Telegram bot API
Loading...
Searching...
No Matches
Files | Typedefs | Functions
Core Telegram Bot API

The APIs for the telegram bot interface, response is unparsed json sting. More...

Files

file  telebot-core.h
 This file contains core API for the telegram bot interface.
 

Typedefs

typedef struct telebot_core_handler * telebot_core_handler_t
 Telebot core handler opaque type.
 
typedef struct telebot_core_response * telebot_core_response_t
 Telebot core response opaque type.
 

Functions

telebot_error_e telebot_core_get_response_code (telebot_core_response_t response)
 Get response error code.
 
const char * telebot_core_get_response_data (telebot_core_response_t response)
 Get response data.
 
void telebot_core_put_response (telebot_core_response_t response)
 Release response data obtained with telebot core methods.
 
telebot_error_e telebot_core_create (telebot_core_handler_t *core_h, const char *token)
 Start function to use telebot core APIs.
 
telebot_error_e telebot_core_destroy (telebot_core_handler_t *core_h)
 Final function to use telebot core APIs.
 
telebot_error_e telebot_core_set_proxy (telebot_core_handler_t core_h, const char *addr, const char *auth)
 Set proxy address to use telebot behind proxy.
 
telebot_error_e telebot_core_get_proxy (telebot_core_handler_t core_h, char **addr)
 Get currently used proxy address.
 
telebot_core_response_t telebot_core_get_updates (telebot_core_handler_t core_h, int offset, int limit, int timeout, const char *allowed_updates)
 Receive incoming updates (long polling). It will not work if an outgoing webhook is set up. In order to avoid getting duplicate updates, recalculate offset after each server response.
 
telebot_core_response_t telebot_core_set_webhook (telebot_core_handler_t core_h, const char *url, const char *certificate, int max_connections, const char *allowed_updates)
 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_core_response_t telebot_core_delete_webhook (telebot_core_handler_t core_h)
 Remove webhook integration if you decide to switch back to getUpdates.
 
telebot_core_response_t telebot_core_get_webhook_info (telebot_core_handler_t core_h)
 Get current webhook status.
 
telebot_core_response_t telebot_core_get_me (telebot_core_handler_t core_h)
 Get basic information about the bot.
 
telebot_core_response_t telebot_core_send_message (telebot_core_handler_t core_h, 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_core_response_t telebot_core_forward_message (telebot_core_handler_t core_h, long long int chat_id, long long int from_chat_id, bool disable_notification, int message_id)
 Forward messages of any kind.
 
telebot_core_response_t telebot_core_send_photo (telebot_core_handler_t core_h, 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_core_response_t telebot_core_send_audio (telebot_core_handler_t core_h, 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_core_send_voice() function instead.
 
telebot_core_response_t telebot_core_send_document (telebot_core_handler_t core_h, 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_core_response_t telebot_core_send_video (telebot_core_handler_t core_h, 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_core_response_t telebot_core_send_animation (telebot_core_handler_t core_h, 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_core_response_t telebot_core_send_voice (telebot_core_handler_t core_h, 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_core_response_t telebot_core_send_video_note (telebot_core_handler_t core_h, 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_core_response_t telebot_core_send_media_group (telebot_core_handler_t core_h, 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_core_response_t telebot_core_send_location (telebot_core_handler_t core_h, 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_core_response_t telebot_core_edit_message_live_location (telebot_core_handler_t core_h, 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_core_stop_message_live_location().
 
telebot_core_response_t telebot_core_stop_message_live_location (telebot_core_handler_t core_h, 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_core_response_t telebot_core_send_venue (telebot_core_handler_t core_h, 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_core_response_t telebot_core_send_contact (telebot_core_handler_t core_h, 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_core_response_t telebot_core_send_poll (telebot_core_handler_t core_h, long long int chat_id, const char *question, const char *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_core_response_t telebot_core_send_dice (telebot_core_handler_t core_h, 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_core_response_t telebot_core_send_chat_action (telebot_core_handler_t core_h, long long int chat_id, const 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_core_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_core_response_t telebot_core_get_user_profile_photos (telebot_core_handler_t core_h, int user_id, int offset, int limit)
 Get user profile pictures object.
 
telebot_core_response_t telebot_core_get_file (telebot_core_handler_t core_h, const char *file_id)
 Get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size.
 
telebot_error_e telebot_core_download_file (telebot_core_handler_t core_h, const char *file_path, const char *out_file)
 Download file using file_path obtained with telebot_core_get_file(). 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 telebot_core_get_file() again.
 
telebot_core_response_t telebot_core_kick_chat_member (telebot_core_handler_t core_h, 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_core_response_t telebot_core_unban_chat_member (telebot_core_handler_t core_h, 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_core_response_t telebot_core_restrict_chat_member (telebot_core_handler_t core_h, 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_core_response_t telebot_core_promote_chat_member (telebot_core_handler_t core_h, 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_core_response_t telebot_core_set_chat_admin_custom_title (telebot_core_handler_t core_h, 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_core_response_t telebot_core_set_chat_permissions (telebot_core_handler_t core_h, 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_core_response_t telebot_core_export_chat_invite_link (telebot_core_handler_t core_h, long long int chat_id)
 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_core_response_t telebot_core_set_chat_photo (telebot_core_handler_t core_h, 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_core_response_t telebot_core_delete_chat_photo (telebot_core_handler_t core_h, 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_core_response_t telebot_core_set_chat_title (telebot_core_handler_t core_h, 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_core_response_t telebot_core_set_chat_description (telebot_core_handler_t core_h, 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_core_response_t telebot_core_pin_chat_message (telebot_core_handler_t core_h, 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_core_response_t telebot_core_unpin_chat_message (telebot_core_handler_t core_h, 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_core_response_t telebot_core_leave_chat (telebot_core_handler_t core_h, long long int chat_id)
 Leave a group, supergroup or channel.
 
telebot_core_response_t telebot_core_get_chat (telebot_core_handler_t core_h, long long int chat_id)
 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_core_response_t telebot_core_get_chat_admins (telebot_core_handler_t core_h, long long int chat_id)
 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_core_response_t telebot_core_get_chat_members_count (telebot_core_handler_t core_h, long long int chat_id)
 Get the number of members in a chat.
 
telebot_core_response_t telebot_core_get_chat_member (telebot_core_handler_t core_h, long long int chat_id, int user_id)
 Get information about a member of a chat.
 
telebot_core_response_t telebot_core_set_chat_sticker_set (telebot_core_handler_t core_h, 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_core_get_chat requests to check if the bot can use it.
 
telebot_core_response_t telebot_core_delete_chat_sticker_set (telebot_core_handler_t core_h, 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_core_get_chat requests to check if the bot can use this method.
 
telebot_core_response_t telebot_core_answer_callback_query (telebot_core_handler_t core_h, 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_core_response_t telebot_core_set_my_commands (telebot_core_handler_t core_h, const char *commands)
 Change the list of the bot's commands.
 
telebot_core_response_t telebot_core_get_my_commands (telebot_core_handler_t core_h)
 Get the current list of the bot's commands..
 
telebot_core_response_t telebot_core_edit_message_text (telebot_core_handler_t core_h, 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_core_response_t telebot_core_edit_message_caption (telebot_core_handler_t core_h, 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_core_response_t telebot_core_edit_message_reply_markup (telebot_core_handler_t core_h, 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_core_response_t telebot_core_edit_message_media (telebot_core_handler_t core_h, 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. If a message is part of a message album, then it can be edited only to an audio of the same type and with the same caption.
 
telebot_core_response_t telebot_core_stop_poll (telebot_core_handler_t core_h, long long int chat_id, int message_id, const char *reply_markup)
 Stop a poll which was sent by the bot.
 
telebot_core_response_t telebot_core_delete_message (telebot_core_handler_t core_h, long long int chat_id, int message_id)
 Delete a message, including service messages, with the following limitations:
 
telebot_core_response_t telebot_core_log_out (telebot_core_handler_t core_h)
 Use this method to log out from the cloud Bot API server before launching the bot locally.
 
telebot_core_response_t telebot_core_close (telebot_core_handler_t core_h)
 Use this method to close the bot instance before moving it from one local server to another.
 
telebot_core_response_t telebot_core_set_my_name (telebot_core_handler_t core_h, const char *name, const char *language_code)
 Use this method to change the bot's name.
 
telebot_core_response_t telebot_core_get_my_name (telebot_core_handler_t core_h, const char *language_code)
 Use this method to get the current bot name for the given user language.
 
telebot_core_response_t telebot_core_set_my_description (telebot_core_handler_t core_h, const char *description, const char *language_code)
 Use this method to change the bot's description.
 
telebot_core_response_t telebot_core_get_my_description (telebot_core_handler_t core_h, const char *language_code)
 Use this method to get the current bot description for the given user language.
 
telebot_core_response_t telebot_core_set_my_short_description (telebot_core_handler_t core_h, const char *short_description, const char *language_code)
 Use this method to change the bot's short description.
 
telebot_core_response_t telebot_core_get_my_short_description (telebot_core_handler_t core_h, const char *language_code)
 Use this method to get the current bot short description for the given user language.
 
telebot_core_response_t telebot_core_set_chat_menu_button (telebot_core_handler_t core_h, 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_core_response_t telebot_core_get_chat_menu_button (telebot_core_handler_t core_h, long long int chat_id)
 Use this method to get the current value of the bot's menu button in a private chat, or the default menu button.
 
telebot_core_response_t telebot_core_set_my_default_administrator_rights (telebot_core_handler_t core_h, 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_core_response_t telebot_core_get_my_default_administrator_rights (telebot_core_handler_t core_h, bool for_channels)
 Use this method to get the current default administrator rights of the bot.
 
telebot_core_response_t telebot_core_delete_my_commands (telebot_core_handler_t core_h, 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_core_response_t telebot_core_copy_message (telebot_core_handler_t core_h, 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)
 Use this method to copy messages of any kind.
 
telebot_core_response_t telebot_core_copy_messages (telebot_core_handler_t core_h, long long int chat_id, long long int from_chat_id, const char *message_ids, bool disable_notification, bool protect_content, bool remove_caption)
 Use this method to copy messages of any kind. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied.
 
telebot_core_response_t telebot_core_forward_messages (telebot_core_handler_t core_h, long long int chat_id, long long int from_chat_id, const char *message_ids, bool disable_notification, bool protect_content)
 Use this method to forward multiple messages of any kind.
 
telebot_core_response_t telebot_core_delete_messages (telebot_core_handler_t core_h, long long int chat_id, const char *message_ids)
 Use this method to delete multiple messages in a chat.
 
telebot_core_response_t telebot_core_ban_chat_member (telebot_core_handler_t core_h, 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_core_response_t telebot_core_ban_chat_sender_chat (telebot_core_handler_t core_h, 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_core_response_t telebot_core_unban_chat_sender_chat (telebot_core_handler_t core_h, 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_core_response_t telebot_core_create_chat_invite_link (telebot_core_handler_t core_h, long long int chat_id, const char *name, long expire_date, int member_limit, bool creates_join_request)
 Use this method to create an additional invite link for a chat.
 
telebot_core_response_t telebot_core_edit_chat_invite_link (telebot_core_handler_t core_h, long long int chat_id, const char *invite_link, const char *name, long expire_date, int member_limit, bool creates_join_request)
 Use this method to edit a non-primary invite link created by the bot.
 
telebot_core_response_t telebot_core_revoke_chat_invite_link (telebot_core_handler_t core_h, long long int chat_id, const char *invite_link)
 Use this method to revoke an invite link created by the bot.
 
telebot_core_response_t telebot_core_approve_chat_join_request (telebot_core_handler_t core_h, long long int chat_id, int user_id)
 Use this method to approve a chat join request.
 
telebot_core_response_t telebot_core_decline_chat_join_request (telebot_core_handler_t core_h, long long int chat_id, int user_id)
 Use this method to decline a chat join request.
 
telebot_core_response_t telebot_core_set_message_reaction (telebot_core_handler_t core_h, long long int chat_id, int message_id, const char *reaction, bool is_big)
 Use this method to set a new message reaction.
 
telebot_core_response_t telebot_core_create_forum_topic (telebot_core_handler_t core_h, long long int chat_id, const char *name, int icon_color, const char *icon_custom_emoji_id)
 Use this method to create a topic in a forum supergroup chat.
 
telebot_core_response_t telebot_core_edit_forum_topic (telebot_core_handler_t core_h, 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_core_response_t telebot_core_close_forum_topic (telebot_core_handler_t core_h, long long int chat_id, int message_thread_id)
 Use this method to close an open topic in a forum supergroup chat.
 
telebot_core_response_t telebot_core_reopen_forum_topic (telebot_core_handler_t core_h, long long int chat_id, int message_thread_id)
 Use this method to reopen a closed topic in a forum supergroup chat.
 
telebot_core_response_t telebot_core_delete_forum_topic (telebot_core_handler_t core_h, 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_core_response_t telebot_core_unpin_all_forum_topic_messages (telebot_core_handler_t core_h, long long int chat_id, int message_thread_id)
 Use this method to unpin all messages in a forum topic.
 
telebot_core_response_t telebot_core_get_forum_topic_icon_stickers (telebot_core_handler_t core_h)
 Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user.
 
telebot_core_response_t telebot_core_edit_general_forum_topic (telebot_core_handler_t core_h, 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_core_response_t telebot_core_close_general_forum_topic (telebot_core_handler_t core_h, long long int chat_id)
 Use this method to close an open 'General' topic in a forum supergroup chat.
 
telebot_core_response_t telebot_core_reopen_general_forum_topic (telebot_core_handler_t core_h, long long int chat_id)
 Use this method to reopen a closed 'General' topic in a forum supergroup chat.
 
telebot_core_response_t telebot_core_hide_general_forum_topic (telebot_core_handler_t core_h, long long int chat_id)
 Use this method to hide the 'General' topic in a forum supergroup chat.
 
telebot_core_response_t telebot_core_unhide_general_forum_topic (telebot_core_handler_t core_h, long long int chat_id)
 Use this method to unhide the 'General' topic in a forum supergroup chat.
 
telebot_core_response_t telebot_core_unpin_all_general_forum_topic_messages (telebot_core_handler_t core_h, long long int chat_id)
 Use this method to unpin all messages in a General forum topic.
 
telebot_core_response_t telebot_core_get_custom_emoji_stickers (telebot_core_handler_t core_h, const char *custom_emoji_ids)
 Use this method to get information about custom emoji stickers by their identifiers.
 
telebot_core_response_t telebot_core_answer_web_app_query (telebot_core_handler_t core_h, const char *web_app_query_id, const char *result)
 Use this method to send answers to an inline query to a user from a Web App.
 
telebot_core_response_t telebot_core_send_paid_media (telebot_core_handler_t core_h, long long int chat_id, int star_count, const char *media, const char *caption, const char *parse_mode, const char *caption_entities, bool show_caption_above_media, bool disable_notification, bool protect_content, const char *reply_parameters, const char *reply_markup)
 Use this method to send paid media to a user.
 
telebot_core_response_t telebot_core_answer_inline_query (telebot_core_handler_t core_h, 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_core_response_t telebot_core_save_prepared_inline_message (telebot_core_handler_t core_h, long long int user_id, const char *result, bool allow_user_chats, bool allow_bot_chats, bool allow_group_chats, bool allow_channel_chats)
 Use this method to save a prepared inline message.
 
telebot_core_response_t telebot_core_send_gift (telebot_core_handler_t core_h, 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_core_response_t telebot_core_gift_premium_subscription (telebot_core_handler_t core_h, 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_core_response_t telebot_core_get_my_star_balance (telebot_core_handler_t core_h)
 Use this method to get the current Telegram Stars balance of the bot.
 
telebot_core_response_t telebot_core_get_star_transactions (telebot_core_handler_t core_h, int offset, int limit)
 Use this method to get the bot's Telegram Star transactions.
 
telebot_core_response_t telebot_core_refund_star_payment (telebot_core_handler_t core_h, long long int user_id, const char *telegram_payment_charge_id)
 Use this method to refund a successful payment in Telegram Stars.
 
telebot_core_response_t telebot_core_get_available_gifts (telebot_core_handler_t core_h)
 Use this method to get a list of gifts that can be sent by the bot to users.
 
telebot_core_response_t telebot_core_get_user_gifts (telebot_core_handler_t core_h, long long int user_id, int offset, int limit)
 Use this method to get a list of gifts received by a user.
 
telebot_core_response_t telebot_core_get_chat_gifts (telebot_core_handler_t core_h, long long int chat_id, int offset, int limit)
 Use this method to get a list of gifts received by a chat.
 
telebot_core_response_t telebot_core_upgrade_gift (telebot_core_handler_t core_h, 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_core_response_t telebot_core_transfer_gift (telebot_core_handler_t core_h, long long int user_id, long long int chat_id, const char *gift_id)
 Use this method to transfer a gift.
 
telebot_core_response_t telebot_core_convert_gift_to_stars (telebot_core_handler_t core_h, const char *gift_id)
 Use this method to convert a gift to Telegram Stars.
 
telebot_core_response_t telebot_core_get_user_profile_audios (telebot_core_handler_t core_h, long long int user_id, int offset, int limit)
 Use this method to get user profile audios.
 
telebot_core_response_t telebot_core_set_my_profile_photo (telebot_core_handler_t core_h, const char *photo)
 Use this method to set the bot's profile photo.
 
telebot_core_response_t telebot_core_remove_my_profile_photo (telebot_core_handler_t core_h, const char *photo_id)
 Use this method to remove the bot's profile photo.
 
telebot_core_response_t telebot_core_get_business_connection (telebot_core_handler_t core_h, const char *business_connection_id)
 Use this method to get information about the business connection.
 
telebot_core_response_t telebot_core_get_user_chat_boosts (telebot_core_handler_t core_h, long long int chat_id, long long int user_id)
 Use this method to get user chat boosts.
 
telebot_core_response_t telebot_core_set_game_score (telebot_core_handler_t core_h, 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)
 Use this method to set the score of the specified user in a game.
 
telebot_core_response_t telebot_core_get_game_high_scores (telebot_core_handler_t core_h, long long int user_id, long long int chat_id, int message_id, const char *inline_message_id)
 Use this method to get data for high score tables.
 
telebot_core_response_t telebot_core_send_game (telebot_core_handler_t core_h, 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)
 Use this method to send a game.
 
telebot_core_response_t telebot_core_set_passport_data_errors (telebot_core_handler_t core_h, long long int user_id, const char *errors)
 Use this method to set passport data errors.
 
telebot_core_response_t telebot_core_send_invoice (telebot_core_handler_t core_h, 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)
 Use this method to send an invoice.
 
telebot_core_response_t telebot_core_create_invoice_link (telebot_core_handler_t core_h, 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)
 Use this method to create a link for an invoice.
 
telebot_core_response_t telebot_core_answer_shipping_query (telebot_core_handler_t core_h, const char *shipping_query_id, bool ok, const char *shipping_options, const char *error_message)
 Use this method to reply to shipping queries.
 
telebot_core_response_t telebot_core_answer_pre_checkout_query (telebot_core_handler_t core_h, const char *pre_checkout_query_id, bool ok, const char *error_message)
 Use this method to respond to pre-checkout queries.
 

Detailed Description

The APIs for the telegram bot interface, response is unparsed json sting.

Function Documentation

◆ telebot_core_answer_callback_query()

telebot_core_response_t telebot_core_answer_callback_query ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]callback_query_idUnique identifier for the query to be answered.
[in]textText of the notification. If not specified, nothing will be shown to the user, 0-200 characters
[in]show_alertIf true, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.
[in]urlURL 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_timeThe 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.
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_answer_inline_query()

telebot_core_response_t telebot_core_answer_inline_query ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler.
[in]inline_query_idUnique identifier for the answered query.
[in]resultsA JSON-serialized array of results for the inline query.
[in]cache_timeThe maximum amount of time in seconds that the result of the inline query may be cached on the server.
[in]is_personalPass True, if results may be cached only for the user that sent the query.
[in]next_offsetPass the offset that a client should send in the next query with the same text to receive more results.
[in]buttonA JSON-serialized object describing a button to be shown above inline query results.
Returns
telebot_core_response_t response.

◆ telebot_core_answer_web_app_query()

telebot_core_response_t telebot_core_answer_web_app_query ( telebot_core_handler_t  core_h,
const char *  web_app_query_id,
const char *  result 
)

Use this method to send answers to an inline query to a user from a Web App.

Parameters
[in]core_hThe telebot core handler.
[in]web_app_query_idUnique identifier for the query to be answered.
[in]resultA JSON-serialized object describing the message to be sent.
Returns
telebot_core_response_t response that contains SentWebAppMessage.

◆ telebot_core_approve_chat_join_request()

telebot_core_response_t telebot_core_approve_chat_join_request ( telebot_core_handler_t  core_h,
long long int  chat_id,
int  user_id 
)

Use this method to approve a chat join request.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]user_idUnique identifier of the target user.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_ban_chat_member()

telebot_core_response_t telebot_core_ban_chat_member ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]user_idUnique identifier of the target user.
[in]until_dateDate when the user will be unbanned, unix time.
[in]revoke_messagesPass True to delete all messages from the chat for the user that is being banned.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_ban_chat_sender_chat()

telebot_core_response_t telebot_core_ban_chat_sender_chat ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]sender_chat_idUnique identifier of the target sender chat.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_close()

telebot_core_response_t telebot_core_close ( telebot_core_handler_t  core_h)

Use this method to close the bot instance before moving it from one local server to another.

Parameters
[in]core_hThe telebot core handler.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_close_forum_topic()

telebot_core_response_t telebot_core_close_forum_topic ( telebot_core_handler_t  core_h,
long long int  chat_id,
int  message_thread_id 
)

Use this method to close an open topic in a forum supergroup chat.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]message_thread_idUnique identifier for the target message thread of the forum topic.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_close_general_forum_topic()

telebot_core_response_t telebot_core_close_general_forum_topic ( telebot_core_handler_t  core_h,
long long int  chat_id 
)

Use this method to close an open 'General' topic in a forum supergroup chat.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_convert_gift_to_stars()

telebot_core_response_t telebot_core_convert_gift_to_stars ( telebot_core_handler_t  core_h,
const char *  gift_id 
)

Use this method to convert a gift to Telegram Stars.

Parameters
[in]core_hThe telebot core handler.
[in]gift_idIdentifier of the gift.
Returns
telebot_core_response_t response.

◆ telebot_core_copy_message()

telebot_core_response_t telebot_core_copy_message ( telebot_core_handler_t  core_h,
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 
)

Use this method to copy messages of any kind.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]from_chat_idUnique identifier for the chat where the original message was sent.
[in]message_idMessage identifier in the chat specified by from_chat_id.
[in]captionNew caption for media, 0-1024 characters after entities parsing.
[in]parse_modeMode for parsing entities in the new caption.
[in]caption_entitiesA JSON-serialized list of special entities that appear in the new caption.
[in]disable_notificationSends the message silently.
[in]protect_contentProtects the contents of the sent message from forwarding and saving.
[in]reply_to_message_idIf the message is a reply, ID of the original message.
[in]allow_sending_without_replyPass True if the message should be sent even if the specified replied-to message is not found.
[in]reply_markupAdditional interface options.
Returns
telebot_core_response_t response that contains MessageId.

◆ telebot_core_copy_messages()

telebot_core_response_t telebot_core_copy_messages ( telebot_core_handler_t  core_h,
long long int  chat_id,
long long int  from_chat_id,
const char *  message_ids,
bool  disable_notification,
bool  protect_content,
bool  remove_caption 
)

Use this method to copy messages of any kind. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]from_chat_idUnique identifier for the chat where the original messages were sent.
[in]message_idsA JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to copy.
[in]disable_notificationSends the messages silently.
[in]protect_contentProtects the contents of the sent messages from forwarding and saving.
[in]remove_captionPass True to copy the messages without their captions.
Returns
telebot_core_response_t response that contains an array of MessageId.

◆ telebot_core_create()

telebot_error_e telebot_core_create ( telebot_core_handler_t core_h,
const char *  token 
)

Start function to use telebot core APIs.

This function must be used first to call, and it creates handler that is used as input to other functions in telebot core interface. This call MUST have corresponding call to telebot_core_destroy when operation is complete.

Parameters
core_h[out]A pointer to a handler, which will be allocated and created. Obtained handler MUST be released with telebot_core_destroy()
token[in]Telegram bot token to use.
Returns
on Success, TELEBOT_ERROR_NONE is returned, otherwise a negative error value.

◆ telebot_core_create_chat_invite_link()

telebot_core_response_t telebot_core_create_chat_invite_link ( telebot_core_handler_t  core_h,
long long int  chat_id,
const char *  name,
long  expire_date,
int  member_limit,
bool  creates_join_request 
)

Use this method to create an additional invite link for a chat.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]nameInvite link name; 0-32 characters.
[in]expire_datePoint in time (Unix timestamp) when the link will expire.
[in]member_limitThe 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_requestTrue, if users joining the chat via the link need to be approved by chat administrators.
Returns
telebot_core_response_t response that contains ChatInviteLink.

◆ telebot_core_create_forum_topic()

telebot_core_response_t telebot_core_create_forum_topic ( telebot_core_handler_t  core_h,
long long int  chat_id,
const char *  name,
int  icon_color,
const char *  icon_custom_emoji_id 
)

Use this method to create a topic in a forum supergroup chat.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]nameTopic name, 1-128 characters.
[in]icon_colorColor of the topic icon in RGB format.
[in]icon_custom_emoji_idUnique identifier of the custom emoji used as the topic icon.
Returns
telebot_core_response_t response that contains ForumTopic.

◆ telebot_core_decline_chat_join_request()

telebot_core_response_t telebot_core_decline_chat_join_request ( telebot_core_handler_t  core_h,
long long int  chat_id,
int  user_id 
)

Use this method to decline a chat join request.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]user_idUnique identifier of the target user.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_delete_chat_photo()

telebot_core_response_t telebot_core_delete_chat_photo ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_delete_chat_sticker_set()

telebot_core_response_t telebot_core_delete_chat_sticker_set ( telebot_core_handler_t  core_h,
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_core_get_chat requests to check if the bot can use this method.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_delete_forum_topic()

telebot_core_response_t telebot_core_delete_forum_topic ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]message_thread_idUnique identifier for the target message thread of the forum topic.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_delete_message()

telebot_core_response_t telebot_core_delete_message ( telebot_core_handler_t  core_h,
long long int  chat_id,
int  message_id 
)

Delete a message, including service messages, with the following limitations:

  • A message can only be deleted if it was sent less than 48 hours ago.
  • Bots can delete outgoing messages in groups and supergroups.
  • Bots granted can_post_messages permissions can delete outgoing messages in channels.
  • If the bot is an administrator of a group, it can delete any message there.
  • If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.
    Parameters
    [in]core_hThe telebot core handler created with telebot_core_create().
    [in]chat_idUnique identifier for the target chat or username of the target message_id Message identifier to be deleted.
    Returns
    telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_delete_messages()

telebot_core_response_t telebot_core_delete_messages ( telebot_core_handler_t  core_h,
long long int  chat_id,
const char *  message_ids 
)

Use this method to delete multiple messages in a chat.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]message_idsA JSON-serialized list of 1-100 identifiers of messages to delete.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_delete_my_commands()

telebot_core_response_t telebot_core_delete_my_commands ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler.
[in]scopeA JSON-serialized object, describing scope of users for which the commands are relevant.
[in]language_codeA two-letter ISO 639-1 language code.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_delete_webhook()

telebot_core_response_t telebot_core_delete_webhook ( telebot_core_handler_t  core_h)

Remove webhook integration if you decide to switch back to getUpdates.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_destroy()

telebot_error_e telebot_core_destroy ( telebot_core_handler_t core_h)

Final function to use telebot core APIs.

This function must be the last function to call for a telebot core use. It is the opposite of the telebot_core_create function and MUST be called with the same handler as the input that a telebot_core_create call created.

Parameters
[in,out]core_hThe A pointer to telebot core handler created with telebot_core_create().
Returns
on Success, TELEBOT_ERROR_NONE is returned, otherwise a negative error value.

◆ telebot_core_download_file()

telebot_error_e telebot_core_download_file ( telebot_core_handler_t  core_h,
const char *  file_path,
const char *  out_file 
)

Download file using file_path obtained with telebot_core_get_file(). 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 telebot_core_get_file() again.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]file_pathA file path take from the response of telebot_core_get_file()
[in]out_fileFull path to download and save file.
Returns
on Success, TELEBOT_ERROR_NONE is returned, otherwise a negative error value. No response, i.e., core_h->resp_data contains nothing.

◆ telebot_core_edit_chat_invite_link()

telebot_core_response_t telebot_core_edit_chat_invite_link ( telebot_core_handler_t  core_h,
long long int  chat_id,
const char *  invite_link,
const char *  name,
long  expire_date,
int  member_limit,
bool  creates_join_request 
)

Use this method to edit a non-primary invite link created by the bot.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]invite_linkThe invite link to edit.
[in]nameInvite link name; 0-32 characters.
[in]expire_datePoint in time (Unix timestamp) when the link will expire.
[in]member_limitThe 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_requestTrue, if users joining the chat via the link need to be approved by chat administrators.
Returns
telebot_core_response_t response that contains ChatInviteLink.

◆ telebot_core_edit_forum_topic()

telebot_core_response_t telebot_core_edit_forum_topic ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]message_thread_idUnique identifier for the target message thread of the forum topic.
[in]nameNew topic name, 0-128 characters.
[in]icon_custom_emoji_idNew unique identifier of the custom emoji used as the topic icon.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_edit_general_forum_topic()

telebot_core_response_t telebot_core_edit_general_forum_topic ( telebot_core_handler_t  core_h,
long long int  chat_id,
const char *  name 
)

Use this method to edit the name of the 'General' topic in a forum supergroup chat.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]nameNew topic name, 1-128 characters.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_edit_message_caption()

telebot_core_response_t telebot_core_edit_message_caption ( telebot_core_handler_t  core_h,
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).

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idRequired if inline_message_id. Unique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]message_idRequired if inline_message_id is not specified. Identifier of the sent message.
[in]inline_message_idRequired if chat_id and message_id are not specified. Identifier of the inline message.
[in]captionNew caption of the message.
[in]reply_markupA JSON-serialized object for an inline keyboard.
Returns
telebot_core_response_t response that contains the message edited, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_edit_message_live_location()

telebot_core_response_t telebot_core_edit_message_live_location ( telebot_core_handler_t  core_h,
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_core_stop_message_live_location().

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]message_idRequired if inline_message_id is not specified. Identifier of the sent message.
[in]inline_message_idRequired if chat_id and message_id are not specified. Identifier of the inline message.
[in]latitudeLatitude of location.
[in]longitudeLongitude of location.
[in]reply_markupA JSON-serialized object for a new inline keyboard.
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_edit_message_media()

telebot_core_response_t telebot_core_edit_message_media ( telebot_core_handler_t  core_h,
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. If a message is part of a message album, then it can be edited only to an audio of the same type and with the same caption.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idRequired if inline_message_id is not specified.
[in]message_idRequired if inline_message_id is not specified.
[in]inline_message_idRequired if chat_id and message_id are not specified.
[in]mediaA JSON-serialized object for a new media content of the message.
[in]reply_markupA JSON-serialized object for a new inline keyboard.
Returns
telebot_core_response_t response that contains the edited message.

◆ telebot_core_edit_message_reply_markup()

telebot_core_response_t telebot_core_edit_message_reply_markup ( telebot_core_handler_t  core_h,
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).

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idRequired if inline_message_id. Unique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]message_idRequired if inline_message_id is not specified. Identifier of the sent message.
[in]inline_message_idRequired if chat_id and message_id are not specified. Identifier of the inline message.
[in]reply_markupA JSON-serialized object for an inline keyboard.
Returns
telebot_core_response_t response that contains the message edited, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_edit_message_text()

telebot_core_response_t telebot_core_edit_message_text ( telebot_core_handler_t  core_h,
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).

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idRequired if inline_message_id. Unique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]message_idRequired if inline_message_id is not specified. Identifier of the sent message.
[in]inline_message_idRequired if chat_id and message_id are not specified. Identifier of the inline message.
[in]textNew text of the message.
[in]parse_modeSend 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_priviewDisables link previews for links in this message.
[in]reply_markupA JSON-serialized object for an inline keyboard.
Returns
telebot_core_response_t response that contains the message edited, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_export_chat_invite_link()

telebot_core_response_t telebot_core_export_chat_invite_link ( telebot_core_handler_t  core_h,
long long int  chat_id 
)

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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
Returns
telebot_core_response_t response that contains new invite link, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_forward_message()

telebot_core_response_t telebot_core_forward_message ( telebot_core_handler_t  core_h,
long long int  chat_id,
long long int  from_chat_id,
bool  disable_notification,
int  message_id 
)

Forward messages of any kind.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]from_chat_idUnique identifier for the chat where the original message was sent (or channel username in the format @channelusername).
[in]disable_notificationSends the message silently. Users will receive a notification with no sound.
[in]message_idUnique message identifier.
Returns
telebot_core_response_t response that contains the sent message, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_forward_messages()

telebot_core_response_t telebot_core_forward_messages ( telebot_core_handler_t  core_h,
long long int  chat_id,
long long int  from_chat_id,
const char *  message_ids,
bool  disable_notification,
bool  protect_content 
)

Use this method to forward multiple messages of any kind.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]from_chat_idUnique identifier for the chat where the original messages were sent.
[in]message_idsA JSON-serialized list of 1-100 identifiers of messages in the chat from_chat_id to forward.
[in]disable_notificationSends the messages silently.
[in]protect_contentProtects the contents of the sent messages from forwarding and saving.
Returns
telebot_core_response_t response that contains an array of MessageId.

◆ telebot_core_get_available_gifts()

telebot_core_response_t telebot_core_get_available_gifts ( telebot_core_handler_t  core_h)

Use this method to get a list of gifts that can be sent by the bot to users.

Parameters
[in]core_hThe telebot core handler.
Returns
telebot_core_response_t response.

◆ telebot_core_get_business_connection()

telebot_core_response_t telebot_core_get_business_connection ( telebot_core_handler_t  core_h,
const char *  business_connection_id 
)

Use this method to get information about the business connection.

Parameters
[in]core_hThe telebot core handler.
[in]business_connection_idUnique identifier of the business connection.
Returns
telebot_core_response_t response.

◆ telebot_core_get_chat()

telebot_core_response_t telebot_core_get_chat ( telebot_core_handler_t  core_h,
long long int  chat_id 
)

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).

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
Returns
telebot_core_response_t response that contains chat object, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_get_chat_admins()

telebot_core_response_t telebot_core_get_chat_admins ( telebot_core_handler_t  core_h,
long long int  chat_id 
)

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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
Returns
telebot_core_response_t response that contains an array of chat members, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_get_chat_gifts()

telebot_core_response_t telebot_core_get_chat_gifts ( telebot_core_handler_t  core_h,
long long int  chat_id,
int  offset,
int  limit 
)

Use this method to get a list of gifts received by a chat.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier of the target chat.
[in]offsetNumber of gifts to skip.
[in]limitMaximum number of gifts to be retrieved.
Returns
telebot_core_response_t response.

◆ telebot_core_get_chat_member()

telebot_core_response_t telebot_core_get_chat_member ( telebot_core_handler_t  core_h,
long long int  chat_id,
int  user_id 
)

Get information about a member of a chat.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]user_idUnique identifier of the target user.
Returns
telebot_core_response_t response that contains a chat member, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_get_chat_members_count()

telebot_core_response_t telebot_core_get_chat_members_count ( telebot_core_handler_t  core_h,
long long int  chat_id 
)

Get the number of members in a chat.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
Returns
telebot_core_response_t response that contains the number of chat members, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_get_chat_menu_button()

telebot_core_response_t telebot_core_get_chat_menu_button ( telebot_core_handler_t  core_h,
long long int  chat_id 
)

Use this method to get the current value of the bot's menu button in a private chat, or the default menu button.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target private chat.
Returns
telebot_core_response_t response that contains MenuButton.

◆ telebot_core_get_custom_emoji_stickers()

telebot_core_response_t telebot_core_get_custom_emoji_stickers ( telebot_core_handler_t  core_h,
const char *  custom_emoji_ids 
)

Use this method to get information about custom emoji stickers by their identifiers.

Parameters
[in]core_hThe telebot core handler.
[in]custom_emoji_idsList of custom emoji identifiers.
Returns
telebot_core_response_t response that contains an array of Sticker objects.

◆ telebot_core_get_file()

telebot_core_response_t telebot_core_get_file ( telebot_core_handler_t  core_h,
const char *  file_id 
)

Get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]file_idFile identifier to get info about.
Returns
telebot_core_response_t response that contains file object, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_get_forum_topic_icon_stickers()

telebot_core_response_t telebot_core_get_forum_topic_icon_stickers ( telebot_core_handler_t  core_h)

Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user.

Parameters
[in]core_hThe telebot core handler.
Returns
telebot_core_response_t response that contains an array of Sticker objects.

◆ telebot_core_get_me()

telebot_core_response_t telebot_core_get_me ( telebot_core_handler_t  core_h)

Get basic information about the bot.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[out]responseResponse data, MUST be freed with telebot_core_put_response().
Returns
telebot_core_response_t response that contains bot information, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_get_my_commands()

telebot_core_response_t telebot_core_get_my_commands ( telebot_core_handler_t  core_h)

Get the current list of the bot's commands..

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
Returns
telebot_core_response_t response that contains an array of bot commands, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_get_my_default_administrator_rights()

telebot_core_response_t telebot_core_get_my_default_administrator_rights ( telebot_core_handler_t  core_h,
bool  for_channels 
)

Use this method to get the current default administrator rights of the bot.

Parameters
[in]core_hThe telebot core handler.
[in]for_channelsPass True to get default administrator rights of the bot in channels.
Returns
telebot_core_response_t response that contains ChatAdministratorRights.

◆ telebot_core_get_my_description()

telebot_core_response_t telebot_core_get_my_description ( telebot_core_handler_t  core_h,
const char *  language_code 
)

Use this method to get the current bot description for the given user language.

Parameters
[in]core_hThe telebot core handler.
[in]language_codeA two-letter ISO 639-1 language code.
Returns
telebot_core_response_t response that contains BotDescription.

◆ telebot_core_get_my_name()

telebot_core_response_t telebot_core_get_my_name ( telebot_core_handler_t  core_h,
const char *  language_code 
)

Use this method to get the current bot name for the given user language.

Parameters
[in]core_hThe telebot core handler.
[in]language_codeA two-letter ISO 639-1 language code.
Returns
telebot_core_response_t response that contains BotName.

◆ telebot_core_get_my_short_description()

telebot_core_response_t telebot_core_get_my_short_description ( telebot_core_handler_t  core_h,
const char *  language_code 
)

Use this method to get the current bot short description for the given user language.

Parameters
[in]core_hThe telebot core handler.
[in]language_codeA two-letter ISO 639-1 language code.
Returns
telebot_core_response_t response that contains BotShortDescription.

◆ telebot_core_get_my_star_balance()

telebot_core_response_t telebot_core_get_my_star_balance ( telebot_core_handler_t  core_h)

Use this method to get the current Telegram Stars balance of the bot.

Parameters
[in]core_hThe telebot core handler.
Returns
telebot_core_response_t response.

◆ telebot_core_get_proxy()

telebot_error_e telebot_core_get_proxy ( telebot_core_handler_t  core_h,
char **  addr 
)

Get currently used proxy address.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[out]addrCurrent proxy address or NULL, MUST be freed after use.
Returns
on Success, TELEBOT_ERROR_NONE is returned, otherwise a negative error value.

◆ telebot_core_get_response_code()

telebot_error_e telebot_core_get_response_code ( telebot_core_response_t  response)

Get response error code.

Parameters
[in]responseResponse to get its error code.
Returns
on For successful responses TELEBOT_ERROR_NONE is returned, otherwise a negative error value
See also
telebot_error_e

◆ telebot_core_get_response_data()

const char * telebot_core_get_response_data ( telebot_core_response_t  response)

Get response data.

Parameters
[in]responseResponse to get its data.
Returns
on For successful responses null terminated string is returned, otherwise NULL.

◆ telebot_core_get_star_transactions()

telebot_core_response_t telebot_core_get_star_transactions ( telebot_core_handler_t  core_h,
int  offset,
int  limit 
)

Use this method to get the bot's Telegram Star transactions.

Parameters
[in]core_hThe telebot core handler.
[in]offsetNumber of transactions to skip.
[in]limitMaximum number of transactions to be retrieved.
Returns
telebot_core_response_t response.

◆ telebot_core_get_updates()

telebot_core_response_t telebot_core_get_updates ( telebot_core_handler_t  core_h,
int  offset,
int  limit,
int  timeout,
const char *  allowed_updates 
)

Receive incoming updates (long polling). It will not work if an outgoing webhook is set up. In order to avoid getting duplicate updates, recalculate offset after each server response.

Parameters
[in]core_hTelebot core handler creating using telebot_core_create().
[in]offsetIdentifier of the first update to be returned. Must be greater by one than the highest among the identifiers of previously received updates. By default, updates starting with the earliest unconfirmed update are returned. An update is considered confirmed as soon as the function is called with an offset higher than its update_id.
[in]limitLimits the number of updates to be retrieved. Values between 1—100 are accepted. Defaults to 100.
[in]timeoutTimeout in seconds for long polling. Defaults to 0, i.e. usual short polling.
[in]allowed_updatesList the types of update you want your bot to receive. Specify an empty list to receive all updates regardless of type (default).
Returns
telebot_core_response_t response that contains updates, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_get_user_chat_boosts()

telebot_core_response_t telebot_core_get_user_chat_boosts ( telebot_core_handler_t  core_h,
long long int  chat_id,
long long int  user_id 
)

Use this method to get user chat boosts.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]user_idUnique identifier of the target user.
Returns
telebot_core_response_t response.

◆ telebot_core_get_user_gifts()

telebot_core_response_t telebot_core_get_user_gifts ( telebot_core_handler_t  core_h,
long long int  user_id,
int  offset,
int  limit 
)

Use this method to get a list of gifts received by a user.

Parameters
[in]core_hThe telebot core handler.
[in]user_idUnique identifier of the target user.
[in]offsetNumber of gifts to skip.
[in]limitMaximum number of gifts to be retrieved.
Returns
telebot_core_response_t response.

◆ telebot_core_get_user_profile_audios()

telebot_core_response_t telebot_core_get_user_profile_audios ( telebot_core_handler_t  core_h,
long long int  user_id,
int  offset,
int  limit 
)

Use this method to get user profile audios.

Parameters
[in]core_hThe telebot core handler.
[in]user_idUnique identifier of the target user.
[in]offsetNumber of audios to skip.
[in]limitMaximum number of audios to be retrieved.
Returns
telebot_core_response_t response.

◆ telebot_core_get_user_profile_photos()

telebot_core_response_t telebot_core_get_user_profile_photos ( telebot_core_handler_t  core_h,
int  user_id,
int  offset,
int  limit 
)

Get user profile pictures object.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]user_idUnique identifier of the target user.
[in]offsetSequential number of the first photo to be returned. By default, all photos are returned.
[in]limitLimits the number of photos to be retrieved. Values between 1—100 are accepted. Defaults to 100.
Returns
telebot_core_response_t response that contains user profile photos, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_get_webhook_info()

telebot_core_response_t telebot_core_get_webhook_info ( telebot_core_handler_t  core_h)

Get current webhook status.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
Returns
telebot_core_response_t response that contains webhook information, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_gift_premium_subscription()

telebot_core_response_t telebot_core_gift_premium_subscription ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler.
[in]user_idUnique identifier of the target user.
[in]month_countNumber of months the Telegram Premium subscription will be active.
[in]star_countNumber of Telegram Stars to pay.
[in]textText that will be shown along with the service message.
[in]text_parse_modeMode for parsing entities in the text.
[in]text_entitiesA JSON-serialized list of special entities.
Returns
telebot_core_response_t response.

◆ telebot_core_hide_general_forum_topic()

telebot_core_response_t telebot_core_hide_general_forum_topic ( telebot_core_handler_t  core_h,
long long int  chat_id 
)

Use this method to hide the 'General' topic in a forum supergroup chat.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_kick_chat_member()

telebot_core_response_t telebot_core_kick_chat_member ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername)
[in]user_idUnique identifier of the target user
[in]until_dateDate 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.
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_leave_chat()

telebot_core_response_t telebot_core_leave_chat ( telebot_core_handler_t  core_h,
long long int  chat_id 
)

Leave a group, supergroup or channel.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_log_out()

telebot_core_response_t telebot_core_log_out ( telebot_core_handler_t  core_h)

Use this method to log out from the cloud Bot API server before launching the bot locally.

Parameters
[in]core_hThe telebot core handler.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_pin_chat_message()

telebot_core_response_t telebot_core_pin_chat_message ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]message_idIdentifier of a message to pin.
[in]disable_notificationPass 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.
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_promote_chat_member()

telebot_core_response_t telebot_core_promote_chat_member ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]user_idUnique identifier of the target user.
[in]can_change_infoPass true, if the administrator can change chat title, photo and other settings.
[in]can_post_messagesPass true, if the administrator can create channel posts, channels only.
[in]can_edit_messagesPass true, if the administrator can edit messages of other users and can pin messages, channels only.
[in]can_delete_messagesPass true, if the administrator can delete messages of other users.
[in]can_invite_usersPass true, if the administrator can invite new users to the chat.
[in]can_restrict_membersPass true, if the administrator can restrict, ban or unban chat members.
[in]can_pin_messagesPass true, if the administrator can pin messages, supergroups only.
[in]can_promote_membersPass 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).
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_put_response()

void telebot_core_put_response ( telebot_core_response_t  response)

Release response data obtained with telebot core methods.

Parameters
[in]responseResponse to release.

◆ telebot_core_refund_star_payment()

telebot_core_response_t telebot_core_refund_star_payment ( telebot_core_handler_t  core_h,
long long int  user_id,
const char *  telegram_payment_charge_id 
)

Use this method to refund a successful payment in Telegram Stars.

Parameters
[in]core_hThe telebot core handler.
[in]user_idIdentifier of the user whose payment will be refunded.
[in]telegram_payment_charge_idTelegram payment identifier.
Returns
telebot_core_response_t response.

◆ telebot_core_remove_my_profile_photo()

telebot_core_response_t telebot_core_remove_my_profile_photo ( telebot_core_handler_t  core_h,
const char *  photo_id 
)

Use this method to remove the bot's profile photo.

Parameters
[in]core_hThe telebot core handler.
[in]photo_idIdentifier of the photo to remove.
Returns
telebot_core_response_t response.

◆ telebot_core_reopen_forum_topic()

telebot_core_response_t telebot_core_reopen_forum_topic ( telebot_core_handler_t  core_h,
long long int  chat_id,
int  message_thread_id 
)

Use this method to reopen a closed topic in a forum supergroup chat.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]message_thread_idUnique identifier for the target message thread of the forum topic.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_reopen_general_forum_topic()

telebot_core_response_t telebot_core_reopen_general_forum_topic ( telebot_core_handler_t  core_h,
long long int  chat_id 
)

Use this method to reopen a closed 'General' topic in a forum supergroup chat.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_restrict_chat_member()

telebot_core_response_t telebot_core_restrict_chat_member ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername)
[in]user_idUnique identifier of the target user.
[in]until_dateDate 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_messagesPass true, if the user is allowed to send text messages, contacts, locations and venues
[in]can_send_media_messagesPass true, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages
[incan_send_polls Pass true, if the user is allowed to send polls, implies can_send_messages
[in]can_send_other_messagesPass true, if the user can send animations, games, stickers and use inline bots, implies can_send_media_messages
[in]can_add_web_page_previewsPass true, if the user may add web page previews to their messages, implies can_send_media_messages.
[in]can_change_infoPass true, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups.
[in]can_invite_usersPass true, if the user is allowed to invite new users to the chat.
[in]can_pin_messagesPass true, if the user is allowed to pin messages. Ignored in public supergroups
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_revoke_chat_invite_link()

telebot_core_response_t telebot_core_revoke_chat_invite_link ( telebot_core_handler_t  core_h,
long long int  chat_id,
const char *  invite_link 
)

Use this method to revoke an invite link created by the bot.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]invite_linkThe invite link to revoke.
Returns
telebot_core_response_t response that contains ChatInviteLink.

◆ telebot_core_save_prepared_inline_message()

telebot_core_response_t telebot_core_save_prepared_inline_message ( telebot_core_handler_t  core_h,
long long int  user_id,
const char *  result,
bool  allow_user_chats,
bool  allow_bot_chats,
bool  allow_group_chats,
bool  allow_channel_chats 
)

Use this method to save a prepared inline message.

Parameters
[in]core_hThe telebot core handler.
[in]user_idUnique identifier of the target user.
[in]resultA JSON-serialized object describing the message to be sent.
[in]allow_user_chatsPass True, if the message can be sent to user chats.
[in]allow_bot_chatsPass True, if the message can be sent to bot chats.
[in]allow_group_chatsPass True, if the message can be sent to group chats.
[in]allow_channel_chatsPass True, if the message can be sent to channel chats.
Returns
telebot_core_response_t response.

◆ telebot_core_send_animation()

telebot_core_response_t telebot_core_send_animation ( telebot_core_handler_t  core_h,
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).

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]animationAnimation 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_fileFalse if animation is file_id, true, if animation is a file path.
[in]durationDuration of sent animation in seconds.
[in]widthAnimation width
[in]heightAnimation height
[in]thumbThumbnail 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]captionAnimation caption. (may also be used when resending animations).
[in]parse_modeSend Markdown or HTML, if you want Telegram apps to show bold,
[in]disable_notificationSends the message silently. Users will receive a notification with no sound.
[in]reply_to_message_idIf the message is a reply, ID of the original message.
[in]reply_markupAdditional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user.
Returns
telebot_core_response_t response that contains the sent message, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_send_audio()

telebot_core_response_t telebot_core_send_audio ( telebot_core_handler_t  core_h,
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_core_send_voice() function instead.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]audioAudio 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_fileFalse if audio is file_id, true, if audio is a file path.
[in]captionAudio caption. (may also be used when resending audios).
[in]parse_modeSend Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width or inline URLs in your bot's message.
[in]durationDuration of sent audio in seconds.
[in]performerThe performer of the audio.
[in]titleThe track name of the audio.
[in]thumbThumbnail 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_notificationSends the message silently. Users will receive a notification with no sound.
[in]reply_to_message_idIf the message is a reply, ID of the original message.
[in]reply_markupAdditional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user.
Returns
telebot_core_response_t response that contains the sent message, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_send_chat_action()

telebot_core_response_t telebot_core_send_chat_action ( telebot_core_handler_t  core_h,
long long int  chat_id,
const 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_core_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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername)
[in]actionType 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.
Returns
telebot_core_response_t response that contains sent message, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_send_contact()

telebot_core_response_t telebot_core_send_contact ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]phone_numberContact's phone numbers.
[in]first_nameContact's first name.
[in]last_nameContact's last name.
[in]vcardAdditional data about the contact in the form of a vCard, 0-2048 bytes.
[in]disable_notificationSends the message silently. Users will receive a notification with no sound.
[in]reply_to_message_idIf the message is a reply, ID of the original message.
[in]reply_markupAdditional 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.
Returns
telebot_core_response_t response that contains sent message, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_send_dice()

telebot_core_response_t telebot_core_send_dice ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername)
[in]disable_notificationSends the message silently. Users will receive a notification with no sound.
[in]reply_to_message_idIf the message is a reply, ID of the original message.
[in]reply_markupAdditional 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.
Returns
telebot_core_response_t response that contains sent message, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_send_document()

telebot_core_response_t telebot_core_send_document ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]documentDocument 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_fileFalse if document is file_id, true, if document is a file path.
[in]thumbThumbnail 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]captionDocument caption. (may also be used when resending documents).
[in]parse_modeSend Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width or inline URLs in your bot's message.
[in]disable_notificationSends the message silently. Users will receive a notification with no sound.
[in]reply_to_message_idIf the message is a reply, ID of the original message.
[in]reply_markupAdditional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user.
Returns
telebot_core_response_t response that contains the sent message, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_send_gift()

telebot_core_response_t telebot_core_send_gift ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler.
[in]user_idUnique identifier of the target user.
[in]chat_idUnique identifier for the target chat.
[in]gift_idIdentifier of the gift.
[in]pay_for_upgradePass True to pay for the gift upgrade.
[in]textText that will be shown along with the gift.
[in]text_parse_modeMode for parsing entities in the text.
[in]text_entitiesA JSON-serialized list of special entities.
Returns
telebot_core_response_t response.

◆ telebot_core_send_location()

telebot_core_response_t telebot_core_send_location ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]latitudeLatitude of location.
[in]longitudeLongitude of location.
[in]live_periodPeriod in secnods for which the location will be updated. Should be between 60 and 86400.
[in]disable_notificationSends the message silently. Users will receive a notification with no sound.
[in]reply_to_message_idIf the message is a reply, ID of the original message.
[in]reply_markupAdditional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user.
Returns
telebot_core_response_t response that contains the sent message, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_send_media_group()

telebot_core_response_t telebot_core_send_media_group ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel.
[in]media_pathsArray of file paths to photos to send.
[in]countNumber of photos in the array (2–10).
[in]disable_notificationSends the message silently. Users will receive a notification with no sound.
[in]reply_to_message_idIf the message is a reply, ID of the original message.
Returns
telebot_core_response_t response that contains the sent message, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_send_message()

telebot_core_response_t telebot_core_send_message ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]textText of the message to be sent, 1-4096 characters after entities parsing.
[in]parse_modeSend 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_previewDisables link previews for links in this message.
[in]disable_notificationSends the message silently. Users will receive a notification with no sound.
[in]reply_to_message_idIf the message is a reply, ID of the original message.
[in]reply_markupAdditional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user.
Returns
telebot_core_response_t response that contains the sent message, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_send_paid_media()

telebot_core_response_t telebot_core_send_paid_media ( telebot_core_handler_t  core_h,
long long int  chat_id,
int  star_count,
const char *  media,
const char *  caption,
const char *  parse_mode,
const char *  caption_entities,
bool  show_caption_above_media,
bool  disable_notification,
bool  protect_content,
const char *  reply_parameters,
const char *  reply_markup 
)

Use this method to send paid media to a user.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]star_countThe number of Telegram Stars that must be paid.
[in]mediaA JSON-serialized array of InputPaidMedia objects.
[in]captionMedia caption.
[in]parse_modeMode for parsing entities in the caption.
[in]caption_entitiesA JSON-serialized list of special entities.
[in]show_caption_above_mediaPass True, if the caption must be shown above the message media.
[in]disable_notificationSends the message silently.
[in]protect_contentProtects the contents of the sent message.
[in]reply_parametersDescription of the message to reply to.
[in]reply_markupAdditional interface options.
Returns
telebot_core_response_t response.

◆ telebot_core_send_photo()

telebot_core_response_t telebot_core_send_photo ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]photoPhoto 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_fileFalse if photo is file_id, true, if photo is a file path.
[in]captionPhoto caption. (may also be used when resending photos).
[in]parse_modeSend Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width or inline URLs in your bot's message.
[in]disable_notificationSends the message silently. Users will receive a notification with no sound.
[in]reply_to_message_idIf the message is a reply, ID of the original message.
[in]reply_markupAdditional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user.
Returns
telebot_core_response_t response that contains the sent message, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_send_poll()

telebot_core_response_t telebot_core_send_poll ( telebot_core_handler_t  core_h,
long long int  chat_id,
const char *  question,
const char *  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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]questionPoll question, 1-255 characters.
[in]optionsA JSON-serialized list of answer options, 2-10 strings 1-100 characters each.
[in]is_anonymousTrue, if the poll needs to be anonymous, defaults to True.
[in]typePoll type, “quiz” or “regular”, defaults to “regular”.
[in]allows_multiple_answersTrue, if the poll allows multiple answers, ignored for polls in quiz mode, defaults to False
[in]correct_option_id0-based identifier of the correct answer option, required for polls in quiz mode.
[in]is_closedPass True, if the poll needs to be immediately closed. This can be useful for poll preview.
[in]disable_notificationSends the message silently. Users will receive a notification with no sound.
[in]reply_to_message_idIf the message is a reply, ID of the original message.
[in]reply_markupAdditional 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.
Returns
telebot_core_response_t response that contains sent message, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_send_venue()

telebot_core_response_t telebot_core_send_venue ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]latitudeLatitude of venue.
[in]longitudeLongitude of venue.
[in]titleName of the venue
[in]addressAddress of the venue.
[in]foursquare_idFoursquare identifier of the venue.
[in]foursquare_typeFoursquare type of the venue, if known.
[in]disable_notificationSends the message silently. Users will receive a notification with no sound.
[in]reply_to_message_idIf the message is a reply, ID of the original message.
[in]reply_markupAdditional 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.
Returns
telebot_core_response_t response that contains sent messageß, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_send_video()

telebot_core_response_t telebot_core_send_video ( telebot_core_handler_t  core_h,
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).

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]videoVideo 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_fileFalse if video is file_id, true, if video is a file path.
[in]durationDuration of sent video in seconds. Optional, set 0 for ignoring.
[in]widthVideo width. Optional, set 0 for ignoring.
[in]heightVideo heigh. Optional, set 0 for ignoring.
[in]thumbThumbnail 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]captionVideo caption. (may also be used when resending videos).
[in]parse_modeSend Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width or inline URLs in your bot's message.
[in]supports_streamingPass True, if the uploaded video is suitable for streaming.
[in]disable_notificationSends the message silently. Users will receive a notification with no sound.
[in]reply_to_message_idIf the message is a reply, ID of the original message.
[in]reply_markupAdditional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user.
Returns
telebot_core_response_t response that contains the sent message, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_send_video_note()

telebot_core_response_t telebot_core_send_video_note ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]video_notVideo 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_fileFalse if video note is file_id, true, if video note is a file path.
[in]durationDuration of sent video in seconds.
[in]lengthVideo width and height, i.e. diameter of the video message.
[in]thumbThumbnail 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_notificationSends the message silently. Users will receive a notification with no sound.
[in]reply_to_message_idIf the message is a reply, ID of the original message.
[in]reply_markupAdditional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user.
Returns
telebot_core_response_t response that contains the sent message, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_send_voice()

telebot_core_response_t telebot_core_send_voice ( telebot_core_handler_t  core_h,
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).

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]voiceAudio 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_fileFalse if voice is file_id, true, if voice is a file path.
[in]captionVoice message caption. (may also be used when resending).
[in]parse_modeSend Markdown or HTML, if you want Telegram apps to show bold,
[in]durationDuration of sent voice/audio in seconds.
[in]disable_notificationSends the message silently. Users will receive a notification with no sound.
[in]reply_to_message_idIf the message is a reply, ID of the original message.
[in]reply_markupAdditional interface options. An object for a custom reply keyboard, instructions to hide keyboard or to force a reply from the user.
Returns
telebot_core_response_t response that contains the sent message, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_set_chat_admin_custom_title()

telebot_core_response_t telebot_core_set_chat_admin_custom_title ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]user_idUnique identifier of the target user.
[in]custom_titleNew custom title for the administrator; 0-16 characters, emoji are not allowed.
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_set_chat_description()

telebot_core_response_t telebot_core_set_chat_description ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]descriptionNew chat description, 0-255 characters.
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_set_chat_menu_button()

telebot_core_response_t telebot_core_set_chat_menu_button ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target private chat.
[in]menu_buttonA JSON-serialized object for the bot's new menu button.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_set_chat_permissions()

telebot_core_response_t telebot_core_set_chat_permissions ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername)
[in]can_send_messagesPass true, if the user is allowed to send text messages, contacts, locations and venues
[in]can_send_media_messagesPass true, if the user is allowed to send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages
[incan_send_polls Pass true, if the user is allowed to send polls, implies can_send_messages
[in]can_send_other_messagesPass true, if the user can send animations, games, stickers and use inline bots, implies can_send_media_messages
[in]can_add_web_page_previewsPass true, if the user may add web page previews to their messages, implies can_send_media_messages.
[in]can_change_infoPass true, if the user is allowed to change the chat title, photo and other settings. Ignored in public supergroups.
[in]can_invite_usersPass true, if the user is allowed to invite new users to the chat.
[in]can_pin_messagesPass true, if the user is allowed to pin messages. Ignored in public supergroups
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_set_chat_photo()

telebot_core_response_t telebot_core_set_chat_photo ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]photoNew chat photo file path.
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_set_chat_sticker_set()

telebot_core_response_t telebot_core_set_chat_sticker_set ( telebot_core_handler_t  core_h,
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_core_get_chat requests to check if the bot can use it.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]sticker_set_nameName of the sticker set to be set as the group sticker set.
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_set_chat_title()

telebot_core_response_t telebot_core_set_chat_title ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]titleNew chat title, 1-255 characters.
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_set_message_reaction()

telebot_core_response_t telebot_core_set_message_reaction ( telebot_core_handler_t  core_h,
long long int  chat_id,
int  message_id,
const char *  reaction,
bool  is_big 
)

Use this method to set a new message reaction.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]message_idUnique identifier of the target message.
[in]reactionA JSON-serialized list of reaction types to set on the message.
[in]is_bigPass True to set the reaction with a big animation.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_set_my_commands()

telebot_core_response_t telebot_core_set_my_commands ( telebot_core_handler_t  core_h,
const char *  commands 
)

Change the list of the bot's commands.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]commandsA JSON-serialized list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_set_my_default_administrator_rights()

telebot_core_response_t telebot_core_set_my_default_administrator_rights ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler.
[in]rightsA JSON-serialized object describing new default administrator rights.
[in]for_channelsPass True to change the default administrator rights of the bot in channels.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_set_my_description()

telebot_core_response_t telebot_core_set_my_description ( telebot_core_handler_t  core_h,
const char *  description,
const char *  language_code 
)

Use this method to change the bot's description.

Parameters
[in]core_hThe telebot core handler.
[in]descriptionNew bot description; 0-512 characters.
[in]language_codeA two-letter ISO 639-1 language code.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_set_my_name()

telebot_core_response_t telebot_core_set_my_name ( telebot_core_handler_t  core_h,
const char *  name,
const char *  language_code 
)

Use this method to change the bot's name.

Parameters
[in]core_hThe telebot core handler.
[in]nameNew bot name; 0-64 characters.
[in]language_codeA two-letter ISO 639-1 language code.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_set_my_profile_photo()

telebot_core_response_t telebot_core_set_my_profile_photo ( telebot_core_handler_t  core_h,
const char *  photo 
)

Use this method to set the bot's profile photo.

Parameters
[in]core_hThe telebot core handler.
[in]photoPath to the new profile photo.
Returns
telebot_core_response_t response.

◆ telebot_core_set_my_short_description()

telebot_core_response_t telebot_core_set_my_short_description ( telebot_core_handler_t  core_h,
const char *  short_description,
const char *  language_code 
)

Use this method to change the bot's short description.

Parameters
[in]core_hThe telebot core handler.
[in]short_descriptionNew short description; 0-120 characters.
[in]language_codeA two-letter ISO 639-1 language code.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_set_proxy()

telebot_error_e telebot_core_set_proxy ( telebot_core_handler_t  core_h,
const char *  addr,
const char *  auth 
)

Set proxy address to use telebot behind proxy.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]addrProxy address in full.
[in]authProxy authorization informatio.
Returns
on Success, TELEBOT_ERROR_NONE is returned, otherwise a negative error value.

◆ telebot_core_set_webhook()

telebot_core_response_t telebot_core_set_webhook ( telebot_core_handler_t  core_h,
const char *  url,
const char *  certificate,
int  max_connections,
const char *  allowed_updates 
)

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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]urlHTTPS url to send updates to. Use an empty string to remove webhook integration
[in]certificateA path to to a public key certificate to upload server.
[in]max_connectionsOptional 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_updatesList the types of updates you want your bot to receive. For example, specify ["message", "edited_channel_post", "callback_query"] to only receive updates of these types.
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_stop_message_live_location()

telebot_core_response_t telebot_core_stop_message_live_location ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]message_idRequired if inline_message_id is not specified. Identifier of the sent message.
[in]inline_message_idRequired if chat_id and message_id are not specified. Identifier of the inline message.
[in]reply_markupA JSON-serialized object for a new inline keyboard.
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_stop_poll()

telebot_core_response_t telebot_core_stop_poll ( telebot_core_handler_t  core_h,
long long int  chat_id,
int  message_id,
const char *  reply_markup 
)

Stop a poll which was sent by the bot.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idRequired if inline_message_id. Unique identifier for the target chat or username of the target channel (in the format @channelusername).
[in]message_idRequired if inline_message_id is not specified. Identifier of the sent message.
[in]inline_message_idRequired if chat_id and message_id are not specified. Identifier of the inline message.
[in]reply_markupA JSON-serialized object for an inline keyboard.
Returns
telebot_core_response_t response that contains the stopped poll, which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_transfer_gift()

telebot_core_response_t telebot_core_transfer_gift ( telebot_core_handler_t  core_h,
long long int  user_id,
long long int  chat_id,
const char *  gift_id 
)

Use this method to transfer a gift.

Parameters
[in]core_hThe telebot core handler.
[in]user_idUnique identifier of the target user.
[in]chat_idUnique identifier for the target chat.
[in]gift_idIdentifier of the gift.
Returns
telebot_core_response_t response.

◆ telebot_core_unban_chat_member()

telebot_core_response_t telebot_core_unban_chat_member ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername)
[in]user_idUnique identifier of the target user
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_unban_chat_sender_chat()

telebot_core_response_t telebot_core_unban_chat_sender_chat ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]sender_chat_idUnique identifier of the target sender chat.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_unhide_general_forum_topic()

telebot_core_response_t telebot_core_unhide_general_forum_topic ( telebot_core_handler_t  core_h,
long long int  chat_id 
)

Use this method to unhide the 'General' topic in a forum supergroup chat.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_unpin_all_forum_topic_messages()

telebot_core_response_t telebot_core_unpin_all_forum_topic_messages ( telebot_core_handler_t  core_h,
long long int  chat_id,
int  message_thread_id 
)

Use this method to unpin all messages in a forum topic.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
[in]message_thread_idUnique identifier for the target message thread of the forum topic.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_unpin_all_general_forum_topic_messages()

telebot_core_response_t telebot_core_unpin_all_general_forum_topic_messages ( telebot_core_handler_t  core_h,
long long int  chat_id 
)

Use this method to unpin all messages in a General forum topic.

Parameters
[in]core_hThe telebot core handler.
[in]chat_idUnique identifier for the target chat.
Returns
telebot_core_response_t response that contains the result (true/false).

◆ telebot_core_unpin_chat_message()

telebot_core_response_t telebot_core_unpin_chat_message ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler created with telebot_core_create().
[in]chat_idUnique identifier for the target chat or username of the target channel (in the format @channelusername).
Returns
telebot_core_response_t response that contains the result (true/false), which MUST be released with telebot_core_put_response(), or null if allocation fails. Response code should be checked with #teleobot_core_get_response_code(), before getting data with telebot_core_get_response_data().

◆ telebot_core_upgrade_gift()

telebot_core_response_t telebot_core_upgrade_gift ( telebot_core_handler_t  core_h,
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.

Parameters
[in]core_hThe telebot core handler.
[in]gift_idIdentifier of the gift.
[in]pay_for_upgradePass True to pay for the gift upgrade.
[in]textText that will be shown along with the gift.
[in]text_parse_modeMode for parsing entities in the text.
[in]text_entitiesA JSON-serialized list of special entities.
Returns
telebot_core_response_t response.