This repository was archived by the owner on Mar 11, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -527,7 +527,7 @@ AstrBot 提供了开箱即用的会话控制功能:
527527导入:
528528
529529``` py
530- from import astrbot.api.message_components as Comp
530+ import astrbot.api.message_components as Comp
531531from astrbot.core.utils.session_waiter import (
532532 session_waiter,
533533 SessionController,
@@ -552,8 +552,8 @@ async def handle_empty_mention(self, event: AstrMessageEvent):
552552
553553 # ...
554554 message_result = event.make_result()
555- message_result.chain = [Comp.Plain(" 先见之明" )] # from import astrbot.api.message_components as Comp
556- await event.send(bot_reply ) # 发送回复,不能使用 yield
555+ message_result.chain = [Comp.Plain(" 先见之明" )] # import astrbot.api.message_components as Comp
556+ await event.send(message_result ) # 发送回复,不能使用 yield
557557
558558 controller.keep(timeout = 60 , reset_timeout = True ) # 重置超时时间为 60s,如果不重置,则会继续之前的超时时间计时。
559559
@@ -589,7 +589,7 @@ async def handle_empty_mention(self, event: AstrMessageEvent):
589589默认情况下,AstrBot 会话控制器会将基于 ` sender_id ` (发送人的 ID)作为识别不同会话的标识,如果想将一整个群作为一个会话,则需要自定义会话 ID 算子。
590590
591591``` py
592- from import astrbot.api.message_components as Comp
592+ import astrbot.api.message_components as Comp
593593from astrbot.core.utils.session_waiter import (
594594 session_waiter,
595595 SessionFilter,
You can’t perform that action at this time.
0 commit comments