func CreateGuildRole(client httd.Poster, id Snowflake, params *CreateGuildRoleParams) (ret *Role, err error) {
	_, body, err := client.Post(&httd.Request{
		Ratelimiter: ratelimitGuildRoles(id),
		Endpoint:    endpoint.GuildRoles(id),
		JSONParams:  params,
		ContentType: httd.ContentTypeJSON,
	})
	if err != nil {
		return
	}

	err = unmarshal(body, &ret)
	if err != nil {
		return
	}

	// add guild id to roles
	ret.guildID = id
	return
}
// CreateGuildRole [POST]   Create a new role for the guild. Requires the 'MANAGE_ROLES' permission.
//                          Returns the new role object on success. Fires a Guild Role Create Gateway event.
// Endpoint                 /guilds/{guild.id}/roles
// Rate limiter             /guilds/{guild.id}/roles
// Discord documentation    https://discordapp.com/developers/docs/resources/guild#create-guild-role
// Reviewed                 2018-08-18
// Comment                  All JSON params are optional.
CreateGuildRole [POST]   Create a new role for the guild. Requires the 'MANAGE_ROLES' permission.
Returns the new role object on success. Fires a Guild Role Create Gateway event.
// CreateGuildRole [ POST ] Create a new role for the guild . Requires the ' MANAGE_ROLES ' permission . // Returns the new role object on success . Fires a Guild Role Create Gateway event . // Endpoint / guilds / { guild . id } / roles // Rate limiter / guilds / { guild . id } / roles // Discord documentation https : // discordapp . com / developers / docs / resources / guild#create - guild - role // Reviewed 2018 - 08 - 18 // Comment All JSON params are optional .
func CreateGuildRole(client httd.Poster, id Snowflake, params *CreateGuildRoleParams) (ret *Role, err error) {
	_, body, err := client.Post(&httd.Request{
		Ratelimiter: ratelimitGuildRoles(id),
		Endpoint:    endpoint.GuildRoles(id),
		JSONParams:  params,
		ContentType: httd.ContentTypeJSON,
	})
	if err != nil {
		return
	}
	err = unmarshal(body, &ret)
	if err != nil {
		return
	}
	ret.guildID = id
	return
}
func CreateGuildRole ( client httd . Poster , id Snowflake , params * CreateGuildRoleParams ) ( ret * Role , err error ) { _ , body , err := client . Post ( & httd . Request { Ratelimiter : ratelimitGuildRoles ( id ) , Endpoint : endpoint . GuildRoles ( id ) , JSONParams : params , ContentType : httd . ContentTypeJSON , } ) if err != nil { return } err = unmarshal ( body , & ret ) if err != nil { return } ret . guildID = id return }
CreateGuildRole [POST]   Create a new role for the guild.
CreateGuildRole [ POST ] Create a new role for the guild .
// add guild id to roles