Class ScheduledEventUpdateStatusEvent
java.lang.Object
net.dv8tion.jda.api.events.Event
net.dv8tion.jda.api.events.guild.GenericGuildEvent
net.dv8tion.jda.api.events.guild.scheduledevent.GenericScheduledEventGatewayEvent
net.dv8tion.jda.api.events.guild.scheduledevent.update.GenericScheduledEventUpdateEvent<ScheduledEvent.Status>
net.dv8tion.jda.api.events.guild.scheduledevent.update.ScheduledEventUpdateStatusEvent
- All Implemented Interfaces:
GenericEvent,UpdateEvent<ScheduledEvent,ScheduledEvent.Status>
public class ScheduledEventUpdateStatusEvent
extends GenericScheduledEventUpdateEvent<ScheduledEvent.Status>
Indicates that the
status of a ScheduledEvent has changed. The status
of a ScheduledEvent represents if it is currently active, canceled, or completed.
Can be used to detect when the ScheduledEvent status has changed.
Identifier: status
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionScheduledEventUpdateStatusEvent(JDA api, long responseNumber, ScheduledEvent scheduledEvent, ScheduledEvent.Status previous) -
Method Summary
Methods inherited from class net.dv8tion.jda.api.events.guild.scheduledevent.update.GenericScheduledEventUpdateEvent
getEntity, getPropertyIdentifier, toStringMethods inherited from class net.dv8tion.jda.api.events.guild.scheduledevent.GenericScheduledEventGatewayEvent
getScheduledEventMethods inherited from class net.dv8tion.jda.api.events.guild.GenericGuildEvent
getGuildMethods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getRawData, getResponseNumberMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.dv8tion.jda.api.events.GenericEvent
getJDA, getRawData, getResponseNumberMethods inherited from interface net.dv8tion.jda.api.events.UpdateEvent
getEntityType
-
Field Details
-
IDENTIFIER
- See Also:
-
-
Constructor Details
-
ScheduledEventUpdateStatusEvent
public ScheduledEventUpdateStatusEvent(@Nonnull JDA api, long responseNumber, @Nonnull ScheduledEvent scheduledEvent, @Nonnull ScheduledEvent.Status previous)
-
-
Method Details
-
getOldStatus
The oldstatus.- Returns:
- The old status
-
getNewStatus
The newstatus.- Returns:
- The new status
-
getOldValue
Description copied from interface:UpdateEventThe old value- Specified by:
getOldValuein interfaceUpdateEvent<ScheduledEvent,ScheduledEvent.Status> - Overrides:
getOldValuein classGenericScheduledEventUpdateEvent<ScheduledEvent.Status>- Returns:
- The old value
-
getNewValue
Description copied from interface:UpdateEventThe new value- Specified by:
getNewValuein interfaceUpdateEvent<ScheduledEvent,ScheduledEvent.Status> - Overrides:
getNewValuein classGenericScheduledEventUpdateEvent<ScheduledEvent.Status>- Returns:
- The new value
-