Skip to content

Commit

Permalink
types(CommandInteraction): update typings and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
iShibi committed May 30, 2021
1 parent 50d8af1 commit d8e0f2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/structures/CommandInteraction.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ class CommandInteraction extends Interaction {
* @property {string} name The name of the option
* @property {ApplicationCommandOptionType} type The type of the option
* @property {string|number|boolean} [value] The value of the option
* @property {CommandInteractionOption[]} [options] Additional options if this option is a subcommand (group)
* @property {Collection<string, CommandInteractionOption>} [options] Additional options if this option is a
* subcommand (group)
* @property {User} [user] The resolved user
* @property {GuildMember|Object} [member] The resolved member
* @property {GuildChannel|Object} [channel] The resolved channel
Expand Down
3 changes: 2 additions & 1 deletion typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ declare module 'discord.js' {
public commandID: string;
public commandName: string;
public deferred: boolean;
public options: CommandInteractionOption[];
public options: Collection<string, CommandInteractionOption>;
public replied: boolean;
public webhook: WebhookClient;
public defer(options?: InteractionDeferOptions): Promise<void>;
Expand All @@ -456,6 +456,7 @@ declare module 'discord.js' {
public reply(content: string | APIMessage | InteractionReplyOptions | MessageAdditions): Promise<void>;
public reply(content: string, options?: InteractionReplyOptions): Promise<void>;
private transformOption(option: object, resolved: object): CommandInteractionOption;
private _createOptionsCollection(options: object[], resolved: object): Collection<string, CommandInteractionOption>;
}

type AllowedImageFormat = 'webp' | 'png' | 'jpg' | 'jpeg' | 'gif';
Expand Down

0 comments on commit d8e0f2b

Please sign in to comment.