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
<>及其包裹的内容是具体信息
OneBotForwardNode指定UserID、Nickname无效,发送后显示的头像、名字始终与Bot相同。
implementation("love.forte.simbot:simbot-core-spring-boot-starter:4.3.1") implementation("love.forte.simbot.component:simbot-component-onebot-v11-core:1.0.1")
@Listener @Filter(".test forward") suspend fun OneBotMessageEvent.testForward() { val node = OneBotForwardNode.create( userId = <user_id>.ID, nickname = "<nickname>", content = listOf( OneBotText.create( "测试" ) ) ) send(node.toElement()) }
// 上文中的send函数 suspend fun OneBotMessageEvent.send(message: Message) { when(this) { is OneBotGroupMessageEvent -> content().send(message) is OneBotFriendMessageEvent -> content().send(message) else -> reply(message) } }
另外,在使用GoCq作为OB服务端时报错:
[2024-07-29 20:32:37] [WARNING]: 转换消息 [CQ:node,user_id=<user_id>,nickname=<nickname>,content=[{"type":"text","data":{"text":"测试"}}]] 到MiraiGo Element时出现错误: unsupported message type: node. [2024-07-29 20:32:37] [WARNING]: 群 <group_id> 消息发送失败: 消息为空.
查看其文档时,发现GoCq定义API/send_group_forward_msg、/send_private_forward_msg用于发送转发消息
/send_group_forward_msg
/send_private_forward_msg
The text was updated successfully, but these errors were encountered:
通过本地测试(使用的llonebot),的确出现了无法指定用户名和id的情况,但是实际的请求参数并没有错,目前初步怀疑是服务端的实现问题。
至于不同平台的独特API,如果想要使用,目前可能只能考虑使用 Kotlin 对 OneBotApi 类型自行扩展实现并使用了,如有需要可以参考 OneBotApi 已有的各个实现类型。
OneBotApi
Sorry, something went wrong.
我注意到在 llonebot文档 中有明确说明:伪造的消息会以bot身份显示,因此这在llonebot中可能是一种预期内的结果。 也许GoCq的相关文档内也会有相关的说明?可以前去查阅一下。
No branches or pull requests
OneBotForwardNode指定UserID、Nickname无效,发送后显示的头像、名字始终与Bot相同。
下文与问题无关
另外,在使用GoCq作为OB服务端时报错:
查看其文档时,发现GoCq定义API
/send_group_forward_msg
、/send_private_forward_msg
用于发送转发消息The text was updated successfully, but these errors were encountered: