func GetGuildRoles(client httd.Getter, guildID Snowflake) (ret []*Role, err error) {
	details := &httd.Request{
		Ratelimiter: ratelimitGuildRoles(guildID),
		Endpoint:    "/guilds/" + guildID.String() + "/roles",
	}
	_, body, err := client.Get(details)
	if err != nil {
		return
	}

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

	// add guild id to roles
	for _, role := range ret {
		role.guildID = guildID
	}
	return
}
// GetGuildRoles [GET]      Returns a list of role objects for the guild.
// Endpoint                 /guilds/{guild.id}/roles
// Rate limiter             /guilds/{guild.id}/roles
// Discord documentation    https://discordapp.com/developers/docs/resources/guild#get-guild-roles
// Reviewed                 2018-08-18
// Comment                  -
GetGuildRoles [GET]      Returns a list of role objects for the guild.
// GetGuildRoles [ GET ] Returns a list of role objects for the guild . // Endpoint / guilds / { guild . id } / roles // Rate limiter / guilds / { guild . id } / roles // Discord documentation https : // discordapp . com / developers / docs / resources / guild#get - guild - roles // Reviewed 2018 - 08 - 18 // Comment -
func GetGuildRoles(client httd.Getter, guildID Snowflake) (ret []*Role, err error) {
	details := &httd.Request{
		Ratelimiter: ratelimitGuildRoles(guildID),
		Endpoint:    "/guilds/" + guildID.String() + "/roles",
	}
	_, body, err := client.Get(details)
	if err != nil {
		return
	}
	err = unmarshal(body, &ret)
	if err != nil {
		return
	}
	for _, role := range ret {
		role.guildID = guildID
	}
	return
}
func GetGuildRoles ( client httd . Getter , guildID Snowflake ) ( ret [ ] * Role , err error ) { details := & httd . Request { Ratelimiter : ratelimitGuildRoles ( guildID ) , Endpoint : " " + guildID . String ( ) + " " , } _ , body , err := client . Get ( details ) if err != nil { return } err = unmarshal ( body , & ret ) if err != nil { return } for _ , role := range ret { role . guildID = guildID } return }
GetGuildRoles [GET]      Returns a list of role objects for the guild.
GetGuildRoles [ GET ] Returns a list of role objects for the guild .
// add guild id to roles