Package net.dv8tion.jda.api.events
Class ReadyEvent
java.lang.Object
net.dv8tion.jda.api.events.Event
net.dv8tion.jda.api.events.ReadyEvent
- All Implemented Interfaces:
GenericEvent
Indicates that JDA finished loading all entities.
Before this event was fired all entity related functions were not guaranteed to work as expected.
Before this event was fired all entity related functions were not guaranteed to work as expected.
Can be used to indicate when JDA finished populating internal objects and is ready to be used. When this is fired all available entities are cached and accessible.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Number of available guilds for this session.int
Sum of bothgetGuildAvailableCount()
andgetGuildUnavailableCount()
.int
Number of guilds currently not available to this session
Discord failed to connect these guilds to our gateway and we had to discard them for now.Methods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getResponseNumber
-
Constructor Details
-
ReadyEvent
-
-
Method Details
-
getGuildAvailableCount
public int getGuildAvailableCount()Number of available guilds for this session.
When discord fails to connect guilds for our gateway session they will not be in cache here yet but instead will fire aGuildReadyEvent
later.- Returns:
- Number of available guilds for this session
- See Also:
-
getGuildTotalCount
public int getGuildTotalCount()Sum of bothgetGuildAvailableCount()
andgetGuildUnavailableCount()
.- Returns:
- Total numbers of guilds known to this JDA session
-