Package net.dv8tion.jda.api.events.guild
Class GuildReadyEvent
- java.lang.Object
-
- net.dv8tion.jda.api.events.Event
-
- net.dv8tion.jda.api.events.guild.GenericGuildEvent
-
- net.dv8tion.jda.api.events.guild.GuildReadyEvent
-
- All Implemented Interfaces:
GenericEvent
public class GuildReadyEvent extends GenericGuildEvent
Indicates that aGuild
finished setting up
This event is fired if a guild finished setting up during login phase. After this event is fired, JDA will start dispatching events related to this guild. This indicates a guild was created and added to the cache. It will be fired for both the initial setup and full reconnects (indicated byReconnectedEvent
).Can be used to initialize any services that depend on this guild.
When a guild fails to ready up due to Discord outages you will not receive this event. Guilds that fail to ready up will either timeout or get marked as unavailable.
You can useReadyEvent.getGuildUnavailableCount()
andJDA.getUnavailableGuilds()
to check for unavailable guilds.GuildTimeoutEvent
will be fired for guilds that don't ready up and also don't get marked as unavailable by Discord. Guilds that timeout will be marked as unavailable by the timeout event, they will not fire aGuildUnavailableEvent
as that event is only indicating that a guild becomes unavailable after ready happened.
-
-
Constructor Summary
Constructors Constructor Description GuildReadyEvent(JDA api, long responseNumber, Guild guild)
-
Method Summary
-
Methods inherited from class net.dv8tion.jda.api.events.guild.GenericGuildEvent
getGuild
-
Methods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getResponseNumber
-
-