Closed maxoyed closed 1 year ago
难道 segment 不等于 h
难道 segment 不等于 h
发了没反应😂直接发文本是可以的
解决了,使用 bot.internal.createMessage
就能发送卡片消息,其他的 KOOK API 也可以调用,参考代码:
const bot = (session.bot as KookBot)
const res = await bot.internal.getUserView({
user_id: session.userId
})
console.log({ res })
bot.internal.createMessage({
type: Type.card,
target_id: session.channelId,
content: JSON.stringify([
{
"type": "card",
"theme": "secondary",
"size": "lg",
"modules": [
{
"type": "section",
"text": {
"type": "plain-text",
"content": "您是否认为\"KOOK\"是最好的语音软件?"
},
"mode": "right",
"accessory": {
"type": "button",
"theme": "primary",
"text": {
"type": "plain-text",
"content": "完全同意"
}
}
}
]
}
])
})
Koishi has no a card
element, so it is not surprising that you cannot use h
or the deprecated segment
.
Describe the bug
参考 #341 的方案,将 segment 改为 h,发送之后没有反应
Steps to reproduce
Expected behavior
正常发送 KOOK 的 CardMessage
Screenshots
No response
Versions
Additional context
No response