refactor(shell): satori: api: message.create do not route to chronocat.internal.message.create2.markdown

This commit is contained in:
Il Harper 2024-07-25 23:29:49 +08:00
parent d66df3effd
commit 89d8a06f45
No known key found for this signature in database
GPG Key ID: 4B71FCA698E7E8EC

View File

@ -120,14 +120,16 @@ async function messageCreateUsingJson({
method = 'chronocat.internal.message.create2.poke' method = 'chronocat.internal.message.create2.poke'
} }
const markdowns = cctx.chronocat.h.select( // Markdown 现在不走此 API 发送
payloadRich.content, //
`${cctx.chronocat.platform}:markdown`, // const markdowns = cctx.chronocat.h.select(
) // payloadRich.content,
if (markdowns.length) { // `${cctx.chronocat.platform}:markdown`,
// TODO: 如果单条消息内除了 markdown 还有其他元素,打印警告 // )
method = 'chronocat.internal.message.create2.markdown' // if (markdowns.length) {
} // // TODO: 如果单条消息内除了 markdown 还有其他元素,打印警告
// method = 'chronocat.internal.message.create2.markdown'
// }
const result = await cctx.chronocat.api[method](payloadRich, config) const result = await cctx.chronocat.api[method](payloadRich, config)