From eb11ffb51cedfcb345f328914914e0f4bcdcd6af Mon Sep 17 00:00:00 2001 From: Sebastian Winkler Date: Thu, 22 Feb 2018 14:44:09 +0100 Subject: [PATCH] makes GuildChannelCreate use ChannelType (#510) --- restapi.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/restapi.go b/restapi.go index dcbf1b8..72e02e4 100644 --- a/restapi.go +++ b/restapi.go @@ -880,12 +880,12 @@ func (s *Session) GuildChannels(guildID string) (st []*Channel, err error) { // GuildChannelCreate creates a new channel in the given guild // guildID : The ID of a Guild. // name : Name of the channel (2-100 chars length) -// ctype : Tpye of the channel (voice or text) -func (s *Session) GuildChannelCreate(guildID, name, ctype string) (st *Channel, err error) { +// ctype : Type of the channel +func (s *Session) GuildChannelCreate(guildID, name string, ctype ChannelType) (st *Channel, err error) { data := struct { - Name string `json:"name"` - Type string `json:"type"` + Name string `json:"name"` + Type ChannelType `json:"type"` }{name, ctype} body, err := s.RequestWithBucketID("POST", EndpointGuildChannels(guildID), data, EndpointGuildChannels(guildID))