diff --git a/src/Discord.Net.Core/Extensions/UserExtensions.cs b/src/Discord.Net.Core/Extensions/UserExtensions.cs index 95a18daf6..04eb78714 100644 --- a/src/Discord.Net.Core/Extensions/UserExtensions.cs +++ b/src/Discord.Net.Core/Extensions/UserExtensions.cs @@ -173,6 +173,16 @@ namespace Discord /// The user to move. /// the channel where the user gets moved to. /// A task that represents the asynchronous operation for moving a user. - public static Task MoveAsync(this IGuildUser user, IVoiceChannel targetChannel) => user.ModifyAsync(x => x.Channel = new Optional(targetChannel)); + public static Task MoveAsync(this IGuildUser user, IVoiceChannel targetChannel) + => user.ModifyAsync(x => x.Channel = new Optional(targetChannel)); + + + /// + /// Disconnects the user from its current voice channel + /// + /// The user to disconnect. + /// A task that represents the asynchronous operation for disconnecting a user. + public static Task DisconnectAsync(this IGuildUser user) + => user.ModifyAsync(x => x.Channel = new Optional()); } }