mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
types(ApplicationCommandManager): add missing overload for fetch (#6904)
This commit is contained in:
5
typings/index.d.ts
vendored
5
typings/index.d.ts
vendored
@@ -279,7 +279,6 @@ export type GuildCacheMessage<Cached extends CacheType> = CacheTypeReducer<
|
||||
export abstract class BaseCommandInteraction<Cached extends CacheType = CacheType> extends Interaction<Cached> {
|
||||
public options: CommandInteractionOptionResolver<Cached>;
|
||||
public readonly command: ApplicationCommand | ApplicationCommand<{ guild: GuildResolvable }> | null;
|
||||
public readonly channel: TextBasedChannels | null;
|
||||
public channelId: Snowflake;
|
||||
public commandId: Snowflake;
|
||||
public commandName: string;
|
||||
@@ -1077,7 +1076,7 @@ export class Interaction<Cached extends CacheType = CacheType> extends Base {
|
||||
private readonly _cacheType: Cached;
|
||||
protected constructor(client: Client, data: RawInteractionData);
|
||||
public applicationId: Snowflake;
|
||||
public channel: CacheTypeReducer<Cached, TextBasedChannels | null>;
|
||||
public readonly channel: CacheTypeReducer<Cached, TextBasedChannels | null>;
|
||||
public channelId: Snowflake | null;
|
||||
public readonly createdAt: Date;
|
||||
public readonly createdTimestamp: number;
|
||||
@@ -2547,6 +2546,7 @@ export class ApplicationCommandManager<
|
||||
id: Snowflake,
|
||||
options: FetchApplicationCommandOptions & { guildId: Snowflake },
|
||||
): Promise<ApplicationCommand>;
|
||||
public fetch(options: FetchApplicationCommandOptions): Promise<Collection<string, ApplicationCommandScope>>;
|
||||
public fetch(id: Snowflake, options?: FetchApplicationCommandOptions): Promise<ApplicationCommandScope>;
|
||||
public fetch(
|
||||
id?: Snowflake,
|
||||
@@ -2629,6 +2629,7 @@ export class GuildApplicationCommandManager extends ApplicationCommandManager<Ap
|
||||
data: ApplicationCommandDataResolvable,
|
||||
): Promise<ApplicationCommand>;
|
||||
public fetch(id: Snowflake, options?: BaseFetchOptions): Promise<ApplicationCommand>;
|
||||
public fetch(options: BaseFetchOptions): Promise<Collection<Snowflake, ApplicationCommand>>;
|
||||
public fetch(id?: undefined, options?: BaseFetchOptions): Promise<Collection<Snowflake, ApplicationCommand>>;
|
||||
public set(commands: ApplicationCommandDataResolvable[]): Promise<Collection<Snowflake, ApplicationCommand>>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user