func ModifyGuild(client httd.Patcher, id Snowflake, params *ModifyGuildParams) (ret *Guild, err error) {
	_, body, err := client.Patch(&httd.Request{
		Ratelimiter: ratelimitGuild(id),
		Endpoint:    endpoint.Guild(id),
		JSONParams:  params,
		ContentType: httd.ContentTypeJSON,
	})
	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
}
// ModifyGuild [PATCH]      Modify a guild's settings. Requires the 'MANAGE_GUILD' permission. Returns the updated
//                          guild object on success. Fires a Guild Update Gateway event.
// Endpoint                 /guilds/{guild.id}
// Rate limiter             /guilds/{guild.id}
// Discord documentation    https://discordapp.com/developers/docs/resources/guild#modify-guild
// Reviewed                 2018-08-17
// Comment                  All parameters to this endpoint. are optional
ModifyGuild [PATCH]      Modify a guild's settings. Requires the 'MANAGE_GUILD' permission. Returns the updated
guild object on success. Fires a Guild Update Gateway event.
// ModifyGuild [ PATCH ] Modify a guild ' s settings . Requires the ' MANAGE_GUILD ' permission . Returns the updated // guild object on success . Fires a Guild Update Gateway event . // Endpoint / guilds / { guild . id } // Rate limiter / guilds / { guild . id } // Discord documentation https : // discordapp . com / developers / docs / resources / guild#modify - guild // Reviewed 2018 - 08 - 17 // Comment All parameters to this endpoint . are optional
func ModifyGuild(client httd.Patcher, id Snowflake, params *ModifyGuildParams) (ret *Guild, err error) {
	_, body, err := client.Patch(&httd.Request{
		Ratelimiter: ratelimitGuild(id),
		Endpoint:    endpoint.Guild(id),
		JSONParams:  params,
		ContentType: httd.ContentTypeJSON,
	})
	if err != nil {
		return
	}
	err = unmarshal(body, &ret)
	if err != nil {
		return
	}
	for _, role := range ret.Roles {
		role.guildID = id
	}
	return
}
func ModifyGuild ( client httd . Patcher , id Snowflake , params * ModifyGuildParams ) ( ret * Guild , err error ) { _ , body , err := client . Patch ( & httd . Request { Ratelimiter : ratelimitGuild ( id ) , Endpoint : endpoint . Guild ( id ) , JSONParams : params , ContentType : httd . ContentTypeJSON , } ) if err != nil { return } err = unmarshal ( body , & ret ) if err != nil { return } for _ , role := range ret . Roles { role . guildID = id } return }
ModifyGuild [PATCH]      Modify a guild's settings.
ModifyGuild [ PATCH ] Modify a guild ' s settings .
// add guild id to roles