Skip to content

Commit bca14ef

Browse files
committed
Added the fields type and custom_emoji_id to the class Sticker
1 parent 85a7edd commit bca14ef

File tree

1 file changed

+19
-0
lines changed
  • library/src/main/java/com/pengrad/telegrambot/model

1 file changed

+19
-0
lines changed

library/src/main/java/com/pengrad/telegrambot/model/Sticker.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,16 @@
88
* 8/5/15.
99
*/
1010
public class Sticker implements Serializable {
11+
12+
public enum Type {
13+
regular, mask, custom_emoji
14+
}
15+
1116
private final static long serialVersionUID = 0L;
1217

1318
private String file_id;
1419
private String file_unique_id;
20+
private Type type;
1521
private Integer width;
1622
private Integer height;
1723
private Boolean is_animated;
@@ -21,6 +27,7 @@ public class Sticker implements Serializable {
2127
private String set_name;
2228
private File premium_animation;
2329
private MaskPosition mask_position;
30+
private String custom_emoji_id;
2431
private Long file_size;
2532

2633
public String fileId() {
@@ -31,6 +38,10 @@ public String fileUniqueId() {
3138
return file_unique_id;
3239
}
3340

41+
public Type type() {
42+
return type;
43+
}
44+
3445
public Integer width() {
3546
return width;
3647
}
@@ -67,6 +78,10 @@ public MaskPosition maskPosition() {
6778
return mask_position;
6879
}
6980

81+
public String customEmojiId() {
82+
return custom_emoji_id;
83+
}
84+
7085
public Long fileSize() {
7186
return file_size;
7287
}
@@ -78,6 +93,7 @@ public boolean equals(Object o) {
7893
Sticker sticker = (Sticker) o;
7994
return Objects.equals(file_id, sticker.file_id) &&
8095
Objects.equals(file_unique_id, sticker.file_unique_id) &&
96+
Objects.equals(type, sticker.type) &&
8197
Objects.equals(width, sticker.width) &&
8298
Objects.equals(height, sticker.height) &&
8399
Objects.equals(is_animated, sticker.is_animated) &&
@@ -87,6 +103,7 @@ public boolean equals(Object o) {
87103
Objects.equals(set_name, sticker.set_name) &&
88104
Objects.equals(premium_animation, sticker.premium_animation) &&
89105
Objects.equals(mask_position, sticker.mask_position) &&
106+
Objects.equals(custom_emoji_id, sticker.custom_emoji_id) &&
90107
Objects.equals(file_size, sticker.file_size);
91108
}
92109

@@ -100,6 +117,7 @@ public String toString() {
100117
return "Sticker{" +
101118
"file_id='" + file_id + '\'' +
102119
", file_unique_id='" + file_unique_id + '\'' +
120+
", type=" + type +
103121
", width=" + width +
104122
", height=" + height +
105123
", is_animated=" + is_animated +
@@ -109,6 +127,7 @@ public String toString() {
109127
", set_name='" + set_name + '\'' +
110128
", premium_animation=" + premium_animation +
111129
", mask_position=" + mask_position +
130+
", custom_emoji_id=" + custom_emoji_id +
112131
", file_size=" + file_size +
113132
'}';
114133
}

0 commit comments

Comments
 (0)