Try filtering scheduled events
This commit is contained in:
parent
53c6bf4208
commit
36998470e8
@ -9,7 +9,7 @@ from cpl_core.database.context import DatabaseContextABC
|
|||||||
from cpl_core.logging import LoggerABC
|
from cpl_core.logging import LoggerABC
|
||||||
from cpl_discord.container import Guild
|
from cpl_discord.container import Guild
|
||||||
from cpl_query.extension import List
|
from cpl_query.extension import List
|
||||||
from discord import PrivacyLevel
|
from discord import PrivacyLevel, EventStatus
|
||||||
from discord.scheduled_event import ScheduledEvent as DiscordEvent
|
from discord.scheduled_event import ScheduledEvent as DiscordEvent
|
||||||
|
|
||||||
from bot_data.abc.scheduled_event_repository_abc import ScheduledEventRepositoryABC
|
from bot_data.abc.scheduled_event_repository_abc import ScheduledEventRepositoryABC
|
||||||
@ -106,6 +106,7 @@ class EventService:
|
|||||||
lambda x: x.name == scheduled_event.name
|
lambda x: x.name == scheduled_event.name
|
||||||
and x.description == scheduled_event.description
|
and x.description == scheduled_event.description
|
||||||
and x.entity_type == scheduled_event.entity_type
|
and x.entity_type == scheduled_event.entity_type
|
||||||
|
and x.status == EventStatus.scheduled
|
||||||
)
|
)
|
||||||
if from_guild.count() != 0:
|
if from_guild.count() != 0:
|
||||||
self._logger.debug(__name__, f"Event {scheduled_event.name} already exists on discord server")
|
self._logger.debug(__name__, f"Event {scheduled_event.name} already exists on discord server")
|
||||||
|
Loading…
Reference in New Issue
Block a user