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

fix(typings): update GuildMemberRoleManager typings to match implementation #5497

Merged
merged 1 commit into from
Apr 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1992,8 +1992,9 @@ declare module 'discord.js' {
public unban(user: UserResolvable, reason?: string): Promise<User>;
}

export class GuildMemberRoleManager extends OverridableManager<Snowflake, Role, RoleResolvable> {
export class GuildMemberRoleManager {
constructor(member: GuildMember);
public readonly cache: Collection<Snowflake, Role>;
public readonly hoist: Role | null;
public readonly color: Role | null;
public readonly highest: Role;
Expand Down Expand Up @@ -2028,12 +2029,6 @@ declare module 'discord.js' {
public delete(message: MessageResolvable): Promise<void>;
}

// Hacky workaround because changing the signature of an overridden method errors
class OverridableManager<V, K, R = any> extends BaseManager<V, K, R> {
public add(data: any, cache: any): any;
public set(key: any): any;
}

export class PresenceManager extends BaseManager<Snowflake, Presence, PresenceResolvable> {
constructor(client: Client, iterable?: Iterable<any>);
}
Expand Down