-
Notifications
You must be signed in to change notification settings - Fork 149
SinisterRectus edited this page Nov 16, 2019
·
6 revisions
extends Container
Represents a Discord guild ban. Essentially a combination of the banned user and a reason explaining the ban, if one was provided.
Instances of this class should not be constructed by users.
Properties Inherited From Container
| Name | Type | Description |
|---|---|---|
| client | Client | A shortcut to the client object to which this container is visible. |
| parent | Container/Client | The parent object of to which this container is a child. For example, the parent of a role is the guild in which the role exists. |
| Name | Type | Description |
|---|---|---|
| guild | Guild | The guild in which this ban object exists. |
| reason | string/nil | The reason for the ban, if one was set. This should be from 1 to 512 characters in length. |
| user | User | The user that this ban object represents. |
Methods Inherited From Container
Defines the behavior of the == operator. Allows containers to be directly compared according to their type and __hash return values.
Returns: boolean
Defines the behavior of the tostring function. All containers follow the format ClassName: hash.
Returns: string
Returns Ban.user.id
Returns: string
Deletes the ban object, unbanning the corresponding user. Equivalent to Ban.guild:unbanUser(Ban.user).
This method always makes an HTTP request.
Returns: boolean