涩图模块:图源改成regular,减少图片大小
管理员模块:支持this关键词标识本群
This commit is contained in:
parent
10fd1d6863
commit
4dfbee6d08
@ -97,10 +97,14 @@ public class AdminMessage extends Message {
|
|||||||
if (msgGroup.length <= 2) {
|
if (msgGroup.length <= 2) {
|
||||||
addModel(msgGroup[1], null);
|
addModel(msgGroup[1], null);
|
||||||
} else {
|
} else {
|
||||||
|
if("this".equals(msgGroup[1])){
|
||||||
|
addModel(sendQQ+"",msgGroup[2]);
|
||||||
|
}else {
|
||||||
addModel(msgGroup[1], msgGroup[2]);
|
addModel(msgGroup[1], msgGroup[2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
case QQCommands.MODEL_SHOW -> {
|
case QQCommands.MODEL_SHOW -> {
|
||||||
if (msgGroup.length == 1) {
|
if (msgGroup.length == 1) {
|
||||||
QQBotManager.getInstance().sendMessage(qq, "使用方法:" + QQCommands.MODEL_SHOW + " [qqnumber]");
|
QQBotManager.getInstance().sendMessage(qq, "使用方法:" + QQCommands.MODEL_SHOW + " [qqnumber]");
|
||||||
|
@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class QQBotApplication {
|
public class QQBotApplication {
|
||||||
public static final String version="QQBot v.1.2.16";
|
public static final String version="QQBot v.1.2.17";
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println("version = " + version);
|
System.out.println("version = " + version);
|
||||||
SpringApplication.run(QQBotApplication.class, args);
|
SpringApplication.run(QQBotApplication.class, args);
|
||||||
|
@ -44,15 +44,15 @@ public class GetSeTu extends Model {
|
|||||||
if (isRun) {
|
if (isRun) {
|
||||||
Log.i(event.getSource().getFromId() + " > " + msg);
|
Log.i(event.getSource().getFromId() + " > " + msg);
|
||||||
String key = msg.replace("来点", "").replace("色图", "").replace("涩图", "");
|
String key = msg.replace("来点", "").replace("色图", "").replace("涩图", "");
|
||||||
String url = "https://api.lolicon.app/setu/v2?r18=0";
|
String url = "https://api.lolicon.app/setu/v2?r18=0&size=regular";
|
||||||
if (isR18) {
|
if (isR18) {
|
||||||
url = "https://api.lolicon.app/setu/v2?r18=1";
|
url = "https://api.lolicon.app/setu/v2?r18=1&size=regular";
|
||||||
}
|
}
|
||||||
if (!StringUtils.isEmpty(key)) {
|
if (!StringUtils.isEmpty(key)) {
|
||||||
if (isR18) {
|
if (isR18) {
|
||||||
url = "https://api.lolicon.app/setu/v2?tag=" + URLEncoder.encode(key, StandardCharsets.UTF_8) + "&r18=1";
|
url = "https://api.lolicon.app/setu/v2?tag=" + URLEncoder.encode(key, StandardCharsets.UTF_8) + "&r18=1&size=regular";
|
||||||
} else {
|
} else {
|
||||||
url = "https://api.lolicon.app/setu/v2?tag=" + URLEncoder.encode(key, StandardCharsets.UTF_8) + "&r18=0";
|
url = "https://api.lolicon.app/setu/v2?tag=" + URLEncoder.encode(key, StandardCharsets.UTF_8) + "&r18=0&size=regular";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String ret = HttpTools.get(url);
|
String ret = HttpTools.get(url);
|
||||||
|
Loading…
Reference in New Issue
Block a user