-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathtest_main.java
More file actions
27 lines (24 loc) · 865 Bytes
/
test_main.java
File metadata and controls
27 lines (24 loc) · 865 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
27
import io.github.kloping.qqbot.Starter;
import io.github.kloping.qqbot.api.Intents;
import io.github.kloping.qqbot.entities.qqpd.Dms;
/**
* @author github.kloping
*/
public class test_main {
public static void main(String[] args) {
Starter starter = factory();
//事件订阅 私域机器人
// 推荐Intents.PRIVATE_INTENTS 公域机器人推荐 Intents.PUBLIC_INTENTS
starter.getConfig().setCode(Intents.PRIVATE_INTENTS.getCode());
//重连
starter.setReconnect(true);
starter.run();
// 设置日志等级 一般情况无需设置
// starter.APPLICATION.logger.setLogLevel(0);
}
public static Starter factory() {
Starter starter = new Starter("appid", "token");
starter.getConfig().setCode(Intents.PRIVATE_INTENTS.getCode());
return starter;
}
}