Class ScheduledEventUpdateCoverImageEvent

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

public class ScheduledEventUpdateCoverImageEvent extends GenericScheduledEventUpdateEvent<String>
Indicates the cover image ID of a ScheduledEvent has changed.

Can be used to detect when the ScheduledEvent cover image had changed.

Identifier: image

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

    • ScheduledEventUpdateCoverImageEvent

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

    • getOldImageUrl

      @Nullable public String getOldImageUrl()
      Returns:
      The old cover image's ID
    • getNewImageUrl

      @Nullable public String getNewImageUrl()
      Returns:
      The new cover image's ID