Closed 164ebr closed 2 years ago
总之就是加一个判断机器人是否被禁言的功能即可
其实我早就发现这个问题了,我也很纳闷为什么要抛个错误。然后我看了代码发现我只提供了检测他人是否被禁言的方法.. 就目前来说你有两种方案:用反射或者其他手段把机器人QQ获取MiraiNormalMember然后调用isMuted方法。或者用新线程调用发送消息,这样线程之间互不干扰。 我等一下可能会发1.5.3,也可能放到1.6里发。
另外 ,也会出现这种错误“java.lang.IllegalStateException: Send message failed: MessageSvcPbSendMsg.Response.Failed(resultType=110, errorCode=0, errorMessage=发送失败,你已被移出该群,请重新加群。)”
类似你在手机QQ点开一个群,QQ给你弹出 “你已离开此群” 这样的弹窗
1.5.3 发布后,请使用 isBotMuted()
问题描述
机器人在群内处于全员禁言状态时“BotIsBeingMutedException: bot is being muted, remaining 0.0s seconds” 程序会在禁言的群那部分卡住没有继续执行(我写的一个遍历群 然后挨个群发送消息的功能 类似群发) 然后群发并不完整,在禁言的那个群停了下来,后台报错BotIsBeingMutedException,程序也停了
复现方法
List groups = MiraiBot.getBot(MiraiBot.getOnlineBots().get(0)).getGroupList();
for (Long group : groups) {
MiraiBot.getBot(MiraiBot.getOnlineBots().get(0)).getGroup(group).sendMessageMirai(“测试”);
}
版本类型
截图
服务器日志
额外说明
或许是其他问题(我也不清楚= =