mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 10:51:05 -05:00
fix(processor): add fallback to absolute imports in reactions.py
This commit is contained in:
@@ -7,6 +7,8 @@ from typing import List, Optional
|
||||
import discord # type: ignore
|
||||
from urllib.parse import urlparse
|
||||
|
||||
try:
|
||||
# Try relative imports first
|
||||
from ..processor.constants import (
|
||||
REACTIONS,
|
||||
ReactionType,
|
||||
@@ -14,6 +16,15 @@ from ..processor.constants import (
|
||||
get_progress_emoji,
|
||||
)
|
||||
from ..database.video_archive_db import VideoArchiveDB
|
||||
except ImportError:
|
||||
# Fall back to absolute imports if relative imports fail
|
||||
from videoarchiver.processor.constants import (
|
||||
REACTIONS,
|
||||
ReactionType,
|
||||
get_reaction,
|
||||
get_progress_emoji,
|
||||
)
|
||||
from videoarchiver.database.video_archive_db import VideoArchiveDB
|
||||
|
||||
logger = logging.getLogger("VideoArchiver")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user