mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 14:02:02 +00:00
feat(Invite): add targetUser(Type) (#3262)
* add Invite#targetUser(Type) * incase discord decides to add 0
This commit is contained in:
parent
8ae7a30d0b
commit
d62db232e7
2 changed files with 22 additions and 0 deletions
|
|
@ -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}
|
||||
|
|
|
|||
4
typings/index.d.ts
vendored
4
typings/index.d.ts
vendored
|
|
@ -928,6 +928,8 @@ declare module 'discord.js' {
|
|||
public maxUses: number | null;
|
||||
public memberCount: number;
|
||||
public presenceCount: number;
|
||||
public targetUser: User | null;
|
||||
public targetUserType: TargetUser | null;
|
||||
public temporary: boolean | null;
|
||||
public readonly url: string;
|
||||
public uses: number | null;
|
||||
|
|
@ -2524,6 +2526,8 @@ declare module 'discord.js' {
|
|||
|
||||
type StringResolvable = string | string[] | any;
|
||||
|
||||
type TargetUser = number;
|
||||
|
||||
type UserResolvable = User | Snowflake | Message | GuildMember;
|
||||
|
||||
type VoiceStatus = number;
|
||||
|
|
|
|||
Loading…
Reference in a new issue