export class CommandInteractionOptionResolver<Cached extends CacheType = CacheType>
A resolver for command interaction options.
readonlyClient client :
The client that instantiated this.
readonlyreadonly CommandInteractionOption<Cached>[] data :
The interaction options array.
readonlyReadonly<CommandInteractionResolvedData<Cached>> | null resolved :
The interaction resolved data
getname: stringrequired: true) : CommandInteractionOption<Cached> (
Gets an option by its name.
Returns: The option, if found.
getAttachmentname: stringrequired: true) : NonNullable<CommandInteractionOption<Cached>['attachment']> (
Gets an attachment option.
Returns: The value of the option, or null if not set and not required.
getChannelType? extends ChannelType = ChannelType
>() : Extract<NonNullable<CommandInteractionOption<Cached>['channel']>, { type: Type extends ChannelType.PublicThread | ChannelType.AnnouncementThread ? ChannelType.PublicThread | ChannelType.AnnouncementThread : Type; }> <
Type? extends ChannelType = ChannelType
Gets a channel option.
Returns: The value of the option, or null if not set and not required.
getFocusedgetFull: true) : AutocompleteFocusedOption (
Gets the focused option.
Returns: The value of the option, or the whole option if getFull is true
getMembername: string) : NonNullable<CommandInteractionOption<Cached>['member']> | null (
Gets a member option.
Returns: The value of the option, or null if the user is not present in the guild or the option is not set.
getMentionablename: stringrequired: true) : NonNullable<CommandInteractionOption<Cached>['member' | 'role' | 'user']> (
Gets a mentionable option.
Returns: The value of the option, or null if not set and not required.
getMessagename: stringrequired: true) : NonNullable<CommandInteractionOption<Cached>['message']> (
Gets a message option.
Returns: The value of the option, or null if not set and not required.
getRolename: stringrequired: true) : NonNullable<CommandInteractionOption<Cached>['role']> (
Gets a role option.
Returns: The value of the option, or null if not set and not required.
getSubcommandrequired?: true) : string (
Gets the selected subcommand.
Returns: The name of the selected subcommand, or null if not set and not required.
getSubcommandGrouprequired: true) : string (
Gets the selected subcommand group.
Returns: The name of the selected subcommand group, or null if not set and not required.
getUsername: stringrequired: true) : NonNullable<CommandInteractionOption<Cached>['user']> (
Gets a user option.
Returns: The value of the option, or null if not set and not required.