diff --git a/core/src/main/kotlin/entity/VoiceState.kt b/core/src/main/kotlin/entity/VoiceState.kt index 513e917f0f5..c64d40a1e7f 100644 --- a/core/src/main/kotlin/entity/VoiceState.kt +++ b/core/src/main/kotlin/entity/VoiceState.kt @@ -4,6 +4,7 @@ import dev.kord.common.annotation.DeprecatedSinceKord import dev.kord.common.entity.Snowflake import dev.kord.core.Kord import dev.kord.core.KordObject +import dev.kord.core.behavior.channel.BaseVoiceChannelBehavior import dev.kord.core.cache.data.VoiceStateData import dev.kord.core.entity.channel.VoiceChannel import dev.kord.core.supplier.EntitySupplier @@ -51,7 +52,7 @@ class VoiceState( */ @DeprecatedSinceKord("0.7.0") @Deprecated("Use getChannelOrNull instead.", ReplaceWith("getChannelOrNull"), DeprecationLevel.ERROR) - suspend fun getChannel(): VoiceChannel? = channelId?.let { supplier.getChannelOfOrNull(it) } + suspend fun getChannel(): BaseVoiceChannelBehavior? = channelId?.let { supplier.getChannelOfOrNull(it) } /** * Requests to get the voice channel through the [strategy], @@ -59,7 +60,7 @@ class VoiceState( * * @throws [RequestException] if anything went wrong during the request. */ - suspend fun getChannelOrNull(): VoiceChannel? = channelId?.let { supplier.getChannelOfOrNull(it) } + suspend fun getChannelOrNull(): BaseVoiceChannelBehavior? = channelId?.let { supplier.getChannelOfOrNull(it) } /** diff --git a/rest/src/main/kotlin/service/GuildService.kt b/rest/src/main/kotlin/service/GuildService.kt index ffafff1770f..f958ede5302 100644 --- a/rest/src/main/kotlin/service/GuildService.kt +++ b/rest/src/main/kotlin/service/GuildService.kt @@ -393,7 +393,7 @@ class GuildService(requestHandler: RequestHandler) : RestService(requestHandler) suspend fun modifyVoiceState(guildId: Snowflake, userId: Snowflake, request: VoiceStateModifyRequest) = - call(Route.SelfVoiceStatePatch) { + call(Route.OthersVoiceStatePatch) { keys[Route.GuildId] = guildId keys[Route.UserId] = userId body(VoiceStateModifyRequest.serializer(), request)