Class GuildVoiceMoveEvent
java.lang.Object
net.dv8tion.jda.api.events.Event
net.dv8tion.jda.api.events.guild.GenericGuildEvent
net.dv8tion.jda.api.events.guild.voice.GenericGuildVoiceEvent
net.dv8tion.jda.api.events.guild.voice.GenericGuildVoiceUpdateEvent
net.dv8tion.jda.api.events.guild.voice.GuildVoiceMoveEvent
- All Implemented Interfaces:
GenericEvent,GuildVoiceUpdateEvent,UpdateEvent<Member,AudioChannel>
Indicates that a
Member moves between AudioChannels.
When the Member is leaving a GuildVoiceLeaveEvent is fired instead
Can be used to detect when a member moves from one voice channel to another in the same guild.
Requirements
This event requires the VOICE_STATE CacheFlag to be enabled, which requires
the GUILD_VOICE_STATES intent.
createLight(String) disables that CacheFlag by default!
Additionally, this event requires the MemberCachePolicy
to cache the updated members. Discord does not specifically tell us about the updates, but merely tells us the
member was updated and gives us the updated member object. In order to fire a specific event like this we
need to have the old member cached to compare against.
- See Also:
-
Field Summary
Fields inherited from interface net.dv8tion.jda.api.events.guild.voice.GuildVoiceUpdateEvent
IDENTIFIER -
Constructor Summary
ConstructorsConstructorDescriptionGuildVoiceMoveEvent(JDA api, long responseNumber, Member member, AudioChannel channelLeft) -
Method Summary
Modifier and TypeMethodDescriptionTheAudioChannelthat was joinedTheAudioChannelthat theMemberis moved fromThe new valueThe old valueMethods inherited from class net.dv8tion.jda.api.events.guild.voice.GenericGuildVoiceUpdateEvent
getEntity, getPropertyIdentifier, toStringMethods inherited from class net.dv8tion.jda.api.events.guild.voice.GenericGuildVoiceEvent
getMember, getVoiceStateMethods inherited from class net.dv8tion.jda.api.events.guild.GenericGuildEvent
getGuildMethods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getResponseNumberMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.dv8tion.jda.api.events.GenericEvent
getJDA, getResponseNumberMethods inherited from interface net.dv8tion.jda.api.events.guild.voice.GuildVoiceUpdateEvent
getGuild, getMemberMethods inherited from interface net.dv8tion.jda.api.events.UpdateEvent
getEntityType
-
Constructor Details
-
GuildVoiceMoveEvent
-
-
Method Details
-
getChannelLeft
Description copied from interface:GuildVoiceUpdateEventTheAudioChannelthat theMemberis moved from- Specified by:
getChannelLeftin interfaceGuildVoiceUpdateEvent- Overrides:
getChannelLeftin classGenericGuildVoiceUpdateEvent- Returns:
- The
AudioChannel
-
getChannelJoined
Description copied from interface:GuildVoiceUpdateEventTheAudioChannelthat was joined- Specified by:
getChannelJoinedin interfaceGuildVoiceUpdateEvent- Overrides:
getChannelJoinedin classGenericGuildVoiceUpdateEvent- Returns:
- The
AudioChannel
-
getOldValue
Description copied from interface:UpdateEventThe old value- Specified by:
getOldValuein interfaceUpdateEvent<Member,AudioChannel> - Overrides:
getOldValuein classGenericGuildVoiceUpdateEvent- Returns:
- The old value
-
getNewValue
Description copied from interface:UpdateEventThe new value- Specified by:
getNewValuein interfaceUpdateEvent<Member,AudioChannel> - Overrides:
getNewValuein classGenericGuildVoiceUpdateEvent- Returns:
- The new value
-