mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +01:00
feat(CommandInteractionResolvedData): access to "raw" resolved data (#6384)
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
This commit is contained in:
10
typings/index.d.ts
vendored
10
typings/index.d.ts
vendored
@@ -270,6 +270,7 @@ export abstract class BaseCommandInteraction extends Interaction {
|
||||
option: APIApplicationCommandOption,
|
||||
resolved: APIApplicationCommandInteractionData['resolved'],
|
||||
): CommandInteractionOption;
|
||||
private transformResolved(resolved: APIApplicationCommandInteractionData['resolved']): CommandInteractionResolvedData;
|
||||
}
|
||||
|
||||
export abstract class BaseGuild extends Base {
|
||||
@@ -534,6 +535,7 @@ export class CommandInteractionOptionResolver {
|
||||
public constructor(client: Client, options: CommandInteractionOption[]);
|
||||
public readonly client: Client;
|
||||
public readonly data: readonly CommandInteractionOption[];
|
||||
public readonly resolved: Readonly<CommandInteractionResolvedData>;
|
||||
private _group: string | null;
|
||||
private _hoistedOptions: CommandInteractionOption[];
|
||||
private _subcommand: string | null;
|
||||
@@ -3281,6 +3283,14 @@ export interface CommandInteractionOption {
|
||||
message?: Message | APIMessage;
|
||||
}
|
||||
|
||||
export interface CommandInteractionResolvedData {
|
||||
users?: Collection<string, User>;
|
||||
members?: Collection<string, GuildMember | APIInteractionDataResolvedGuildMember>;
|
||||
roles?: Collection<string, Role | APIRole>;
|
||||
channels?: Collection<string, Channel | APIInteractionDataResolvedChannel>;
|
||||
messages?: Collection<string, Message | APIMessage>;
|
||||
}
|
||||
|
||||
export interface ConstantsClientApplicationAssetTypes {
|
||||
SMALL: 1;
|
||||
BIG: 2;
|
||||
|
||||
Reference in New Issue
Block a user