Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathtest_main.java
More file actions
Latest commit
26 lines (23 loc) · 844 Bytes
/
Copy pathtest_main.java
File metadata and controls
26 lines (23 loc) · 844 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
25
26
importio.github.kloping.qqbot.Starter;
importio.github.kloping.qqbot.api.Intents;
importio.github.kloping.qqbot.entities.qqpd.Dms;
/**
* @author github.kloping
*/
publicclasstest_main {
publicstaticvoidmain(String[] args) {
Starterstarter = factory();
//事件订阅 私域机器人
// 推荐Intents.PRIVATE_INTENTS 公域机器人推荐 Intents.PUBLIC_INTENTS
starter.getConfig().setCode(Intents.PUBLIC_INTENTS.and(Intents.GROUP_INTENTS));
//重连
starter.setReconnect(true);
starter.run();
// 设置日志等级 一般情况无需设置
}
publicstaticStarterfactory() {
Starterstarter = newStarter("appid", "secret");
starter.getConfig().setCode(Intents.PUBLIC_INTENTS.and(Intents.GROUP_INTENTS));
returnstarter;
}
}