Class VoiceChannelUpdateEvent
- java.lang.Object
-
- discord4j.core.event.domain.Event
-
- discord4j.core.event.domain.channel.ChannelEvent
-
- discord4j.core.event.domain.channel.VoiceChannelUpdateEvent
-
public class VoiceChannelUpdateEvent extends ChannelEvent
Dispatched when aVoiceChannel
is updated in a guild.The old voice channel may not be present if channels are not stored.
This event is dispatched by Discord.
- See Also:
- Channel Update
-
-
Constructor Summary
Constructors Constructor Description VoiceChannelUpdateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, VoiceChannel current, VoiceChannel old)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VoiceChannel
getCurrent()
Gets the current, new version of theVoiceChannel
that was updated in this event.Optional<VoiceChannel>
getOld()
Gets the old version of theVoiceChannel
that was updated in this event, if present.String
toString()
-
Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
-
-
-
Constructor Detail
-
VoiceChannelUpdateEvent
public VoiceChannelUpdateEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, VoiceChannel current, @Nullable VoiceChannel old)
-
-
Method Detail
-
getCurrent
public VoiceChannel getCurrent()
Gets the current, new version of theVoiceChannel
that was updated in this event.- Returns:
- The current version of the updated
VoiceChannel
.
-
getOld
public Optional<VoiceChannel> getOld()
Gets the old version of theVoiceChannel
that was updated in this event, if present. This may not be available ifVoiceChannels
are not stored.- Returns:
- The old version of the updated
VoiceChannel
, if present.
-
-