Handle missing monstr dependency

This commit is contained in:
thePR0M3TH3AN
2025-06-29 21:34:28 -04:00
parent c1d9ed8501
commit 65244adf57
2 changed files with 15 additions and 2 deletions

View File

@@ -3,7 +3,16 @@
import time
import logging
import traceback
from monstr.event.event import Event
try:
from monstr.event.event import Event
except ImportError: # pragma: no cover - optional dependency
class Event: # minimal placeholder for type hints when monstr is absent
id: str
created_at: int
content: str
# Instantiate the logger
logger = logging.getLogger(__name__)