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