Skip to content

PopiiOption

Popii


Popii / PopiiOption

Interface: PopiiOption<TState, TInput, TLocals>

Section titled “Interface: PopiiOption<TState, TInput, TLocals>”

Defined in: types.ts:42

TState = any

TInput = any

TLocals = Record<string, any>

optional do(pop): void | Promise<void>

Defined in: types.ts:54

Pop<TState, TInput, TLocals>

void | Promise<void>

name: string

Defined in: types.ts:43


optional nameLocalizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "es-419" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>

Defined in: types.ts:44


description: string

Defined in: types.ts:45


optional descriptionLocalizations?: Partial<Record<"id" | "en-US" | "en-GB" | "bg" | "zh-CN" | "zh-TW" | "hr" | "cs" | "da" | "nl" | "fi" | "fr" | "de" | "el" | "hi" | "hu" | "it" | "ja" | "ko" | "lt" | "no" | "pl" | "pt-BR" | "ro" | "ru" | "es-ES" | "es-419" | "sv-SE" | "th" | "tr" | "uk" | "vi", string>>

Defined in: types.ts:46


type: ApplicationCommandOptionType

Defined in: types.ts:47


optional required?: boolean

Defined in: types.ts:48


optional autocomplete?: boolean | ((pop) => void | Promise<void | object[]> | object[])

Defined in: types.ts:49


optional choices?: object[]

Defined in: types.ts:50

name: string

value: string | number


optional options?: PopiiOption<TState, any, TLocals>[]

Defined in: types.ts:51


optional minValue?: number

Defined in: types.ts:52


optional maxValue?: number

Defined in: types.ts:53


optional guildOnly?: boolean

Defined in: types.ts:55


optional ownerOnly?: boolean

Defined in: types.ts:56


optional permissions?: (bigint | "CreateInstantInvite" | "KickMembers" | "BanMembers" | "Administrator" | "ManageChannels" | "ManageGuild" | "AddReactions" | "ViewAuditLog" | "PrioritySpeaker" | "Stream" | "ViewChannel" | "SendMessages" | "SendTTSMessages" | "ManageMessages" | "EmbedLinks" | "AttachFiles" | "ReadMessageHistory" | "MentionEveryone" | "UseExternalEmojis" | "ViewGuildInsights" | "Connect" | "Speak" | "MuteMembers" | "DeafenMembers" | "MoveMembers" | "UseVAD" | "ChangeNickname" | "ManageNicknames" | "ManageRoles" | "ManageWebhooks" | "ManageEmojisAndStickers" | "ManageGuildExpressions" | "UseApplicationCommands" | "RequestToSpeak" | "ManageEvents" | "ManageThreads" | "CreatePublicThreads" | "CreatePrivateThreads" | "UseExternalStickers" | "SendMessagesInThreads" | "UseEmbeddedActivities" | "ModerateMembers" | "ViewCreatorMonetizationAnalytics" | "UseSoundboard" | "CreateGuildExpressions" | "CreateEvents" | "UseExternalSounds" | "SendVoiceMessages" | "SetVoiceChannelStatus" | "SendPolls" | "UseExternalApps" | "PinMessages" | "BypassSlowmode")[]

Defined in: types.ts:57


optional allowedRoles?: string[]

Defined in: types.ts:58


optional deniedRoles?: string[]

Defined in: types.ts:59


optional allowedChannels?: string[]

Defined in: types.ts:60


optional cooldown?: number | { ms: number; uses?: number; scope?: "user" | "guild" | "global"; }

Defined in: types.ts:61


optional quota?: object

Defined in: types.ts:62

limit: number

timeframe: number

optional scope?: "user" | "guild" | "global"


optional ephemeral?: boolean

Defined in: types.ts:63


optional middlewares?: PopiiMiddleware<TState, TInput, TLocals>[]

Defined in: types.ts:64


optional schema?: PopiiSchema<any>

Defined in: types.ts:65


optional autocompleteCache?: object

Defined in: types.ts:66

ttlMs: number

optional scope?: "user" | "guild" | "global"


optional autocompleteTimeoutMs?: number

Defined in: types.ts:67