feat(Invite): add targetUser(Type) (#3262)

* add Invite#targetUser(Type)

* incase discord decides to add 0
This commit is contained in:
izexi
2019-08-17 19:31:04 +01:00
committed by SpaceEEC
parent 8ae7a30d0b
commit d62db232e7
2 changed files with 22 additions and 0 deletions

View File

@@ -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}