更新:mirai升级到2.7.0

修复:获取idea激活码失败
This commit is contained in:
2021-09-14 01:19:05 +08:00
parent 2f1bd267bf
commit f30530d61d
3 changed files with 16 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ public class IdeaTools {
try {
ZipFile zipFile = new ZipFile(file, Charset.forName("gbk"));
String data = "";
if (file.exists()) {
if (file.exists()&&zipFile.getEntry(name)!=null) {
data = StreamTools.streamReadLine(zipFile.getInputStream(zipFile.getEntry(name)));
}
zipFile.close();

View File

@@ -228,6 +228,7 @@ public class QQBotManager {
private void myGroup(String msg) {
StringBuilder builder;
String msgSrc=msg;
msg = msg.replace("", "!").toLowerCase();
Log.i("QQBot","command = "+msg);
switch (msg) {
@@ -319,7 +320,7 @@ public class QQBotManager {
} else if (msg.startsWith(QQCommands.QQ_AUDIO)) {
QQAudio.playText(msg.replace(QQCommands.QQ_AUDIO, ""));
}else if(msg.startsWith(QQCommands.QQ_TOOLS_IDEA_FILE)){
getInstance().sendMessage(IdeaTools.getIdea(msg.replace(QQCommands.QQ_TOOLS_IDEA_FILE,"")));
getInstance().sendMessage(IdeaTools.getIdea(msgSrc.replace(QQCommands.QQ_TOOLS_IDEA_FILE,"")));
}else if(msg.startsWith(QQCommands.QQ_TOOLS_IDEA_URL)){
RedisTools.set("ideaUrl",msg.replace(QQCommands.QQ_TOOLS_IDEA_URL,"").trim());
getInstance().sendMessage("已设定下载地址:"+RedisTools.get("ideaUrl"));