fix(channels): retain scheduled results across pre-send outages

This commit is contained in:
Xubin Ren committed 2026-10-17 12:49:03 +08:00
1 parent faf1efaf09
commit 9c1b16b3cc
27 files changed
+568 -51

No files matched your search

+2 -1
View File
@@ -13,6 +13,7 @@ from typing import TYPE_CHECKING, Any, Literal, cast
from pydantic import Field
from nanobot.bus.delivery import ChannelNotReadyError
from nanobot.bus.events import OutboundMessage
from nanobot.bus.outbound_events import ContextCompactionEvent, ProgressEvent
from nanobot.bus.queue import MessageBus
@@ -539,7 +540,7 @@ class DiscordChannel(BaseChannel):
"""Send a message through Discord using discord.py."""
client = self._client
if client is None or not client.is_ready():
raise RuntimeError("Discord client is not ready")
raise ChannelNotReadyError("Discord client is not ready")
is_progress = isinstance(msg.event, ProgressEvent)