chore: generate
This commit is contained in:
@@ -233,9 +233,11 @@ export default new Hono<{ Bindings: Env }>()
|
|||||||
|
|
||||||
const content = body.event?.message?.content
|
const content = body.event?.message?.content
|
||||||
const parsed =
|
const parsed =
|
||||||
typeof content === "string" && content.trim().startsWith("{") ? (JSON.parse(content) as {
|
typeof content === "string" && content.trim().startsWith("{")
|
||||||
|
? (JSON.parse(content) as {
|
||||||
text?: string
|
text?: string
|
||||||
}) : undefined
|
})
|
||||||
|
: undefined
|
||||||
const text = typeof parsed?.text === "string" ? parsed.text : typeof content === "string" ? content : ""
|
const text = typeof parsed?.text === "string" ? parsed.text : typeof content === "string" ? content : ""
|
||||||
|
|
||||||
let message = text.trim().replace(/^@_user_\d+\s*/, "")
|
let message = text.trim().replace(/^@_user_\d+\s*/, "")
|
||||||
|
|||||||
Reference in New Issue
Block a user