Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove client from TeamMember constructor #3409

Merged
merged 3 commits into from Aug 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/structures/Team.js
Expand Up @@ -47,7 +47,7 @@ class Team extends Base {
this.members = new Collection();

for (const memberData of data.members) {
const member = new TeamMember(this.client, this, memberData);
const member = new TeamMember(this, memberData);
this.members.set(member.id, member);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/structures/TeamMember.js
Expand Up @@ -8,8 +8,8 @@ const { MembershipStates } = require('../util/Constants');
* @extends {Base}
*/
class TeamMember extends Base {
constructor(client, team, data) {
super(client);
constructor(team, data) {
super(team.client);

/**
* The Team this member is part of
Expand Down
2 changes: 1 addition & 1 deletion typings/index.d.ts
Expand Up @@ -283,7 +283,7 @@ declare module 'discord.js' {
}

export class TeamMember extends Base {
constructor(client: Client, team: Team, data: object);
constructor(team: Team, data: object);
public team: Team;
public readonly id: Snowflake;
public permissions: string[];
Expand Down