Package discord4j.core.event.domain
Class VoiceServerUpdateEvent
java.lang.Object
discord4j.core.event.domain.Event
discord4j.core.event.domain.VoiceServerUpdateEvent
Dispatched when the current user is initially connecting to a voice channel, and when the current voice instance
fails over to a new server (guild's voice server is updated).
This event is dispatched by Discord.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVoiceServerUpdateEvent
(GatewayDiscordClient gateway, ShardInfo shardInfo, String token, long guildId, String endpoint) -
Method Summary
Modifier and TypeMethodDescriptionGets the voice server host's endpoint URL.getGuild()
Requests to retrieve theGuild
whose voice server has been updated in this event.Gets theSnowflake
ID of the guild whose voice server has been updated in this event.getToken()
Gets the voice connection token for the guild.toString()
Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
Constructor Details
-
VoiceServerUpdateEvent
public VoiceServerUpdateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, String token, long guildId, @Nullable String endpoint)
-
-
Method Details
-
getToken
Gets the voice connection token for the guild.- Returns:
- The voice connection token.
-
getGuildId
Gets theSnowflake
ID of the guild whose voice server has been updated in this event.- Returns:
- The ID of the guild involved.
-
getGuild
Requests to retrieve theGuild
whose voice server has been updated in this event. -
getEndpoint
Gets the voice server host's endpoint URL.- Returns:
- The void server host's endpoint URL.
-
toString
-