新增关键词

This commit is contained in:
Yutousama 2022-04-17 01:49:48 +08:00
parent 2558545ffe
commit 479ae1dfba

View File

@ -5,6 +5,7 @@ import com.yutou.qqbot.QQBotManager;
import com.yutou.qqbot.interfaces.DownloadInterface;
import com.yutou.qqbot.models.Model;
import com.yutou.qqbot.utlis.HttpTools;
import com.yutou.qqbot.utlis.Log;
import com.yutou.qqbot.utlis.StringUtils;
import net.mamoe.mirai.event.events.MessageEvent;
import net.mamoe.mirai.message.data.MessageChainBuilder;
@ -33,6 +34,7 @@ public class GetSeTu extends Model {
public void onMessage(Long qq, MessageEvent event, boolean isGroup) {
super.onMessage(qq, event, isGroup);
if (msg.startsWith("来点")&&(msg.endsWith("色图")||msg.endsWith("涩图"))) {
Log.i(event.getSource().getFromId()+" > "+msg);
String key=msg.replace("来点","").replace("色图","").replace("涩图","");
String url="https://api.lolicon.app/setu/v2?r18=2";
if(!StringUtils.isEmpty(key)){