func GetGuild(client httd.Getter, id Snowflake) (ret *Guild, err error) {
	_, body, err := client.Get(&httd.Request{
		Ratelimiter: ratelimitGuild(id),
		Endpoint:    endpoint.Guild(id),
	})
	if err != nil {
		return
	}

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

	// add guild id to roles
	for _, role := range ret.Roles {
		role.guildID = id
	}

	return
}
// GetGuild [GET]           Returns the guild object for the given id.
// Endpoint                 /guilds/{guild.id}
// Rate limiter             /guilds/{guild.id}
// Discord documentation    https://discordapp.com/developers/docs/resources/guild#get-guild
// Reviewed                 2018-08-17
// Comment                  -
GetGuild [GET]           Returns the guild object for the given id.
// GetGuild [ GET ] Returns the guild object for the given id . // Endpoint / guilds / { guild . id } // Rate limiter / guilds / { guild . id } // Discord documentation https : // discordapp . com / developers / docs / resources / guild#get - guild // Reviewed 2018 - 08 - 17 // Comment -
func GetGuild(client httd.Getter, id Snowflake) (ret *Guild, err error) {
	_, body, err := client.Get(&httd.Request{
		Ratelimiter: ratelimitGuild(id),
		Endpoint:    endpoint.Guild(id),
	})
	if err != nil {
		return
	}
	err = unmarshal(body, &ret)
	if err != nil {
		return
	}
	for _, role := range ret.Roles {
		role.guildID = id
	}
	return
}
func GetGuild ( client httd . Getter , id Snowflake ) ( ret * Guild , err error ) { _ , body , err := client . Get ( & httd . Request { Ratelimiter : ratelimitGuild ( id ) , Endpoint : endpoint . Guild ( id ) , } ) if err != nil { return } err = unmarshal ( body , & ret ) if err != nil { return } for _ , role := range ret . Roles { role . guildID = id } return }
GetGuild [GET]           Returns the guild object for the given id.
GetGuild [ GET ] Returns the guild object for the given id .
// add guild id to roles