diff --git a/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java b/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java new file mode 100644 index 0000000..79e0240 --- /dev/null +++ b/src/main/java/com/yutou/qqbot/models/setu/GetSeTu.java @@ -0,0 +1,38 @@ +package com.yutou.qqbot.models.setu; + +import com.yutou.qqbot.QQBotManager; +import com.yutou.qqbot.interfaces.DownloadInterface; +import com.yutou.qqbot.models.Model; +import com.yutou.qqbot.utlis.HttpTools; +import net.mamoe.mirai.event.events.MessageEvent; +import net.mamoe.mirai.message.data.MessageChainBuilder; + +import java.io.File; + +public class GetSeTu extends Model { + @Override + public boolean isUserPublic() { + return true; + } + + @Override + public String[] getUsePowers() { + return new String[0]; + } + + @Override + public void onMessage(Long qq, MessageEvent event, boolean isGroup) { + super.onMessage(qq, event, isGroup); + if ("来点色图".equals(msg)||"来点涩图".equals(msg)){ + HttpTools.download(" https://api.ixiaowai.cn/api/api.php", + null, new DownloadInterface() { + @Override + public void onDownload(File file) { + super.onDownload(file); + QQBotManager.getInstance().sendMessage(file,qq,""); + file.deleteOnExit(); + } + }); + } + } +}