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 = false) : CommandInteractionOption<Cached> (
Gets an option by its name.
Returns: The option, if found.
getAttachmentname: stringrequired: true = false) : 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.
getFocusedAutocompleteFocusedOption () :
Gets the focused option.
Returns: The whole object of the option that is focused
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 = false) : 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 = false) : 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 = false) : NonNullable<CommandInteractionOption<Cached>['role']> (
Gets a role option.
Returns: The value of the option, or null if not set and not required.
getSubcommandrequired?: true = true) : string (
Gets the selected subcommand.
Returns: The name of the selected subcommand, or null if not set and not required.
getSubcommandGrouprequired: true = false) : 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 = false) : NonNullable<CommandInteractionOption<Cached>['user']> (
Gets a user option.
Returns: The value of the option, or null if not set and not required.