This commit is contained in:
Slipstream 2025-04-28 21:25:16 -06:00
parent 277b59adcc
commit 09f2c7a6b4
Signed by: slipstream
GPG Key ID: 13E498CE010AC6FD

View File

@ -36,7 +36,10 @@ class GurtMessageCacheHistory(BaseChatMessageHistory):
"""Chat message history that reads from and potentially writes to GurtCog's message cache."""
def __init__(self, cog: 'GurtCog', channel_id: int):
from .cog import GurtCog # Local import for type check
# Use relative import for type checking within the function scope if needed,
# or rely solely on the TYPE_CHECKING block if sufficient.
# For runtime check, a local relative import is safer.
from .cog import GurtCog # Use relative import here
if not isinstance(cog, GurtCog):
raise TypeError("GurtMessageCacheHistory requires a GurtCog instance.")
self.cog = cog