Class CategoryUpdateEvent
- java.lang.Object
-
- discord4j.core.event.domain.Event
-
- discord4j.core.event.domain.channel.ChannelEvent
-
- discord4j.core.event.domain.channel.CategoryUpdateEvent
-
public class CategoryUpdateEvent extends ChannelEvent
Dispatched when aCategory
is updated in a guild.The old category may not be present if categories are not stored.
This event is dispatched by Discord.
- See Also:
- Channel Update
-
-
Constructor Summary
Constructors Constructor Description CategoryUpdateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, Category current, Category old)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Category
getCurrent()
Get the current, new, version of theCategory
that has been updated in this event.Optional<Category>
getOld()
Gets the old version of theCategory
that has been updated in this event, if present.String
toString()
-
Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
-
-
-
Constructor Detail
-
CategoryUpdateEvent
public CategoryUpdateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, Category current, @Nullable Category old)
-
-
Method Detail
-
getCurrent
public Category getCurrent()
Get the current, new, version of theCategory
that has been updated in this event.- Returns:
- The current version of the updated
Category
.
-
getOld
public Optional<Category> getOld()
Gets the old version of theCategory
that has been updated in this event, if present. This may not be available ifCategories
are not stored.- Returns:
- The old version of the updated
Category
, if present.
-
-