-
-
Notifications
You must be signed in to change notification settings - Fork 362
/
InputSticker.java
48 lines (37 loc) · 1.19 KB
/
InputSticker.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.pengrad.telegrambot.model.request;
import com.pengrad.telegrambot.AttachName;
import com.pengrad.telegrambot.model.MaskPosition;
import java.io.Serializable;
public class InputSticker implements Serializable {
private final static long serialVersionUID = 0L;
private String sticker;
private String[] emoji_list;
private MaskPosition mask_position;
private String[] keywords;
transient private String attachName;
transient private Object attach;
public InputSticker(Object sticker, String[] emojiList) {
this.emoji_list = emojiList;
if (sticker instanceof String) {
this.sticker = (String) sticker;
} else {
attach = sticker;
attachName = AttachName.next();
this.sticker = "attach://" + attachName;
}
}
public String getAttachName() {
return attachName;
}
public Object getAttachment() {
return attach;
}
public InputSticker maskPosition(MaskPosition maskPosition) {
mask_position = maskPosition;
return this;
}
public InputSticker keywords(String[] keywords) {
this.keywords = keywords;
return this;
}
}