mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
feat(Invite): add targetUser(Type) (#3262)
* add Invite#targetUser(Type) * incase discord decides to add 0
This commit is contained in:
@@ -70,6 +70,24 @@ class Invite extends Base {
|
||||
*/
|
||||
this.inviter = data.inviter ? this.client.users.add(data.inviter) : null;
|
||||
|
||||
/**
|
||||
* The target user for this invite
|
||||
* @type {?User}
|
||||
*/
|
||||
this.targetUser = data.target_user ? this.client.users.add(data.target_user) : null;
|
||||
|
||||
/**
|
||||
* The type of the target user:
|
||||
* * 1: STREAM
|
||||
* @typedef {number} TargetUser
|
||||
*/
|
||||
|
||||
/**
|
||||
* The target user type
|
||||
* @type {?TargetUser}
|
||||
*/
|
||||
this.targetUserType = typeof data.target_user_type === 'number' ? data.target_user_type : null;
|
||||
|
||||
/**
|
||||
* The channel the invite is for
|
||||
* @type {Channel}
|
||||
|
||||
Reference in New Issue
Block a user