Class GenericGuildVoiceEvent
- java.lang.Object
-
- net.dv8tion.jda.api.events.Event
-
- net.dv8tion.jda.api.events.guild.GenericGuildEvent
-
- net.dv8tion.jda.api.events.guild.voice.GenericGuildVoiceEvent
-
- All Implemented Interfaces:
GenericEvent
- Direct Known Subclasses:
GenericGuildVoiceUpdateEvent,GuildVoiceDeafenEvent,GuildVoiceGuildDeafenEvent,GuildVoiceGuildMuteEvent,GuildVoiceMuteEvent,GuildVoiceRequestToSpeakEvent,GuildVoiceSelfDeafenEvent,GuildVoiceSelfMuteEvent,GuildVoiceStreamEvent,GuildVoiceSuppressEvent,GuildVoiceVideoEvent
public abstract class GenericGuildVoiceEvent extends GenericGuildEvent
Indicates that aGuildvoice event is fired.
Every GuildVoiceEvent is an instance of this event and can be casted.Can be used to detect any GuildVoiceEvent.
Requirements
These events require the
VOICE_STATECacheFlag to be enabled, which requires theGUILD_VOICE_STATESintent.createLight(String)disables that CacheFlag by default!Additionally, these events require the
MemberCachePolicyto 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 specific events like these we need to have the old member cached to compare against.
-
-
Constructor Summary
Constructors Constructor Description GenericGuildVoiceEvent​(JDA api, long responseNumber, Member member)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MembergetMember()The affectedMemberGuildVoiceStategetVoiceState()-
Methods inherited from class net.dv8tion.jda.api.events.guild.GenericGuildEvent
getGuild
-
Methods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getResponseNumber
-
-
-
-
Method Detail
-
getVoiceState
@Nonnull public GuildVoiceState getVoiceState()
- Returns:
- The
GuildVoiceStateof the member
-
-