Telebot  4.7.0
Library for Telegram bot API
telebot-stickers.h
Go to the documentation of this file.
1 
2 /*
3  * telebot
4  *
5  * Copyright (c) 2020 Elmurod Talipov.
6  *
7  * Licensed under the Apache License, Version 2.0 (the License);
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 
20 #ifndef __TELEBOT_STICKERS_H__
21 #define __TELEBOT_STICKERS_H__
22 
23 #include <stdbool.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
46 typedef struct telebot_mask_position {
51  char *point;
52 
58  float x_shift;
59 
65  float y_shift;
66 
68  float scale;
70 
71 
75 typedef struct telebot_sticker {
77  char *file_id;
78 
84 
86  int width;
87 
89  int height;
90 
93 
96 
98  char *emoji;
99 
101  char *set_name;
102 
105 
109 
110 
114 typedef struct telebot_sticker_set {
116  char *name;
117 
119  char *title;
120 
123 
126 
129 
130  /* Number of stickers */
131  int count_stickers;
132 
135 
137 
154 telebot_error_e telebot_send_sticker(telebot_handler_t handle, long long int chat_id,
155  const char *sticker, bool is_file, bool disable_notification,
156  int reply_to_message_id, char *reply_markup);
157 
169  telebot_sticker_set_t *stickers);
170 
180 
185 #ifdef __cplusplus
186 }
187 #endif
188 
189 #endif /* __TELEBOT_STICKERS_H__ */
telebot_error_e
Enumerations of error code for telebot programming interface.
Definition: telebot-common.h:45
struct telebot_photo * thumb
Definition: telebot-stickers.h:95
struct telebot_photo * thumb
Definition: telebot-stickers.h:134
bool is_animated
Definition: telebot-stickers.h:92
This object represents one size of a photo or a file / sticker thumbnail.
Definition: telebot-types.h:402
telebot_error_e telebot_get_sticker_set(telebot_handler_t handle, const char *name, telebot_sticker_set_t *stickers)
Get a sticker set.
char * title
Definition: telebot-stickers.h:119
char * point
Definition: telebot-stickers.h:51
struct telebot_mask_position * mask_position
Definition: telebot-stickers.h:104
struct telebot_sticker telebot_sticker_t
This object represents a sticker.
telebot_sticker_t * stickers
Definition: telebot-stickers.h:128
float scale
Definition: telebot-stickers.h:68
char * file_unique_id
Definition: telebot-stickers.h:83
char * file_id
Definition: telebot-stickers.h:77
int width
Definition: telebot-stickers.h:86
telebot_error_e telebot_send_sticker(telebot_handler_t handle, long long int chat_id, const char *sticker, bool is_file, bool disable_notification, int reply_to_message_id, char *reply_markup)
Send static .WEBP or animated .TGS stickers.
int file_size
Definition: telebot-stickers.h:107
float x_shift
Definition: telebot-stickers.h:58
telebot_error_e telebot_put_sticker_set(telebot_sticker_set_t *stickers)
Release sticker set obtained with telebot_get_sticker_set()
This object represents a sticker.
Definition: telebot-stickers.h:75
char * set_name
Definition: telebot-stickers.h:101
bool contains_masks
Definition: telebot-stickers.h:125
This object describes the position on faces where a mask should be placed by default.
Definition: telebot-stickers.h:46
char * emoji
Definition: telebot-stickers.h:98
This object represents a sticker set.
Definition: telebot-stickers.h:114
struct telebot_mask_position telebot_mask_position_t
This object describes the position on faces where a mask should be placed by default.
float y_shift
Definition: telebot-stickers.h:65
bool is_animated
Definition: telebot-stickers.h:122
int height
Definition: telebot-stickers.h:89
char * name
Definition: telebot-stickers.h:116
struct telebot_sticker_set telebot_sticker_set_t
This object represents a sticker set.
struct telebot_handler_s * telebot_handler_t
This is opaque object to represent a telebot handler.
Definition: telebot-types.h:1296