新增涩图

This commit is contained in:
Yutousama 2022-01-01 23:36:12 +08:00
parent 55da787d66
commit fb75b5206c

View File

@ -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();
}
});
}
}
}