We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
消息源编码 转 字符串, 字符串解码 转 消息源, 引用回复 At 出现 At 变空白
如以下代码:
val json = Json{ Mirai serializersModule = MessageSerializers.serializersModule ignoreUnknownKeys = true } /** 机器人收到的群消息的事件 */ bot.eventChannel.subscribeAlways<GroupMessageEvent> { ev -> GlobalScope.launch { var msgSrc = message[MessageSource]!! val hashMap = HashMap<String, String>() hashMap["messageSrc"] = json.encodeToString(MessageSource.serializer(), msgSrc) //去掉此句,引用回复可以 at, 不知道为什么使用此句解码就不可用 at msgSrc = json.decodeFromString(MessageSource.serializer(), hashMap["messageSrc"].toString()) val group = bot.getGroup(msgSrc.targetId) val chain = msgSrc.quote() + At(qq号码) group?.sendMessage(chain) } }
2.14.0
ANDROID_PHONE
No response
The text was updated successfully, but these errors were encountered:
。。。。。。。。。。。
Sorry, something went wrong.
e686a23
No branches or pull requests
问题描述
消息源编码 转 字符串, 字符串解码 转 消息源, 引用回复 At 出现 At 变空白
复现
如以下代码:
mirai-core 版本
2.14.0
bot-protocol
ANDROID_PHONE
其他组件版本
No response
系统日志
No response
网络日志
No response
补充信息
No response
The text was updated successfully, but these errors were encountered: