Class ScheduledEventUpdateNameEvent
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<String>
net.dv8tion.jda.api.events.guild.scheduledevent.update.ScheduledEventUpdateNameEvent
- All Implemented Interfaces:
GenericEvent, UpdateEvent<ScheduledEvent, String>
Indicates that the
name of a ScheduledEvent has changed.
Can be used to detect when the ScheduledEvent name has changed.
Identifier: name
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
ConstructorsConstructorDescriptionScheduledEventUpdateNameEvent(JDA api, long responseNumber, ScheduledEvent scheduledEvent, String previous) -
Method Summary
Methods inherited from class GenericScheduledEventUpdateEvent
getEntity, getPropertyIdentifier, toStringMethods inherited from class GenericScheduledEventGatewayEvent
getScheduledEventMethods inherited from class GenericGuildEvent
getGuildMethods inherited from class Event
getJDA, getRawData, getResponseNumberMethods inherited from interface GenericEvent
getJDA, getRawData, getResponseNumberMethods inherited from interface UpdateEvent
getEntityType
-
Field Details
-
IDENTIFIER
- See Also:
-
-
Constructor Details
-
ScheduledEventUpdateNameEvent
public ScheduledEventUpdateNameEvent(@Nonnull JDA api, long responseNumber, @Nonnull ScheduledEvent scheduledEvent, @Nonnull String previous)
-
-
Method Details
-
getOldName
-
getNewName
-
getOldValue
Description copied from interface:UpdateEventThe old value- Specified by:
getOldValuein interfaceUpdateEvent<ScheduledEvent, String>- Overrides:
getOldValuein classGenericScheduledEventUpdateEvent<String>- Returns:
- The old value
-
getNewValue
Description copied from interface:UpdateEventThe new value- Specified by:
getNewValuein interfaceUpdateEvent<ScheduledEvent, String>- Overrides:
getNewValuein classGenericScheduledEventUpdateEvent<String>- Returns:
- The new value
-