From 0e726a81dccdf806099a751090249fb153910033 Mon Sep 17 00:00:00 2001 From: caneleex Date: Thu, 2 Dec 2021 21:03:05 +0100 Subject: [PATCH] Make Guild#moveVoiceMember support AudioChannel instead (#1928) --- .../net/dv8tion/jda/api/entities/Guild.java | 30 +++++++++---------- .../jda/internal/entities/GuildImpl.java | 20 ++++++------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/main/java/net/dv8tion/jda/api/entities/Guild.java b/src/main/java/net/dv8tion/jda/api/entities/Guild.java index e74e08fe31..7082165529 100644 --- a/src/main/java/net/dv8tion/jda/api/entities/Guild.java +++ b/src/main/java/net/dv8tion/jda/api/entities/Guild.java @@ -3790,9 +3790,9 @@ default Task> retrieveMembersByIds(boolean includePresence, @Nonnul /* From GuildController */ /** - * Used to move a {@link net.dv8tion.jda.api.entities.Member Member} from one {@link net.dv8tion.jda.api.entities.VoiceChannel VoiceChannel} - * to another {@link net.dv8tion.jda.api.entities.VoiceChannel VoiceChannel}. - *
As a note, you cannot move a Member that isn't already in a VoiceChannel. Also they must be in a VoiceChannel + * Used to move a {@link net.dv8tion.jda.api.entities.Member Member} from one {@link net.dv8tion.jda.api.entities.AudioChannel AudioChannel} + * to another {@link net.dv8tion.jda.api.entities.AudioChannel AudioChannel}. + *
As a note, you cannot move a Member that isn't already in a AudioChannel. Also they must be in a AudioChannel * in the same Guild as the one that you are moving them to. * *

Possible {@link net.dv8tion.jda.api.requests.ErrorResponse ErrorResponses} caused by @@ -3813,35 +3813,35 @@ default Task> retrieveMembersByIds(boolean includePresence, @Nonnul * * @param member * The {@link net.dv8tion.jda.api.entities.Member Member} that you are moving. - * @param voiceChannel - * The destination {@link net.dv8tion.jda.api.entities.VoiceChannel VoiceChannel} to which the member is being + * @param audioChannel + * The destination {@link net.dv8tion.jda.api.entities.AudioChannel AudioChannel} to which the member is being * moved to. Or null to perform a voice kick. * * @throws IllegalStateException - * If the Member isn't currently in a VoiceChannel in this Guild, or {@link net.dv8tion.jda.api.utils.cache.CacheFlag#VOICE_STATE} is disabled. + * If the Member isn't currently in a AudioChannel in this Guild, or {@link net.dv8tion.jda.api.utils.cache.CacheFlag#VOICE_STATE} is disabled. * @throws IllegalArgumentException *

* @throws net.dv8tion.jda.api.exceptions.InsufficientPermissionException * * * @return {@link net.dv8tion.jda.api.requests.RestAction RestAction} */ @Nonnull @CheckReturnValue - RestAction moveVoiceMember(@Nonnull Member member, @Nullable VoiceChannel voiceChannel); + RestAction moveVoiceMember(@Nonnull Member member, @Nullable AudioChannel audioChannel); /** - * Used to kick a {@link net.dv8tion.jda.api.entities.Member Member} from a {@link net.dv8tion.jda.api.entities.VoiceChannel VoiceChannel}. - *
As a note, you cannot kick a Member that isn't already in a VoiceChannel. Also they must be in a VoiceChannel + * Used to kick a {@link net.dv8tion.jda.api.entities.Member Member} from a {@link net.dv8tion.jda.api.entities.AudioChannel AudioChannel}. + *
As a note, you cannot kick a Member that isn't already in a AudioChannel. Also they must be in a AudioChannel * in the same Guild. * *

Equivalent to {@code moveVoiceMember(member, null)}. @@ -3863,16 +3863,16 @@ default Task> retrieveMembersByIds(boolean includePresence, @Nonnul * The {@link net.dv8tion.jda.api.entities.Member Member} that you are moving. * * @throws IllegalStateException - * If the Member isn't currently in a VoiceChannel in this Guild, or {@link net.dv8tion.jda.api.utils.cache.CacheFlag#VOICE_STATE} is disabled. + * If the Member isn't currently in a AudioChannel in this Guild, or {@link net.dv8tion.jda.api.utils.cache.CacheFlag#VOICE_STATE} is disabled. * @throws IllegalArgumentException *

    *
  • If any of the provided arguments is {@code null}
  • *
  • If the provided Member isn't part of this {@link net.dv8tion.jda.api.entities.Guild Guild}
  • - *
  • If the provided VoiceChannel isn't part of this {@link net.dv8tion.jda.api.entities.Guild Guild}
  • + *
  • If the provided AudioChannel isn't part of this {@link net.dv8tion.jda.api.entities.Guild Guild}
  • *
* @throws net.dv8tion.jda.api.exceptions.InsufficientPermissionException * If this account doesn't have {@link net.dv8tion.jda.api.Permission#VOICE_MOVE_OTHERS} - * in the VoiceChannel that the Member is currently in. + * in the AudioChannel that the Member is currently in. * * @return {@link net.dv8tion.jda.api.requests.RestAction RestAction} */ diff --git a/src/main/java/net/dv8tion/jda/internal/entities/GuildImpl.java b/src/main/java/net/dv8tion/jda/internal/entities/GuildImpl.java index ebf96a9240..8f27d0a4f1 100644 --- a/src/main/java/net/dv8tion/jda/internal/entities/GuildImpl.java +++ b/src/main/java/net/dv8tion/jda/internal/entities/GuildImpl.java @@ -1215,31 +1215,31 @@ public RestAction