mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
refactor(TeamMember): make id a getter
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user