From ab56ac4987ec68705675ee6f85d100e1cfdfc85d Mon Sep 17 00:00:00 2001 From: Him188 Date: Sun, 4 Apr 2021 16:31:36 +0800 Subject: [PATCH] Fix docs about `selectMessages`, #1160 --- docs/Events.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Events.md b/docs/Events.md index 309cacc50..988363d13 100644 --- a/docs/Events.md +++ b/docs/Events.md @@ -459,7 +459,7 @@ val event: BotNudgedEvent = nextEvent(5000) { it.bot.id == 12345 ```kotlin MyCoroutineScope.subscribeAlways { if (message.contentEquals("ocr")) { - reply("请发送你要进行 OCR 的图片或图片链接") + subject.sendMessage("请发送你要进行 OCR 的图片或图片链接") val image: InputStream = selectMessages { has { URL(it.queryUrl()).openStream() } has { URL(it.content).openStream() } @@ -468,7 +468,7 @@ MyCoroutineScope.subscribeAlways<GroupMessageEvent> { } ?: return@subscribeAlways val result = ocr(image) - quoteReply(result) + subject.sendMessage(message.quote() + result) } } ```