mirror of
https://github.com/danbulant/discord.js
synced 2026-06-06 16:22:08 +00:00
refactor(TeamMember): make id a getter
This commit is contained in:
parent
a22aabf6a8
commit
d7b2146c81
2 changed files with 9 additions and 6 deletions
|
|
@ -38,12 +38,15 @@ class TeamMember extends Base {
|
||||||
* @type {User}
|
* @type {User}
|
||||||
*/
|
*/
|
||||||
this.user = this.client.users.add(data.user);
|
this.user = this.client.users.add(data.user);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ID of the Team Member
|
* The ID of the Team Member
|
||||||
* @type {Snowflake}
|
* @type {Snowflake}
|
||||||
*/
|
* @readonly
|
||||||
this.id = this.user.id;
|
*/
|
||||||
|
get id() {
|
||||||
|
return this.user.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
|
|
@ -284,7 +284,7 @@ declare module 'discord.js' {
|
||||||
export class TeamMember extends Base {
|
export class TeamMember extends Base {
|
||||||
constructor(client: Client, team: Team, data: object);
|
constructor(client: Client, team: Team, data: object);
|
||||||
public team: Team;
|
public team: Team;
|
||||||
public id: Snowflake;
|
public readonly id: Snowflake;
|
||||||
public permissions: string[];
|
public permissions: string[];
|
||||||
public membershipState: MembershipStates;
|
public membershipState: MembershipStates;
|
||||||
public user: User;
|
public user: User;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue