Class ScheduledEventUpdateEndTimeEvent

All Implemented Interfaces:
GenericEvent, UpdateEvent<ScheduledEvent, OffsetDateTime>

public class ScheduledEventUpdateEndTimeEvent extends GenericScheduledEventUpdateEvent<OffsetDateTime>
Indicates the end time of a ScheduledEvent has changed.

Can be used to detect when the ScheduledEvent end time has changed.

Identifier: end_time

Requirements

This event requires the SCHEDULED_EVENTS intent and CacheFlag.SCHEDULED_EVENTS to be enabled.
createDefault(String) and createLight(String) disable this by default!

Discord does not specifically tell us about the updates, but merely tells us the ScheduledEvent was updated and gives us the updated ScheduledEvent object. In order to fire a specific event like this we need to have the old ScheduledEvent cached to compare against.

  • Field Details

  • Constructor Details

    • ScheduledEventUpdateEndTimeEvent

      public ScheduledEventUpdateEndTimeEvent(@Nonnull JDA api, long responseNumber, @Nonnull ScheduledEvent scheduledEvent, @Nullable OffsetDateTime previous)
  • Method Details

    • getOldEndTime

      @Nullable public OffsetDateTime getOldEndTime()
      The old end time.
      Returns:
      The old end time, or null if no end time was previously set.
    • getNewEndTime

      @Nullable public OffsetDateTime getNewEndTime()
      The new end time.
      Returns:
      The new start time, or null if the end time has been removed.