func AddGuildMember(client httd.Puter, guildID, userID Snowflake, params *AddGuildMemberParams) (ret *Member, err error) {
	resp, body, err := client.Put(&httd.Request{
		Ratelimiter: ratelimitGuildMembers(guildID),
		Endpoint:    endpoint.GuildMember(guildID, userID),
		JSONParams:  params,
		ContentType: httd.ContentTypeJSON,
	})
	if err != nil {
		return
	}

	if resp.StatusCode == http.StatusCreated {
		err = unmarshal(body, &ret)
		return
	}

	if resp.StatusCode == http.StatusNoContent {
		msg := "User{id:" + userID.String() + "} already exists in guild{id:" + guildID.String() + "}"
		err = errors.New(msg)
	}

	return
}
// AddGuildMember [PUT]     Adds a user to the guild, provided you have a valid oauth2 access token for the user
//                          with the guilds.join scope. Returns a 201 Created with the guild member as the body,
//                          or 204 No Content if the user is already a member of the guild. Fires a Guild Member Add
//                          Gateway event. Requires the bot to have the CREATE_INSTANT_INVITE permission.
// Endpoint                 /guilds/{guild.id}/members/{user.id}
// Rate limiter             /guilds/{guild.id}/members
// Discord documentation    https://discordapp.com/developers/docs/resources/guild#add-guild-member
// Reviewed                 2018-08-18
// Comment                  All parameters to this endpoint. except for access_token are optional.
AddGuildMember [PUT]     Adds a user to the guild, provided you have a valid oauth2 access token for the user
with the guilds.join scope. Returns a 201 Created with the guild member as the body,
or 204 No Content if the user is already a member of the guild. Fires a Guild Member Add
Gateway event. Requires the bot to have the CREATE_INSTANT_INVITE permission.
// AddGuildMember [ PUT ] Adds a user to the guild provided you have a valid oauth2 access token for the user // with the guilds . join scope . Returns a 201 Created with the guild member as the body // or 204 No Content if the user is already a member of the guild . Fires a Guild Member Add // Gateway event . Requires the bot to have the CREATE_INSTANT_INVITE permission . // Endpoint / guilds / { guild . id } / members / { user . id } // Rate limiter / guilds / { guild . id } / members // Discord documentation https : // discordapp . com / developers / docs / resources / guild#add - guild - member // Reviewed 2018 - 08 - 18 // Comment All parameters to this endpoint . except for access_token are optional .
func AddGuildMember(client httd.Puter, guildID, userID Snowflake, params *AddGuildMemberParams) (ret *Member, err error) {
	resp, body, err := client.Put(&httd.Request{
		Ratelimiter: ratelimitGuildMembers(guildID),
		Endpoint:    endpoint.GuildMember(guildID, userID),
		JSONParams:  params,
		ContentType: httd.ContentTypeJSON,
	})
	if err != nil {
		return
	}
	if resp.StatusCode == http.StatusCreated {
		err = unmarshal(body, &ret)
		return
	}
	if resp.StatusCode == http.StatusNoContent {
		msg := "User{id:" + userID.String() + "} already exists in guild{id:" + guildID.String() + "}"
		err = errors.New(msg)
	}
	return
}
func AddGuildMember ( client httd . Puter , guildID , userID Snowflake , params * AddGuildMemberParams ) ( ret * Member , err error ) { resp , body , err := client . Put ( & httd . Request { Ratelimiter : ratelimitGuildMembers ( guildID ) , Endpoint : endpoint . GuildMember ( guildID , userID ) , JSONParams : params , ContentType : httd . ContentTypeJSON , } ) if err != nil { return } if resp . StatusCode == http . StatusCreated { err = unmarshal ( body , & ret ) return } if resp . StatusCode == http . StatusNoContent { msg := " " + userID . String ( ) + " " + guildID . String ( ) + " " err = errors . New ( msg ) } return }
AddGuildMember [PUT]     Adds a user to the guild, provided you have a valid oauth2 access token for the user
with the guilds.join scope.
AddGuildMember [ PUT ] Adds a user to the guild provided you have a valid oauth2 access token for the user with the guilds . join scope .