forked from pothtonswer/discordmuffin
Update GuildMemberMove to support removing from all voice channels (#789)
This commit is contained in:
parent
cab170c8f5
commit
9c46cf4ec7
1 changed files with 3 additions and 3 deletions
|
@ -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
|
// GuildMemberMove moves a guild member from one voice channel to another/none
|
||||||
// guildID : The ID of a Guild.
|
// guildID : The ID of a Guild.
|
||||||
// userID : The ID of a User.
|
// 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
|
// 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
|
// 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 {
|
data := struct {
|
||||||
ChannelID string `json:"channel_id"`
|
ChannelID *string `json:"channel_id"`
|
||||||
}{channelID}
|
}{channelID}
|
||||||
|
|
||||||
_, err = s.RequestWithBucketID("PATCH", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, ""))
|
_, err = s.RequestWithBucketID("PATCH", EndpointGuildMember(guildID, userID), data, EndpointGuildMember(guildID, ""))
|
||||||
|
|
Loading…
Reference in a new issue