func EditChannelPermissions(client httd.Puter, chanID, overwriteID Snowflake, params *EditChannelPermissionsParams) (err error) {
	if chanID.Empty() {
		return errors.New("channelID must be set to target the correct channel")
	}
	if overwriteID.Empty() {
		return errors.New("overwriteID must be set to target the specific channel permissions")
	}

	resp, _, err := client.Put(&httd.Request{
		Ratelimiter: ratelimitChannelPermissions(chanID),
		Endpoint:    endpoint.ChannelPermission(chanID, overwriteID),
		ContentType: httd.ContentTypeJSON,
	})
	if err != nil {
		return
	}

	if resp.StatusCode != http.StatusNoContent {
		msg := "unexpected http response code. Got " + resp.Status + ", wants " + http.StatusText(http.StatusNoContent)
		err = errors.New(msg)
	}
	return
}
// EditChannelPermissions [PUT] Edit the channel permission overwrites for a user or role in a channel.
//                              Only usable for guild channels. Requires the 'MANAGE_ROLES' permission.
//                              Returns a 204 empty response on success. For more information about
//                              permissions, see permissions.
// Endpoint                     /channels/{channel.id}/permissions/{overwrite.id}
// Rate limiter [MAJOR]         /channels/{channel.id}/permissions
// Discord documentation        https://discordapp.com/developers/docs/resources/channel#edit-channel-permissions
// Reviewed                     2018-06-07
// Comment                      -
EditChannelPermissions [PUT] Edit the channel permission overwrites for a user or role in a channel.
Only usable for guild channels. Requires the 'MANAGE_ROLES' permission.
Returns a 204 empty response on success. For more information about
permissions, see permissions.
// EditChannelPermissions [ PUT ] Edit the channel permission overwrites for a user or role in a channel . // Only usable for guild channels . Requires the ' MANAGE_ROLES ' permission . // Returns a 204 empty response on success . For more information about // permissions see permissions . // Endpoint / channels / { channel . id } / permissions / { overwrite . id } // Rate limiter [ MAJOR ] / channels / { channel . id } / permissions // Discord documentation https : // discordapp . com / developers / docs / resources / channel#edit - channel - permissions // Reviewed 2018 - 06 - 07 // Comment -
func EditChannelPermissions(client httd.Puter, chanID, overwriteID Snowflake, params *EditChannelPermissionsParams) (err error) {
	if chanID.Empty() {
		return errors.New("channelID must be set to target the correct channel")
	}
	if overwriteID.Empty() {
		return errors.New("overwriteID must be set to target the specific channel permissions")
	}
	resp, _, err := client.Put(&httd.Request{
		Ratelimiter: ratelimitChannelPermissions(chanID),
		Endpoint:    endpoint.ChannelPermission(chanID, overwriteID),
		ContentType: httd.ContentTypeJSON,
	})
	if err != nil {
		return
	}
	if resp.StatusCode != http.StatusNoContent {
		msg := "unexpected http response code. Got " + resp.Status + ", wants " + http.StatusText(http.StatusNoContent)
		err = errors.New(msg)
	}
	return
}
func EditChannelPermissions ( client httd . Puter , chanID , overwriteID Snowflake , params * EditChannelPermissionsParams ) ( err error ) { if chanID . Empty ( ) { return errors . New ( " " ) } if overwriteID . Empty ( ) { return errors . New ( " " ) } resp , _ , err := client . Put ( & httd . Request { Ratelimiter : ratelimitChannelPermissions ( chanID ) , Endpoint : endpoint . ChannelPermission ( chanID , overwriteID ) , ContentType : httd . ContentTypeJSON , } ) if err != nil { return } if resp . StatusCode != http . StatusNoContent { msg := " " + resp . Status + " " + http . StatusText ( http . StatusNoContent ) err = errors . New ( msg ) } return }
EditChannelPermissions [PUT] Edit the channel permission overwrites for a user or role in a channel.
EditChannelPermissions [ PUT ] Edit the channel permission overwrites for a user or role in a channel .