diff --git a/pom.xml b/pom.xml index 7fb2907..ce6bee0 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ NAS Service 1.8 - 1.4.10 + 1.5.10 @@ -96,13 +96,19 @@ net.mamoe mirai-core-jvm - 2.6.7 + 2.7.0 - org.jetbrains.kotlin - kotlin-stdlib - ${kotlin.version} + org.jetbrains.kotlinx + kotlinx-coroutines-jdk8 + 1.5.2 + + org.jetbrains.kotlinx + kotlinx-coroutines-core-jvm + 1.5.2 + + net.bramp.ffmpeg ffmpeg @@ -163,7 +169,8 @@ org.springframework.boot spring-boot-maven-plugin - + ZIP com.yutou.nas.NasApplication diff --git a/src/main/java/com/yutou/nas/utils/IdeaTools.java b/src/main/java/com/yutou/nas/utils/IdeaTools.java index c3d2394..5f85fe0 100644 --- a/src/main/java/com/yutou/nas/utils/IdeaTools.java +++ b/src/main/java/com/yutou/nas/utils/IdeaTools.java @@ -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(); diff --git a/src/main/java/com/yutou/nas/utils/QQBotManager.java b/src/main/java/com/yutou/nas/utils/QQBotManager.java index 99c161d..2ab0f0d 100644 --- a/src/main/java/com/yutou/nas/utils/QQBotManager.java +++ b/src/main/java/com/yutou/nas/utils/QQBotManager.java @@ -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"));