From 9c46cf4ec79c6379b06d9308b279957faa99de72 Mon Sep 17 00:00:00 2001 From: Dylan Meador Date: Sun, 28 Jun 2020 18:34:50 -0400 Subject: [PATCH] Update GuildMemberMove to support removing from all voice channels (#789) --- restapi.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/restapi.go b/restapi.go index 36af969..db57364 100644 --- a/restapi.go +++ b/restapi.go @@ -844,13 +844,13 @@ func (s *Session) GuildMemberEdit(guildID, userID string, roles []string) (err e // GuildMemberMove moves a guild member from one voice channel to another/none // guildID : The ID of a Guild. // userID : The ID of a User. -// channelID : The ID of a channel to move user to, or null? +// channelID : The ID of a channel to move user to or nil to remove from voice channel // NOTE : I am not entirely set on the name of this function and it may change // prior to the final 1.0.0 release of Discordgo -func (s *Session) GuildMemberMove(guildID, userID, channelID string) (err error) { +func (s *Session) GuildMemberMove(guildID string, userID string, channelID *string) (err error) { data := struct { - ChannelID string `json:"channel_id"` + ChannelID *string `json:"channel_id"` }{channelID} _, err = s.RequestWithBucketID("PATCH", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, ""))