public class VoiceStateUpdateEvent extends Event
This change can include the change of any property in VoiceState
.
The old voice state may not be present if voice states are not stored.
This event is dispatched by Discord.
Constructor and Description |
---|
VoiceStateUpdateEvent(GatewayDiscordClient gateway,
ShardInfo shardInfo,
VoiceState current,
VoiceState old) |
Modifier and Type | Method and Description |
---|---|
VoiceState |
getCurrent()
Gets the current, new,
VoiceState that has been updated in this event. |
Optional<VoiceState> |
getOld()
Gets the old
VoiceState that has been updated in this event, if present. |
String |
toString() |
getClient, getShardInfo
public VoiceStateUpdateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, VoiceState current, @Nullable VoiceState old)
public VoiceState getCurrent()
VoiceState
that has been updated in this event.VoiceState
.public Optional<VoiceState> getOld()
VoiceState
that has been updated in this event, if present.
This may not be available if VoiceStates
are not stored.VoiceState
, if present.