Always check scheduled_events after scheduled_event update #410
All checks were successful
Deploy staging on push / on-push-deploy_sh-edraft (push) Successful in 4m26s
Deploy dev on push / on-push-deploy_sh-edraft (push) Successful in 3m33s

This commit is contained in:
Sven Heidemann 2023-12-02 15:32:16 +01:00
parent 8a76b46165
commit a2dd447dbd

View File

@ -37,10 +37,10 @@ class BaseOnScheduledEventUpdateEvent(OnScheduledEventUpdateABC):
if before.status != after.status and (
after.status.value == EventStatus.cancelled.value or after.status.value == EventStatus.completed.value
):
await self._events.check_and_create_scheduled_events(before.guild)
event = self._events.get_active_event(after)
if event is None:
return
self._events.remove_event(event)
await self._events.check_and_create_scheduled_events(before.guild)
self._logger.debug(__name__, f"Module {type(self)} stopped")