Class ReadyEvent
java.lang.Object
discord4j.core.event.domain.Event
discord4j.core.event.domain.lifecycle.GatewayLifecycleEvent
discord4j.core.event.domain.lifecycle.ReadyEvent
Dispatched when an initial connection to the Discord gateway has been established.
This event is dispatched by Discord.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
An incomplete Guild provided by Discord upon the ready event. -
Constructor Summary
ConstructorDescriptionReadyEvent
(GatewayDiscordClient gateway, ShardInfo shardInfo, discord4j.discordjson.json.gateway.Ready data, User self, Set<ReadyEvent.Guild> guilds) -
Method Summary
Modifier and TypeMethodDescriptiondiscord4j.discordjson.json.gateway.Ready
getData()
int
Gets the gateway protocol version being used.Gets a set of UnavailableReadyEvent.Guild
.getSelf()
Gets the botUser
.Gets the current session ID of the connection.getTrace()
Gets the trace provided by Discord.toString()
Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
Constructor Details
-
ReadyEvent
public ReadyEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, discord4j.discordjson.json.gateway.Ready data, User self, Set<ReadyEvent.Guild> guilds)
-
-
Method Details
-
getData
public discord4j.discordjson.json.gateway.Ready getData() -
getGatewayVersion
public int getGatewayVersion()Gets the gateway protocol version being used. Ex. 6.- Returns:
- The gateway protocol version being used.
-
getSelf
Gets the botUser
.- Returns:
- The bot
User
.
-
getGuilds
Gets a set of UnavailableReadyEvent.Guild
. TheseGuilds
have not yet been provided via aGuildCreateEvent
- Returns:
- A set of unavailable
Guilds
. - See Also:
-
getSessionId
Gets the current session ID of the connection.- Returns:
- the session ID of the connection
-
getTrace
Gets the trace provided by Discord. Used for debugging - TheGuilds
the user is in.- Returns:
- The trace provided by Discord.
-
toString
-