mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-07-02 05:17:26 +00:00
Compare commits
3 Commits
v2.5.2-202
...
v2.5.2-202
Author | SHA1 | Date | |
---|---|---|---|
bfe25c2012 | |||
036f3eaf4a | |||
f07c8d0b76 |
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>net.lamgc</groupId>
|
||||
<artifactId>ContentGrabbingJi</artifactId>
|
||||
<version>2.5.2-20200610.3-SNAPSHOT</version>
|
||||
<version>2.5.2-20200610.4-SNAPSHOT</version>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
|
@ -53,6 +53,20 @@ public class MiraiMain implements Closeable {
|
||||
BotConfiguration configuration = new BotConfiguration();
|
||||
configuration.randomDeviceInfo();
|
||||
configuration.setProtocol(BotConfiguration.MiraiProtocol.ANDROID_PAD);
|
||||
|
||||
// 心跳包周期间隔 (ms)
|
||||
configuration.setHeartbeatPeriodMillis(
|
||||
Long.parseLong(botProperties.getProperty("network.heartbeatPeriodMillis", "60000")));
|
||||
// 心跳包超时时间 (ms)
|
||||
configuration.setHeartbeatTimeoutMillis(
|
||||
Long.parseLong(botProperties.getProperty("network.heartbeatTimeoutMillis", "5000")));
|
||||
// 重连间隔时间
|
||||
configuration.setReconnectPeriodMillis(
|
||||
Integer.parseInt(botProperties.getProperty("network.reconnectPeriodMillis", "5")));
|
||||
// 重连最大次数
|
||||
configuration.setReconnectionRetryTimes(
|
||||
Integer.parseInt(botProperties.getProperty("network.reconnectionRetryTimes", "10")));
|
||||
|
||||
bot = BotFactoryJvm.newBot(Long.parseLong(botProperties.getProperty("bot.qq", "0")),
|
||||
Base64.getDecoder().decode(botProperties.getProperty("bot.password", "")), configuration);
|
||||
Events.subscribeAlways(GroupMessageEvent.class, this::executeMessageEvent);
|
||||
|
@ -1,9 +0,0 @@
|
||||
#用于访问Pixiv的代理服务器
|
||||
reptile.proxy.type=socks5/socks4/http
|
||||
reptile.proxy.host=127.0.0.1
|
||||
reptile.proxy.port=1080
|
||||
reptile.proxy.username=
|
||||
reptile.proxy.password=
|
||||
#登录用代理, 需要让浏览器使用该代理, 访问Pixiv并登录
|
||||
login.proxy.host=127.0.0.1
|
||||
login.proxy.port=1080
|
Reference in New Issue
Block a user