@cssxsh 哦哦,原来如此!是我看的不够仔细...
X
xyc0123456789 发布的帖子
-
RE: mp3和wav格式音频以url格式发送就报错,而且直接导致mirai停止工作
语音可以参考https://github.com/kn007/silk-v3-decoder,用ffmpeg和这个库的工具转成silk格式,然后发送
这个是我部署到服务器的示例 https://blog.csdn.net/weixin_44144762/article/details/128384161 -
获取群成员信息阻塞以及上传图片发生阻塞
"pool-6-thread-18" #60 prio=5 os_prio=0 tid=0x00007f2d1803e800 nid=0x3ef02d runnable [0x00007f2d109e7000] java.lang.Thread.State: RUNNABLE at net.mamoe.mirai.internal.contact.CommonGroupImpl.get(GroupImpl.kt:210) at net.mamoe.mirai.internal.contact.CommonGroupImpl.get(GroupImpl.kt:135) at com.king.api.messageapis.group.MessageRank.sendRank(MessageRank.java:71) at com.king.api.messageapis.group.MessageRank.sendRank(MessageRank.java:50) at com.king.api.messageapis.group.MessageRank.handler(MessageRank.java:45) at com.king.api.messageapis.GroupMessageApiGroup.lambda$handler$0(GroupMessageApiGroup.java:65) at com.king.api.messageapis.GroupMessageApiGroup$$Lambda$875/1976446850.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750)
"pool-6-thread-30" #74 prio=5 os_prio=0 tid=0x00007fc8f4053800 nid=0xc4be in Object.wait() [0x00007fc8e9de2000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000000e210de80> (a me.him188.kotlin.jvm.blocking.bridge.internal.RunSuspend) at java.lang.Object.wait(Object.java:502) at me.him188.kotlin.jvm.blocking.bridge.internal.RunSuspend.await(RunSuspend.kt:38) - locked <0x00000000e210de80> (a me.him188.kotlin.jvm.blocking.bridge.internal.RunSuspend) at me.him188.kotlin.jvm.blocking.bridge.internal.RunSuspendKt.$runSuspend$(RunSuspend.kt:19) at net.mamoe.mirai.contact.Contact$Companion.uploadImage(Contact.kt) at net.mamoe.mirai.contact.Contact$Companion.uploadImage$default(Contact.kt:155) at net.mamoe.mirai.contact.Contact$Companion.uploadImage(Contact.kt) at net.mamoe.mirai.contact.Contact.uploadImage(Contact.kt) at com.king.api.messageapis.group.MessageRank.sendRank(MessageRank.java:91) at com.king.api.messageapis.group.MessageRank.sendRank(MessageRank.java:54) at com.king.api.messageapis.group.MessageRank.handler(MessageRank.java:49) at com.king.api.messageapis.GroupMessageApiGroup.lambda$handler$0(GroupMessageApiGroup.java:65) at com.king.api.messageapis.GroupMessageApiGroup$$Lambda$878/1694548510.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:750)
以上是线程被阻塞时的一些信息,重启应用后又恢复正常了,不太清楚这是不是风控导致的。
还有就是最近发现同一批被设置的群成员特殊头衔部分获取不到,包括设置头衔的事件也收不到。不确定是不是qq没有及时更新那部分信息导致的 -
RE: 无法启动bot qq版本过低
@qq1242592914 我是之前的号在一个群里升了个管理员就被突然下线了,然后所有协议登不上了。刚刚这个登watch是新号,本着试试这个没用过的协议登上的,没想到有这个问题...
-
RE: 无法启动bot qq版本过低
<dependency> <groupId>net.mamoe</groupId> <artifactId>mirai-core-jvm</artifactId> <version>2.14.0-RC</version> </dependency>
JDK:8
我用ANDROID_WATCH的时候也遇到了类似情况,今天刚刚换上的,消息是接收消息但不提醒模式,遇到两次,一次是17:50-18:00,一次是18:50-19:00.也不是所有联系人都收不到,是有一个群的消息收不到,其他时间那个群消息接收正常。刚刚我把协议换成了其他的类型了 -
RE: Java使用maven引入mirai-core依赖,实现QQ登录发消息等功能
我在使用的,你可以参考下
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>***.***</groupId> <artifactId>***</artifactId> <version>1.0-SNAPSHOT</version> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.4.2</version> <relativePath/> <!-- lookup parent from repository --> </parent> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <kotlin.version>1.6.0</kotlin.version> <kotlin-coroutines.version>1.6.0</kotlin-coroutines.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-reflect</artifactId> </dependency> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-stdlib-jdk8</artifactId> </dependency> <dependency> <groupId>net.mamoe</groupId> <artifactId>mirai-core-jvm</artifactId> <version>2.13.0-RC2</version> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.22</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>4.1.2</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>4.1.2</version> </dependency> <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-all</artifactId> <version>5.5.0</version> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.9.0</version> </dependency> <dependency> <groupId>com.mysql</groupId> <artifactId>mysql-connector-j</artifactId> <version>8.0.31</version> </dependency> <!-- <dependency>--> <!-- <groupId>org.mybatis</groupId>--> <!-- <artifactId>mybatis</artifactId>--> <!-- <version>3.5.11</version>--> <!-- </dependency>--> <!-- <dependency>--> <!-- <groupId>com.alibaba</groupId>--> <!-- <artifactId>druid</artifactId>--> <!-- <version>1.2.15</version>--> <!-- </dependency>--> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.1.3</version> </dependency> <dependency> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-core</artifactId> <version>1.4.0</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> <version>1.2.8</version> </dependency> <!-- md文档渲染 --> <dependency> <groupId>org.commonmark</groupId> <artifactId>commonmark</artifactId> <version>0.21.0</version> </dependency> <!-- html2img --> <dependency> <groupId>com.github.xuwei-k</groupId> <artifactId>html2image</artifactId> <version>0.1.0</version> </dependency> </dependencies> <build> <sourceDirectory>src/main/java</sourceDirectory> <testSourceDirectory>src/main/test/java</testSourceDirectory> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project>