新增关键词
This commit is contained in:
parent
2558545ffe
commit
479ae1dfba
@ -5,6 +5,7 @@ import com.yutou.qqbot.QQBotManager;
|
|||||||
import com.yutou.qqbot.interfaces.DownloadInterface;
|
import com.yutou.qqbot.interfaces.DownloadInterface;
|
||||||
import com.yutou.qqbot.models.Model;
|
import com.yutou.qqbot.models.Model;
|
||||||
import com.yutou.qqbot.utlis.HttpTools;
|
import com.yutou.qqbot.utlis.HttpTools;
|
||||||
|
import com.yutou.qqbot.utlis.Log;
|
||||||
import com.yutou.qqbot.utlis.StringUtils;
|
import com.yutou.qqbot.utlis.StringUtils;
|
||||||
import net.mamoe.mirai.event.events.MessageEvent;
|
import net.mamoe.mirai.event.events.MessageEvent;
|
||||||
import net.mamoe.mirai.message.data.MessageChainBuilder;
|
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) {
|
public void onMessage(Long qq, MessageEvent event, boolean isGroup) {
|
||||||
super.onMessage(qq, event, isGroup);
|
super.onMessage(qq, event, isGroup);
|
||||||
if (msg.startsWith("来点")&&(msg.endsWith("色图")||msg.endsWith("涩图"))) {
|
if (msg.startsWith("来点")&&(msg.endsWith("色图")||msg.endsWith("涩图"))) {
|
||||||
|
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=2";
|
String url="https://api.lolicon.app/setu/v2?r18=2";
|
||||||
if(!StringUtils.isEmpty(key)){
|
if(!StringUtils.isEmpty(key)){
|
||||||
|
Loading…
Reference in New Issue
Block a user