mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 14:02:02 +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}
|
||||
*/
|
||||
this.user = this.client.users.add(data.user);
|
||||
}
|
||||
|
||||
/**
|
||||
* The ID of the Team Member
|
||||
* @type {Snowflake}
|
||||
*/
|
||||
this.id = this.user.id;
|
||||
/**
|
||||
* The ID of the Team Member
|
||||
* @type {Snowflake}
|
||||
* @readonly
|
||||
*/
|
||||
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 {
|
||||
constructor(client: Client, team: Team, data: object);
|
||||
public team: Team;
|
||||
public id: Snowflake;
|
||||
public readonly id: Snowflake;
|
||||
public permissions: string[];
|
||||
public membershipState: MembershipStates;
|
||||
public user: User;
|
||||
|
|
|
|||
Loading…
Reference in a new issue