Skip to content

Commit

Permalink
Changed all variables that hold chat IDs from 32bit integer (int) typ…
Browse files Browse the repository at this point in the history
…e to 64bit integer (long long int)
  • Loading branch information
jakob-stark committed Oct 28, 2018
1 parent d528216 commit 9f9547e
Show file tree
Hide file tree
Showing 6 changed files with 150 additions and 150 deletions.
74 changes: 37 additions & 37 deletions include/telebot-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ telebot_error_e telebot_core_get_me(telebot_core_handler_t *core_h);
* error value. Response is placed in core_h->resp_data. It MUST be freed.
*/
telebot_error_e telebot_core_send_message(telebot_core_handler_t *core_h,
int chat_id, char *text, char *parse_mode, bool disable_web_page_preview,
long long int chat_id, char *text, char *parse_mode, bool disable_web_page_preview,
bool disable_notification, int reply_to_message_id, const char *reply_markup);

/**
Expand All @@ -183,7 +183,7 @@ telebot_error_e telebot_core_send_message(telebot_core_handler_t *core_h,
* message. It MUST be freed.
*/
telebot_error_e telebot_core_forward_message(telebot_core_handler_t *core_h,
int chat_id, int from_chat_id, bool disable_notification, int message_id);
long long int chat_id, long long int from_chat_id, bool disable_notification, int message_id);

/**
* @brief This functionis used to send photos.
Expand All @@ -204,7 +204,7 @@ telebot_error_e telebot_core_forward_message(telebot_core_handler_t *core_h,
* error value. Response is placed in core_h->resp_data that contains the sent
* message. It MUST be freed after use.
*/
telebot_error_e telebot_core_send_photo(telebot_core_handler_t *core_h, int chat_id,
telebot_error_e telebot_core_send_photo(telebot_core_handler_t *core_h, long long int chat_id,
char *photo, bool is_file, char *caption, bool disable_notification,
int reply_to_message_id, char *reply_markup);
/**
Expand Down Expand Up @@ -234,7 +234,7 @@ telebot_error_e telebot_core_send_photo(telebot_core_handler_t *core_h, int chat
* error value. Response is placed in core_h->resp_data that contains the sent
* message. It MUST be freed after use.
*/
telebot_error_e telebot_core_send_audio(telebot_core_handler_t *core_h, int chat_id,
telebot_error_e telebot_core_send_audio(telebot_core_handler_t *core_h, long long int chat_id,
char *audio, bool is_file, int duration, char *performer, char *title,
bool disable_notification, int reply_to_message_id, char *reply_markup);

Expand All @@ -256,7 +256,7 @@ telebot_error_e telebot_core_send_audio(telebot_core_handler_t *core_h, int chat
* message. It MUST be freed after use.
*/
telebot_error_e telebot_core_send_document(telebot_core_handler_t *core_h,
int chat_id, char *document, bool is_file, bool disable_notification,
long long int chat_id, char *document, bool is_file, bool disable_notification,
int reply_to_message_id, char *reply_markup);

/**
Expand All @@ -280,7 +280,7 @@ telebot_error_e telebot_core_send_document(telebot_core_handler_t *core_h,
* message. It MUST be freed after use.
*/
telebot_error_e telebot_core_send_video(telebot_core_handler_t *core_h,
int chat_id, char *video, bool is_file, int duration, char *caption,
long long int chat_id, char *video, bool is_file, int duration, char *caption,
bool disable_notification, int reply_to_message_id, char *reply_markup);

/**
Expand All @@ -306,7 +306,7 @@ telebot_error_e telebot_core_send_video(telebot_core_handler_t *core_h,
* message. It MUST be freed after use.
*/
telebot_error_e telebot_core_send_voice(telebot_core_handler_t *core_h,
int chat_id, char *voice, bool is_file, int duration,
long long int chat_id, char *voice, bool is_file, int duration,
bool disable_notification, int reply_to_message_id, char *reply_markup);

/**
Expand All @@ -330,7 +330,7 @@ telebot_error_e telebot_core_send_voice(telebot_core_handler_t *core_h,
* message. It MUST be freed after use.
*/
telebot_error_e telebot_core_send_video_note(telebot_core_handler_t *core_h,
int chat_id, char *video_note, bool is_file, int duration, int length,
long long int chat_id, char *video_note, bool is_file, int duration, int length,
bool disable_notification, int reply_to_message_id, char *reply_markup);

/**
Expand All @@ -350,7 +350,7 @@ telebot_error_e telebot_core_send_video_note(telebot_core_handler_t *core_h,
* message. It MUST be freed after use.
*/
telebot_error_e telebot_core_send_location(telebot_core_handler_t *core_h,
int chat_id, float latitude, float longitude, bool disable_notification,
long long int chat_id, float latitude, float longitude, bool disable_notification,
int reply_to_message_id, char *reply_markup);

/**
Expand All @@ -375,7 +375,7 @@ telebot_error_e telebot_core_send_location(telebot_core_handler_t *core_h,
* message. It MUST be freed after use.
*/
telebot_error_e telebot_core_edit_message_live_location(telebot_core_handler_t *core_h,
int chat_id, int message_id, char *inline_message_id, float latitude,
long long int chat_id, int message_id, char *inline_message_id, float latitude,
float longitude, bool disable_notification, char *reply_markup);

/**
Expand All @@ -394,7 +394,7 @@ telebot_error_e telebot_core_edit_message_live_location(telebot_core_handler_t *
* message. It MUST be freed after use.
*/
telebot_error_e telebot_core_stop_message_live_location(telebot_core_handler_t *core_h,
int chat_id, int message_id, char *inline_message_id, char *reply_markup);
long long int chat_id, int message_id, char *inline_message_id, char *reply_markup);

/**
* @brief This function is used to send information about a venue.
Expand All @@ -417,7 +417,7 @@ telebot_error_e telebot_core_stop_message_live_location(telebot_core_handler_t *
* message. It MUST be freed after use.
*/
telebot_error_e telebot_core_send_venue(telebot_core_handler_t *core_h,
int chat_id, float latitude, float longitude, char *title, char *address,
long long int chat_id, float latitude, float longitude, char *title, char *address,
char *foursquare_id, bool disable_notification, int reply_to_message_id,
char *reply_markup);

Expand All @@ -440,7 +440,7 @@ telebot_error_e telebot_core_send_venue(telebot_core_handler_t *core_h,
* message. It MUST be freed after use.
*/
telebot_error_e telebot_core_send_contact(telebot_core_handler_t *core_h,
int chat_id, char *phone_number, char *first_name, char *last_name,
long long int chat_id, char *phone_number, char *first_name, char *last_name,
bool disable_notification, int reply_to_message_id, char *reply_markup);

/**
Expand All @@ -466,7 +466,7 @@ telebot_error_e telebot_core_send_contact(telebot_core_handler_t *core_h,
* message. It MUST be freed after use.
*/
telebot_error_e telebot_core_send_chat_action(telebot_core_handler_t *core_h,
int chat_id, char *action);
long long int chat_id, char *action);

/**
* @brief This function is used to get user profile pictures object
Expand Down Expand Up @@ -526,7 +526,7 @@ telebot_error_e telebot_core_download_file(telebot_core_handler_t *core_h,
* successfull. It MUST be freed after use.
*/
telebot_error_e telebot_core_kick_chat_member(telebot_core_handler_t *core_h,
int chat_id, int user_id, long until_date);
long long int chat_id, int user_id, long until_date);

/**
* @brief This function is used to unban a previously kicked user in
Expand All @@ -542,7 +542,7 @@ telebot_error_e telebot_core_kick_chat_member(telebot_core_handler_t *core_h,
* successfull. It MUST be freed after use.
*/
telebot_error_e telebot_core_unban_chat_member(telebot_core_handler_t *core_h,
int chat_id, int user_id);
long long int chat_id, int user_id);

/**
* @brief This function is used to restrict a user in a supergroup. The bot
Expand All @@ -567,7 +567,7 @@ telebot_error_e telebot_core_unban_chat_member(telebot_core_handler_t *core_h,
* successfull. It MUST be freed after use.
*/
telebot_error_e telebot_core_restrict_chat_member(telebot_core_handler_t *core_h,
int chat_id, int user_id, long until_date, bool can_send_messages,
long long int chat_id, int user_id, long until_date, bool can_send_messages,
bool can_send_media_messages, bool can_send_other_messages,
bool can_add_web_page_previews);

Expand Down Expand Up @@ -603,7 +603,7 @@ telebot_error_e telebot_core_restrict_chat_member(telebot_core_handler_t *core_h
* successfull. It MUST be freed after use.
*/
telebot_error_e telebot_core_promote_chat_member(telebot_core_handler_t *core_h,
int chat_id, int user_id, bool can_post_messages, bool can_edit_messages,
long long int chat_id, int user_id, 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);

Expand All @@ -619,7 +619,7 @@ telebot_error_e telebot_core_promote_chat_member(telebot_core_handler_t *core_h,
* invite link. It MUST be freed after use.
*/
telebot_error_e telebot_core_export_chat_invite_link(telebot_core_handler_t *core_h,
int chat_id);
long long int chat_id);

/**
* @brief This function is used to set a new profile photo for the chat. Photos
Expand All @@ -634,7 +634,7 @@ telebot_error_e telebot_core_export_chat_invite_link(telebot_core_handler_t *cor
* successfull. It MUST be freed after use.
*/
telebot_error_e telebot_core_set_chat_photo(telebot_core_handler_t *core_h,
int chat_id, char *photo);
long long int chat_id, char *photo);

/**
* @brief This function is used to delete a chat photo. Photos can't be changed
Expand All @@ -648,7 +648,7 @@ telebot_error_e telebot_core_set_chat_photo(telebot_core_handler_t *core_h,
* successfull. It MUST be freed after use.
*/
telebot_error_e telebot_core_delete_chat_photo(telebot_core_handler_t *core_h,
int chat_id, char *photo);
long long int chat_id, char *photo);

/**
* @brief This function is used to change the title of a chat. Titles can't be
Expand All @@ -663,7 +663,7 @@ telebot_error_e telebot_core_delete_chat_photo(telebot_core_handler_t *core_h,
* successfull. It MUST be freed after use.
*/
telebot_error_e telebot_core_set_chat_title(telebot_core_handler_t *core_h,
int chat_id, char *title);
long long int chat_id, char *title);

/**
* @brief This function is used to change the description of a supergroup or
Expand All @@ -678,7 +678,7 @@ telebot_error_e telebot_core_set_chat_title(telebot_core_handler_t *core_h,
* successfull. It MUST be freed after use.
*/
telebot_error_e telebot_core_set_chat_description(telebot_core_handler_t *core_h,
int chat_id, char *description);
long long int chat_id, char *description);

/**
* @brief This function is used to pin a message in a supergroup or a channel.
Expand All @@ -697,7 +697,7 @@ telebot_error_e telebot_core_set_chat_description(telebot_core_handler_t *core_h
* successfull. It MUST be freed after use.
*/
telebot_error_e telebot_core_pin_chat_message(telebot_core_handler_t *core_h,
int chat_id, int message_id, bool disable_notification);
long long int chat_id, int message_id, bool disable_notification);

/**
* @brief This function is used to unpin a message in a supergroup or a channel.
Expand All @@ -712,7 +712,7 @@ telebot_error_e telebot_core_pin_chat_message(telebot_core_handler_t *core_h,
* successfull. It MUST be freed after use.
*/
telebot_error_e telebot_core_unpin_chat_message(telebot_core_handler_t *core_h,
int chat_id);
long long int chat_id);

/**
* @brief This function is used to leave a group, supergroup or channel.
Expand All @@ -724,7 +724,7 @@ telebot_error_e telebot_core_unpin_chat_message(telebot_core_handler_t *core_h,
* successfull. It MUST be freed after use.
*/
telebot_error_e telebot_core_leave_chat(telebot_core_handler_t *core_h,
int chat_id);
long long int chat_id);

/**
* @brief This function is used to to get up to date information about the
Expand All @@ -738,7 +738,7 @@ telebot_error_e telebot_core_leave_chat(telebot_core_handler_t *core_h,
* information. It MUST be freed after use.
*/
telebot_error_e telebot_core_get_chat(telebot_core_handler_t *core_h,
int chat_id);
long long int chat_id);

/**
* @brief This function is used to get a list of administrators in a chat.
Expand All @@ -753,7 +753,7 @@ telebot_error_e telebot_core_get_chat(telebot_core_handler_t *core_h,
* chat members. It MUST be freed after use.
*/
telebot_error_e telebot_core_get_chat_admins(telebot_core_handler_t *core_h,
int chat_id);
long long int chat_id);

/**
* @brief This function is used to get the number of members in a chat.
Expand All @@ -765,7 +765,7 @@ telebot_error_e telebot_core_get_chat_admins(telebot_core_handler_t *core_h,
* of chat members. It MUST be freed after use.
*/
telebot_error_e telebot_core_get_chat_members_count(telebot_core_handler_t *core_h,
int chat_id);
long long int chat_id);

/**
* @brief This function is used to get information about a member of a chat.
Expand All @@ -777,7 +777,7 @@ telebot_error_e telebot_core_get_chat_members_count(telebot_core_handler_t *core
* member. It MUST be freed after use.
*/
telebot_error_e telebot_core_get_chat_member(telebot_core_handler_t *core_h,
int chat_id);
long long int chat_id);

/**
* @brief This function is used to set a new group sticker set for a supergroup.
Expand All @@ -794,7 +794,7 @@ telebot_error_e telebot_core_get_chat_member(telebot_core_handler_t *core_h,
* successfull. It MUST be freed after use.
*/
telebot_error_e telebot_core_set_chat_sticker_set(telebot_core_handler_t *core_h,
int chat_id, char *sticker_set_name);
long long int chat_id, char *sticker_set_name);

/**
* @brief This function is used to delete a group sticker set from a supergroup.
Expand All @@ -809,7 +809,7 @@ telebot_error_e telebot_core_set_chat_sticker_set(telebot_core_handler_t *core_h
* successfull. It MUST be freed after use.
*/
telebot_error_e telebot_core_delete_chat_sticker_set(telebot_core_handler_t *core_h,
int chat_id);
long long int chat_id);

/**
* @brief Send answers to callback queries sent from inline keyboards.
Expand Down Expand Up @@ -856,7 +856,7 @@ telebot_error_e telebot_core_answer_callback_query(telebot_core_handler_t *core_
* message, if the message is edited, otherwise "true". It MUST be freed after use.
*/
telebot_error_e telebot_core_edit_message_text(telebot_core_handler_t *core_h,
int chat_id, int message_id, char *inline_message_id, char *text,
long long int chat_id, int message_id, char *inline_message_id, char *text,
char *parse_mode, bool disable_web_page_preview, char *reply_markup);

/**
Expand All @@ -876,7 +876,7 @@ telebot_error_e telebot_core_edit_message_text(telebot_core_handler_t *core_h,
* message, if the message is edited, otherwise "true". It MUST be freed after use.
*/
telebot_error_e telebot_core_edit_message_caption(telebot_core_handler_t *core_h,
int chat_id, int message_id, char *inline_message_id, char *caption,
long long int chat_id, int message_id, char *inline_message_id, char *caption,
char *reply_markup);

/**
Expand All @@ -896,7 +896,7 @@ telebot_error_e telebot_core_edit_message_caption(telebot_core_handler_t *core_h
*/

telebot_error_e telebot_core_edit_message_reply_markup(telebot_core_handler_t *core_h,
int chat_id, int message_id, char *inline_message_id, char *reply_markup);
long long int chat_id, int message_id, char *inline_message_id, char *reply_markup);

/**
* @brief This function is used to delete a message, including service messages,
Expand All @@ -916,7 +916,7 @@ telebot_error_e telebot_core_edit_message_reply_markup(telebot_core_handler_t *c
* successfull. It MUST be freed after use.
*/
telebot_error_e telebot_core_delete_message(telebot_core_handler_t *core_h,
int chat_id, int message_id);
long long int chat_id, int message_id);

/**
* @brief This function is used to to send .webp stickers.
Expand All @@ -937,7 +937,7 @@ telebot_error_e telebot_core_delete_message(telebot_core_handler_t *core_h,
* successfull. It MUST be freed after use.
*/
telebot_error_e telebot_core_send_sticker(telebot_core_handler_t *core_h,
int chat_id, char *sticker, bool is_file, bool disable_notification,
long long int chat_id, char *sticker, bool is_file, bool disable_notification,
int reply_to_message_id, char *reply_markup);

/**
Expand Down
Loading

0 comments on commit 9f9547e

Please sign in to comment.