Extends
Members
channel :Channel
The channel the invite is for
Type:
- Source:
(readonly) client :Client
The client that instantiated this
Type:
- Overrides:
- Source:
code :string
The code for this invite
Type:
- string
- Source:
(readonly, nullable) createdAt :Date
The time the invite was created at
Type:
- Date
- Source:
(nullable) createdTimestamp :number
The timestamp the invite was created at
Type:
- number
- Source:
(readonly) deletable :boolean
Whether the invite is deletable by the client user
Type:
- boolean
- Source:
(readonly, nullable) expiresAt :Date
The time the invite will expire at
Type:
- Date
- Source:
(readonly, nullable) expiresTimestamp :number
The timestamp the invite will expire at
Type:
- number
- Source:
(nullable) guild :Guild
The guild the invite is for
Type:
- Source:
(nullable) inviter :User
The user who created this invite
Type:
- Source:
(nullable) maxAge :number
The maximum age of the invite, in seconds, 0 if never expires
Type:
- number
- Source:
(nullable) maxUses :number
The maximum uses of this invite
Type:
- number
- Source:
(nullable) memberCount :number
The approximate total number of members of the guild this invite is for
Type:
- number
- Source:
(nullable) presenceCount :number
The approximate number of online members of the guild this invite is for
Type:
- number
- Source:
(nullable) targetUser :User
The target user for this invite
Type:
- Source:
(nullable) targetUserType :TargetUser
The target user type
Type:
- Source:
(nullable) temporary :boolean
Whether or not this invite is temporary
Type:
- boolean
- Source:
(readonly) url :string
The URL to the invite
Type:
- string
- Source:
(nullable) uses :number
How many times this invite has been used
Type:
- number
- Source:
Methods
delete(reasonopt) → {Promise.<Invite>}
Deletes this invite.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
reason |
string |
<optional> |
Reason for deleting this invite |
- Source:
Returns:
- Type
- Promise.<Invite>
toString() → {string}
When concatenated with a string, this automatically concatenates the invite's URL instead of the object.
- Source:
Returns:
- Type
- string
Example
// Logs: Invite: https://discord.gg/A1b2C3
console.log(`Invite: ${invite}`);