-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathSender.java
59 lines (52 loc) · 1.12 KB
/
Sender.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
49
50
51
52
53
54
55
56
57
58
59
package io.github.kloping.qqbot.api;
import io.github.kloping.qqbot.entities.qqpd.message.RawMessage;
import io.github.kloping.qqbot.entities.qqpd.message.RawPreMessage;
import io.github.kloping.qqbot.http.data.Result;
import io.github.kloping.qqbot.impl.MessagePacket;
/**
* 发送者(消息)接口
*
* @author github.kloping
*/
public interface Sender {
/**
* 以JSON方式发送文本消息
*
* @param text
* @return
*/
Result send(String text);
/**
* 以JSON方式发送文本消息并引用指定消息
*
* @param text
* @param message
* @return
*/
Result send(String text, RawMessage message);
/**
* 以各种方式 达到想要发送的效果
*
* @param msg
* @return
*/
Result send(SendAble msg);
/**
* 以自定义方式发送消息
*
* @param packet
* @return
*/
default Result send(MessagePacket packet) {
return null;
}
/**
* 自定义消息
*
* @param msg
* @return
*/
default Result send(RawPreMessage msg) {
return null;
}
}