update
This commit is contained in:
parent
211773a230
commit
eb4264628d
2
pom.xml
2
pom.xml
@ -35,7 +35,7 @@
|
||||
<dependency>
|
||||
<groupId>net.mamoe</groupId>
|
||||
<artifactId>mirai-core-jvm</artifactId>
|
||||
<version>2.12.0</version>
|
||||
<version>2.14.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlinx</groupId>
|
||||
|
@ -39,5 +39,8 @@ public class PaoPaoSleepWaring extends Model {
|
||||
QQBotManager.getInstance().sendMessage(qq,builder);
|
||||
RedisTools.set("paopao_sleep_"+AppTools.getToDayTime(),"true",1*60*60);
|
||||
}
|
||||
if(event.getSource().getFromId() == 914520754 && msg.contains("#\u4f53\u529b")){
|
||||
QQBotManager.getInstance().sendMessage(qq, "\u60e0\u57ce\uff01");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -157,12 +157,19 @@ public class GetSeTu extends Model {
|
||||
RedisTools.set("Setu_" + qq, array.toString());
|
||||
}
|
||||
}
|
||||
|
||||
private boolean getSeTu(String model, String key, boolean r18, boolean fuzzyR18, Long qq, MessageEvent event) {
|
||||
private boolean getSeTu(String model, String key, boolean r18, boolean fuzzyR18, Long qq, MessageEvent event){
|
||||
return getSeTu(model, key, r18, fuzzyR18, qq, event,3);
|
||||
}
|
||||
private boolean getSeTu(String model,String key, boolean r18, boolean fuzzyR18, Long qq, MessageEvent event,int reset) {
|
||||
if(reset<=0){
|
||||
QQBotManager.getInstance().sendMessage(qq, "获取失败喵~");
|
||||
return false;
|
||||
}
|
||||
String url = "https://api.lolicon.app/setu/v2?r18=0&size=regular";
|
||||
if (r18) {
|
||||
url = "https://api.lolicon.app/setu/v2?r18=1&size=regular";
|
||||
}
|
||||
final String tmpKey=key;
|
||||
if (!StringUtils.isEmpty(key)) {
|
||||
if ("tag".equals(model)) {
|
||||
String[] keys = key.split(" ");
|
||||
@ -228,7 +235,7 @@ public class GetSeTu extends Model {
|
||||
@Override
|
||||
public void onError(Exception e) {
|
||||
super.onError(e);
|
||||
QQBotManager.getInstance().sendMessage(qq, "获取失败喵~");
|
||||
getSeTu(model, tmpKey, r18, fuzzyR18, qq, event, reset-1);
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user