Class GenericGuildStickerUpdateEvent<T>
java.lang.Object
net.dv8tion.jda.api.events.Event
net.dv8tion.jda.api.events.sticker.GenericGuildStickerEvent
net.dv8tion.jda.api.events.sticker.update.GenericGuildStickerUpdateEvent<T>
- All Implemented Interfaces:
GenericEvent, UpdateEvent<GuildSticker, T>
- Direct Known Subclasses:
GuildStickerUpdateAvailableEvent, GuildStickerUpdateDescriptionEvent, GuildStickerUpdateNameEvent, GuildStickerUpdateTagsEvent
public abstract class GenericGuildStickerUpdateEvent<T>
extends GenericGuildStickerEvent
implements UpdateEvent<GuildSticker, T>
Indicates that an
GuildSticker was updated.
Requirements
These events require the STICKER CacheFlag to be enabled, which requires
the GUILD_EXPRESSIONS intent.
createLight(String) disables that CacheFlag by default!
-
Constructor Summary
ConstructorsConstructorDescriptionGenericGuildStickerUpdateEvent(JDA api, long responseNumber, Guild guild, GuildSticker sticker, String identifier, T oldValue, T newValue) -
Method Summary
Modifier and TypeMethodDescriptionThe affected entityThe new valueThe old valueThe field name for the updated propertyMethods inherited from class GenericGuildStickerEvent
getGuild, getStickerMethods inherited from class Event
getJDA, getRawData, getResponseNumber, toStringMethods inherited from interface GenericEvent
getJDA, getRawData, getResponseNumberMethods inherited from interface UpdateEvent
getEntityType
-
Constructor Details
-
GenericGuildStickerUpdateEvent
-
-
Method Details
-
getPropertyIdentifier
Description copied from interface:UpdateEventThe field name for the updated propertyExample
@Override public void onGenericRoleUpdate(GenericRoleUpdateEvent event) { switch (event.getPropertyIdentifier()) { case RoleUpdateColorEvent.IDENTIFIER: System.out.printf("Updated color for role: %s%n", event); break; case RoleUpdatePositionEvent.IDENTIFIER: RoleUpdatePositionEvent update = (RoleUpdatePositionEvent) event; System.out.printf("Updated position for role: %s raw(%s->%s)%n", event, update.getOldPositionRaw(), update.getNewPositionRaw()); break; default: return; } }- Specified by:
getPropertyIdentifierin interfaceUpdateEvent<GuildSticker, T>- Returns:
- The name of the updated property
-
getEntity
Description copied from interface:UpdateEventThe affected entity- Specified by:
getEntityin interfaceUpdateEvent<GuildSticker, T>- Returns:
- The affected entity
-
getOldValue
Description copied from interface:UpdateEventThe old value- Specified by:
getOldValuein interfaceUpdateEvent<GuildSticker, T>- Returns:
- The old value
-
getNewValue
Description copied from interface:UpdateEventThe new value- Specified by:
getNewValuein interfaceUpdateEvent<GuildSticker, T>- Returns:
- The new value
-