From 5573db742f934de3f4e44104ebf3d83d36e78427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Rom=C3=A1n?= Date: Mon, 25 Jan 2021 11:51:38 +0100 Subject: [PATCH 1/2] fix(GuildChannel): overload permissionsFor and BaseManager#resolve[id] --- typings/index.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/typings/index.d.ts b/typings/index.d.ts index f86e4611d6a9..fd631b541e16 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -765,6 +765,7 @@ declare module 'discord.js' { overwrites: readonly OverwriteResolvable[] | Collection, reason?: string, ): Promise; + public permissionsFor(memberOrRole: Exclude): Readonly; public permissionsFor(memberOrRole: GuildMemberResolvable | RoleResolvable): Readonly | null; public setName(name: string, reason?: string): Promise; public setParent( @@ -1873,7 +1874,9 @@ declare module 'discord.js' { public cacheType: Collection; public readonly client: Client; public add(data: any, cache?: boolean, { id, extras }?: { id: K; extras: any[] }): Holds; + public resolve(resolvable: Holds): Holds; public resolve(resolvable: R): Holds | null; + public resolveID(resolvable: Holds): K; public resolveID(resolvable: R): K | null; public valueOf(): Collection; } From 350e31a6d318a755fd60e2c9808b54fa90bb6387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Rom=C3=A1n?= Date: Mon, 25 Jan 2021 12:03:20 +0100 Subject: [PATCH 2/2] fix(GuildChannel): GuildMessage and Role trigger non-null return --- typings/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index fd631b541e16..dd3b52cf6dfa 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -765,7 +765,7 @@ declare module 'discord.js' { overwrites: readonly OverwriteResolvable[] | Collection, reason?: string, ): Promise; - public permissionsFor(memberOrRole: Exclude): Readonly; + public permissionsFor(memberOrRole: GuildMember | Role): Readonly; public permissionsFor(memberOrRole: GuildMemberResolvable | RoleResolvable): Readonly | null; public setName(name: string, reason?: string): Promise; public setParent(