-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathtest_Intents.java
More file actions
24 lines (21 loc) · 751 Bytes
/
test_Intents.java
File metadata and controls
24 lines (21 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import io.github.kloping.qqbot.Starter;
import io.github.kloping.qqbot.api.Intents;
/**
* 事件订阅
*
* @author github.kloping
*/
public class test_Intents {
public static void main(String[] args) {
Starter starter = test_main.factory();
//单事件订阅方式
starter.getConfig().setCode(Intents.GUILD_MESSAGES.getCode());
//多事件订阅方式
starter.getConfig().setCode(Intents.START.and(Intents.GUILD_MESSAGES, Intents.DIRECT_MESSAGE));
// 公域机器人订阅推荐
starter.getConfig().setCode(Intents.PUBLIC_INTENTS.getCode());
// 私域机器人订阅推荐
starter.getConfig().setCode(Intents.PRIVATE_INTENTS.getCode());
starter.run();
}
}