File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
packages/discord.js/typings Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -4227,7 +4227,9 @@ export class ApplicationCommandPermissionsManager<
42274227 } ,
42284228 ) : Promise < boolean > ;
42294229 public fetch ( options : FetchSingleOptions ) : Promise < ApplicationCommandPermissions [ ] > ;
4230- public fetch ( options : BaseOptions ) : Promise < Collection < Snowflake , ApplicationCommandPermissions [ ] > > ;
4230+ public fetch (
4231+ ...args : { } extends BaseOptions ? [ ] | [ BaseOptions ] : [ BaseOptions ]
4232+ ) : Promise < Collection < Snowflake , ApplicationCommandPermissions [ ] > > ;
42314233 public remove (
42324234 options :
42334235 | ( FetchSingleOptions & {
Original file line number Diff line number Diff line change @@ -201,6 +201,7 @@ import type {
201201 VoiceChannel ,
202202 Invite ,
203203 GuildInvite ,
204+ ApplicationCommandPermissions ,
204205} from './index.js' ;
205206import {
206207 ActionRowBuilder ,
@@ -1726,6 +1727,16 @@ declare const guildApplicationCommandManager: GuildApplicationCommandManager;
17261727expectType < Promise < ApplicationCommand > > ( guildApplicationCommandManager . fetch ( '0' ) ) ;
17271728expectType < Promise < ApplicationCommand > > ( guildApplicationCommandManager . fetch ( { id : '0' } ) ) ;
17281729expectType < Promise < Collection < Snowflake , ApplicationCommand > > > ( guildApplicationCommandManager . fetch ( ) ) ;
1730+ expectType < Promise < ApplicationCommandPermissions [ ] > > (
1731+ guildApplicationCommandManager . permissions . fetch ( { command : '0' } ) ,
1732+ ) ;
1733+ expectType < Promise < Collection < Snowflake , ApplicationCommandPermissions [ ] > > > (
1734+ guildApplicationCommandManager . permissions . fetch ( { } ) ,
1735+ ) ;
1736+ // https://github.com/discordjs/discord.js/issues/8096
1737+ expectType < Promise < Collection < Snowflake , ApplicationCommandPermissions [ ] > > > (
1738+ guildApplicationCommandManager . permissions . fetch ( ) ,
1739+ ) ;
17291740
17301741declare const categoryChannelChildManager : CategoryChannelChildManager ;
17311742{
You can’t perform that action at this time.
0 commit comments