Instance Method

ban(_:from:for:with:then:)

Bans a member from a guild

Declaration

func ban(_ userId: Snowflake, from guildId: Snowflake, for reason: String? = nil, with options: [String : Any] = [:], then completion: ((RequestError?) -> Void)? = nil)

Parameters

userId

Member to ban

guildId

Guild to ban member in

reason

Reason why member was banned from guild (attached to audit log)

options

Deletes messages from this user by amount of days

Option Params

  • delete-message-days: Number of days to delete messages for (0-7)