Class GuildUpdateEvent
- java.lang.Object
-
- discord4j.core.event.domain.Event
-
- discord4j.core.event.domain.guild.GuildEvent
-
- discord4j.core.event.domain.guild.GuildUpdateEvent
-
public class GuildUpdateEvent extends GuildEvent
Dispatched when a guild is updated.The old guild may not be present if guilds are not stored.
This event is Dispatched by Discord.
- See Also:
- Guild Update
-
-
Constructor Summary
Constructors Constructor Description GuildUpdateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, Guild current, Guild old)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GuildgetCurrent()Gets the current version of theGuildinvolved in this event.Optional<Guild>getOld()Gets the old version of theGuildinvolved in this event, if present.StringtoString()-
Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
-
-
-
Constructor Detail
-
GuildUpdateEvent
public GuildUpdateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, Guild current, @Nullable Guild old)
-
-
Method Detail
-
getCurrent
public Guild getCurrent()
Gets the current version of theGuildinvolved in this event.- Returns:
- The current
Guildinvolved in this event.
-
getOld
public Optional<Guild> getOld()
Gets the old version of theGuildinvolved in this event, if present. This may not be available ifGuildare not stored.- Returns:
- The old
Guildinvolved in this event, if present.
-
-