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 Guild
getCurrent()
Gets the current version of theGuild
involved in this event.Optional<Guild>
getOld()
Gets the old version of theGuild
involved in this event, if present.String
toString()
-
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 theGuild
involved in this event.- Returns:
- The current
Guild
involved in this event.
-
getOld
public Optional<Guild> getOld()
Gets the old version of theGuild
involved in this event, if present. This may not be available ifGuild
are not stored.- Returns:
- The old
Guild
involved in this event, if present.
-
-