Package discord4j.core.event.domain
Class VoiceServerUpdateEvent
- java.lang.Object
-
- discord4j.core.event.domain.Event
-
- discord4j.core.event.domain.VoiceServerUpdateEvent
-
public class VoiceServerUpdateEvent extends Event
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:
- Voice Server Update
-
-
Constructor Summary
Constructors Constructor Description VoiceServerUpdateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, String token, long guildId, String endpoint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getEndpoint()
Gets the voice server host's endpoint URL.Mono<Guild>
getGuild()
Requests to retrieve theGuild
whose voice server has been updated in this event.Snowflake
getGuildId()
Gets theSnowflake
ID of the guild whose voice server has been updated in this event.String
getToken()
Gets the voice connection token for the guild.String
toString()
-
Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
-
-
-
Constructor Detail
-
VoiceServerUpdateEvent
public VoiceServerUpdateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, String token, long guildId, @Nullable String endpoint)
-
-
Method Detail
-
getToken
public String getToken()
Gets the voice connection token for the guild.- Returns:
- The voice connection token.
-
getGuildId
public Snowflake getGuildId()
Gets theSnowflake
ID of the guild whose voice server has been updated in this event.- Returns:
- The ID of the guild involved.
-
getGuild
public Mono<Guild> getGuild()
Requests to retrieve theGuild
whose voice server has been updated in this event.
-
getEndpoint
@Nullable public String getEndpoint()
Gets the voice server host's endpoint URL.- Returns:
- The void server host's endpoint URL.
-
-