更新:mirai升级到2.7.0

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

19
pom.xml
View File

@ -15,7 +15,7 @@
<description>NAS Service</description>
<properties>
<java.version>1.8</java.version>
<kotlin.version>1.4.10</kotlin.version>
<kotlin.version>1.5.10</kotlin.version>
</properties>
<repositories>
<repository>
@ -96,13 +96,19 @@
<dependency>
<groupId>net.mamoe</groupId>
<artifactId>mirai-core-jvm</artifactId>
<version>2.6.7</version> <!-- 替换版本为你需要的版本 -->
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-jdk8</artifactId>
<version>1.5.2</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core-jvm</artifactId>
<version>1.5.2</version>
</dependency>
<dependency>
<groupId>net.bramp.ffmpeg</groupId>
<artifactId>ffmpeg</artifactId>
@ -163,7 +169,8 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<!--使用-Dloader.path需要在打包的时候增加<layout>ZIP</layout>,不指定的话-Dloader.path不生效-->
<!--使用-Dloader.path需要在打包的时候增加<layout>ZIP</layou
t>,不指定的话-Dloader.path不生效-->
<layout>ZIP</layout>
<!-- 指定该jar包启动时的主类[建议] -->
<mainClass>com.yutou.nas.NasApplication</mainClass>

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"));