Skip to content

Commit

Permalink
Document GuildVoiceState#getChannel() requires the member cache
Browse files Browse the repository at this point in the history
  • Loading branch information
freya022 committed Jun 24, 2024
1 parent e24872e commit ba60661
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ public interface GuildVoiceState extends ISnowflake
* Returns the current {@link AudioChannelUnion} that the {@link Member} is in.
* If the {@link Member} is currently not connected to a {@link AudioChannel}, this returns null.
*
* <p><b>Note:</b> This will return {@code null} if the member is not cached!
* You can use {@link net.dv8tion.jda.api.utils.MemberCachePolicy#VOICE MemberCachePolicy.VOICE}
* to cache members in voice channels.
*
* @return The AudioChannelUnion that the Member is connected to, or null.
*/
@Nullable
Expand Down

0 comments on commit ba60661

Please sign in to comment.